我的CTP已经能够连接服务器,配置里已经将tushare数据源和token,以及arctic数据库设置好,
在vscode里运行这个示范https://gitee.com/vnpy/vnpy/blob/master/examples/cta_backtesting/backtesting_demo.ipynb
结果失败,不知道哪里设置有问题?提示没有数据:
2021-11-06 16:37:29.359454 开始加载历史数据
2021-11-06 16:37:29.362412 加载进度:# [0%]
/home/yinxiuqu/anaconda3/envs/vnpy2.7/lib/python3.7/site-packages/arctic/store/_pandas_ndarray_store.py:8: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
from pandas import Panel
Library created, but couldn't enable sharding: no such command: 'enablesharding', full error: {'ok': 0.0, 'errmsg': "no such command: 'enablesharding'", 'code': 59, 'codeName': 'CommandNotFound'}. This is OK if you're not 'admin'
Library created, but couldn't enable sharding: no such command: 'enablesharding', full error: {'ok': 0.0, 'errmsg': "no such command: 'enablesharding'", 'code': 59, 'codeName': 'CommandNotFound'}. This is OK if you're not 'admin'
Collection data_overview already exists
NoDataFoundException Traceback (most recent call last)
/tmp/ipykernel_80158/2657180459.py in <module>
1 #%%
----> 2 engine.load_data()
3 engine.run_backtesting()
4 df = engine.calculate_result()
5 engine.calculate_statistics()
~/anaconda3/envs/vnpy2.7/lib/python3.7/site-packages/vnpy_ctastrategy/backtesting.py in load_data(self)
184 self.interval,
185 start,
--> 186 end
187 )
188 else:
~/anaconda3/envs/vnpy2.7/lib/python3.7/site-packages/vnpy_ctastrategy/backtesting.py in load_bar_data(symbol, exchange, interval, start, end)
1051
1052 return database.load_bar_data(
-> 1053 symbol, exchange, interval, start, end
1054 )
1055
~/anaconda3/envs/vnpy2.7/lib/python3.7/site-packages/vnpy_arctic/arctic_database.py in load_bar_data(self, symbol, exchange, interval, start, end)
167 table_name = generate_table_name(symbol, exchange, interval)
168 df = self.bar_library.read(
--> 169 table_name, chunk_range=DateRange(start, end))
170
171 df.set_index("date", inplace=True)
~/anaconda3/envs/vnpy2.7/lib/python3.7/site-packages/arctic/chunkstore/chunkstore.py in read(self, symbol, chunk_range, filter_data, **kwargs)
254 sym = self._get_symbol_info(symbol)
255 if not sym:
--> 256 raise NoDataFoundException('No data found for %s' % (symbol))
257
258 spec = {SYMBOL: {'$in': symbol}}
NoDataFoundException: No data found for ['IF888_CFFEX_1m']