回测trackeback: KeyError: Equity(4419 [002891.SZA])>
由bqf6ujar创建,最终由small_q 被浏览 34 用户
<ERROR: moduleinvoker: module name: backtest, module version: v8, trackeback: KeyError: Equity(4419 [002891.SZA])>
https://bigquant.com/experimentshare/0ccd168b09d14a66887be4f52a975b97
KeyError Traceback (most recent call last) <ipython-input-1-35d0cf4ac64b> in <module> 527 ) 528 --> 529 m4 = M.trade.v4( 530 instruments=m1.data, 531 options_data=m17.data_1,
<ipython-input-1-35d0cf4ac64b> in m4_handle_data_bigquant_run(context, data) 379 stock_risk_manage(context, data) 380 --> 381 sell_action(context, data) 382 buy_action(context, data) 383
<ipython-input-1-35d0cf4ac64b> in sell_action(context, data) 226 if data.can_trade(context.symbol(stock)): 227 context.order_target_percent(context.symbol(stock), 0) --> 228 del context.portfolio.positions[context.symbol(stock)] 229 230
KeyError: Equity(4419 [002891.SZA])