ricequant / rqalpha

A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
http://rqalpha.io
Other
5.36k stars 1.61k forks source link

vnpymod恢复仓位时出现空仓key error #92

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

这个要不还是发到 rqalpha-mod-vnpy 项目下?