initialize
2023-02-27 11:03:15.430888 strategy(bktfut,): 2021-05-06 09:03:00 开空 for RB2110.SHF 最新价=5561.0 下单函数返回=0
2023-02-27 11:03:15.432431 strategy(bktfut,): handle_trade data:[bktfut,1,RB2110.SHF,'2','0',1,5572.0,1,20210506 09:04:00.000000,strategy]
2023-02-27 11:03:15.432595 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:1,avail_qty:1,cost_price:5572.0,last_price:5572.0,margin:7243.6)
2023-02-27 11:03:15.457726 strategy(bktfut,): 2021-05-06 09:28:00 开空 for RB2110.SHF 最新价=5611.0 下单函数返回=0
2023-02-27 11:03:15.459174 strategy(bktfut,): handle_trade data:[bktfut,2,RB2110.SHF,'2','0',1,5614.0,2,20210506 09:29:00.000000,strategy]
2023-02-27 11:03:15.459483 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:2,avail_qty:2,cost_price:5593.0,last_price:5614.0,margin:14541.8)
2023-02-27 11:03:15.611081 strategy(bktfut,): 2021-05-06 13:58:00 开空 for RB2110.SHF 最新价=5663.0 下单函数返回=0
2023-02-27 11:03:15.612370 strategy(bktfut,): handle_trade data:[bktfut,3,RB2110.SHF,'2','0',1,5652.0,3,20210506 13:59:00.000000,strategy]
2023-02-27 11:03:15.613010 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:3,avail_qty:3,cost_price:5612.667,last_price:5652.0,margin:21889.4)
2023-02-27 11:03:15.708609 strategy(bktfut,): 2021-05-06 14:58:00 尾盘平空 for RB2110.SHF 最新价=5662.0 下单函数返回=0
2023-02-27 11:03:15.709880 strategy(bktfut,): handle_trade data:[bktfut,4,RB2110.SHF,'1','2',3,5662.0,4,20210506 14:59:00.000000,strategy]
2023-02-27 11:03:15.710068 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:0,avail_qty:0,cost_price:5612.667,last_price:5662.0,margin:0.0)
2023-02-27 11:03:16.099104 strategy(bktfut,): 2021-05-07 21:01:00 开空 for RB2110.SHF 最新价=5683.0 下单函数返回=0
2023-02-27 11:03:16.100515 strategy(bktfut,): handle_trade data:[bktfut,5,RB2110.SHF,'2','0',1,5682.0,5,20210507 21:02:00.000000,strategy]
2023-02-27 11:03:16.100670 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:1,avail_qty:1,cost_price:5682.0,last_price:5682.0,margin:7386.6)
2023-02-27 11:03:16.232014 strategy(bktfut,): 2021-05-07 22:57:00 开空 for RB2110.SHF 最新价=5736.0 下单函数返回=0
2023-02-27 11:03:16.233263 strategy(bktfut,): handle_trade data:[bktfut,6,RB2110.SHF,'2','0',1,5731.0,6,20210507 22:58:00.000000,strategy]
2023-02-27 11:03:16.233489 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:2,avail_qty:2,cost_price:5706.5,last_price:5731.0,margin:14836.900000000001)
2023-02-27 11:03:16.234064 strategy(bktfut,): 2021-05-07 22:58:00 尾盘平空 for RB2110.SHF 最新价=5731.0 下单函数返回=0
2023-02-27 11:03:16.235563 strategy(bktfut,): handle_trade data:[bktfut,7,RB2110.SHF,'1','2',2,5732.0,7,20210507 22:59:00.000000,strategy]
2023-02-27 11:03:16.235869 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:0,avail_qty:0,cost_price:5706.5,last_price:5732.0,margin:0.0)
2023-02-27 11:03:16.237602 strategy(bktfut,): 2021-05-10 09:01:00 开空 for RB2110.SHF 最新价=5956.0 下单函数返回=0
2023-02-27 11:03:16.238729 strategy(bktfut,): handle_trade data:[bktfut,8,RB2110.SHF,'2','0',1,5940.0,8,20210510 09:02:00.000000,strategy]
2023-02-27 11:03:16.239005 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:1,avail_qty:1,cost_price:5940.0,last_price:5940.0,margin:7722.0)
2023-02-27 11:03:16.241349 strategy(bktfut,): 2021-05-10 09:03:00 开空 for RB2110.SHF 最新价=5985.0 下单函数返回=0
2023-02-27 11:03:16.242481 strategy(bktfut,): handle_trade data:[bktfut,9,RB2110.SHF,'2','0',1,5989.0,9,20210510 09:04:00.000000,strategy]
2023-02-27 11:03:16.242760 strategy(bktfut,): 当前多头持仓:Position(bktfut,RB2110.SHF,LONG,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0,margin:0.0) 当前空头持仓:Position(bktfut,RB2110.SHF,SHORT,current_qty:2,avail_qty:2,cost_price:5964.5,last_price:5989.0,margin:15507.7)
2023-02-27 11:03:16.500570 strategy(bktfut,): 2021-05-10 14:58:00 尾盘平空 for RB2110.SHF 最新价=6012.0 下单函数返回=0
2023-02-27 11:03:16.502832 strategy strategy exception:Traceback (most recent call last):
File "bigtrader/strategy/engine.py", line 713, in bigtrader2.bigtrader.strategy.engine.StrategyEngine._call_strategy_func
File "bigtrader/strategy/strategy_base.py", line 2281, in bigtrader2.bigtrader.strategy.strategy_base.StrategyBase.call_handle_data
File "<ipython-input-1-de148aabc051>", line 47, in m2_handle_data_bigquant_run
rv = context.buy_close(context.ins, position_short.avail_qty, price, order_type=OrderType.MARKET)
File "bigtrader/strategy/strategy_base.py", line 1021, in bigtrader2.bigtrader.strategy.strategy_base.StrategyBase.buy_close
AssertionError: buy_close() invalid volume:0