vt_setting.json中的配置如下
{"database.driver": "mongodb",
"database.database": "vnpy",
"database.host": "localhost",
"database.port": 27017,
"database.user": "",
"database.password": "",
"database.authentication_source": ""
}
回测配置如下
engine = BacktestingEngine()
engine.set_parameters(
vt_symbol="TESTT88.SHFE",
mode=BacktestingMode.TICK,
interval="1m",
start=datetime(2021, 1, 1),
end=datetime(2021, 1, 5),
rate=0.3/10000,
slippage=0.2,
size=300,
pricetick=0.2,
capital=1000000,
)
engine.add_strategy(AtrRsiStrategy, {})
engine.load_data()
mongodb中的数据如图所示,从csv文件中导入,很明显有2021-1-1的数据,symbol是瞎写的,请忽略
加载进度:########## [100%]
2021-02-13 11:20:04.277610 历史数据加载完成,数据量:0
但是为啥就是数据量为0呢