VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 3
声望: 0

LOG 显示信息如下, 请问这个是代码名称不对吗??

23:40:45 初始化CTA回测引擎
23:40:45 策略文件加载完成
23:40:45 RQData数据接口初始化成功
23:40:51 ----------------------------------------
23:40:51 000002.XSHE-A

Administrator
avatar
加入于:
帖子: 4547
声望: 325

000002.SSE,请使用vn.py规则的代码

Member
avatar
加入于:
帖子: 3
声望: 0

交易员, 改成SSE 了触发异常了。。。。,如何解决

9:44:30 ----------------------------------------
09:44:30 000002.SSE-d开始下载历史数据
09:44:30 数据下载失败,触发异常:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
data = rqdata_client.query_history(req)
File "D:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 137, in query_history
adjust_type="none"
File "D:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(*args, **kwargs)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 116, in get_price
fields, has_dominant_id = _ensure_fields(fields, DAYBAR_FIELDS, stocks, funds, futures, spots, options, convertibles, indexes, repos)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 273, in _ensure_fields
check_items_in_container(fields, all_fields, "fields")
File "D:\vnstudio\lib\site-packages\rqdatac\validators.py", line 64, in check_items_in_container
"{}: got invalided value {}, choose any in {}".format(name, item, should_in)
ValueError: fields: got invalided value open_interest, choose any in {'total_turnover', 'open', 'volume', 'high', 'num_trades', 'low', 'close'}

09:44:45 ----------------------------------------
09:44:45 000002.SSE-1h开始下载历史数据
09:44:45 数据下载失败,触发异常:
Traceback (most recent call last):
File "D:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 381, in run_downloading
data = rqdata_client.query_history(req)
File "D:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 137, in query_history
adjust_type="none"
File "D:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 131, in wrap
return func(*args, **kwargs)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 121, in get_price
fields, has_dominant_id = _ensure_fields(fields, MINBAR_FIELDS, stocks, funds, futures, spots, options, convertibles, indexes, repos)
File "D:\vnstudio\lib\site-packages\rqdatac\services\get_price.py", line 273, in _ensure_fields
check_items_in_container(fields, all_fields, "fields")
File "D:\vnstudio\lib\site-packages\rqdatac\validators.py", line 64, in check_items_in_container
"{}: got invalided value {}, choose any in {}".format(name, item, should_in)
ValueError: fields: got invalided value open_interest, choose any in {'total_turnover', 'open', 'volume', 'high', 'low', 'close'}

Administrator
avatar
加入于:
帖子: 4547
声望: 325

啊,这是之前的一个bug,目前Github上的dev分支已经修复了,试试手动更新下,或者等下下周发布2.1.1

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】