ricequant / rqalpha-mod-vnpy

RQAlpha 对接 vnpy 的扩展 Mod。通过启用该 Mod 来实现期货策略的实盘交易
Apache License 2.0
298 stars 59 forks source link

启动恢复仓位时出现空仓key error #6

Closed handsomu closed 7 years ago

handsomu commented 7 years ago

在每次启动vnpy的时候,系统都会自动查询当前仓位信息加载到RQA中。发现当出现空方向仓位的时候就直接报key error了。查看代码发现data_factory中cache_vnpy_position_before_init函数中的空仓字段写错。不应为sell_position,而应为sell_quantity

Cuizi7 commented 7 years ago

0.9.14 版本已修复