复制链接
克隆策略

菲阿里四价策略-分钟

版本 v1.0

目录

交易规则

策略构建步骤

策略的实现

正文

一、交易规则</b>

菲阿里四价指的是:昨日高点、昨日低点、昨天收盘、今天开盘四个价格。 菲阿里四价上下轨的计算非常简单。昨日高点为上轨,昨日低点为下轨。当价格突破上轨时,买入开仓;当价格突破下轨时,卖出开仓。

二、策略构建步骤

1、确定股票池和回测时间

  • 通过证券代码列表输入回测的起止日期

2、确定买卖条件信号

  • 昨日高点为上轨,昨日低点为下轨。当价格突破上轨时,买入开仓;当价格突破下轨时,卖出开仓。

4、回测

  • 通过 trade 模块中的初始化函数定义交易手续费和滑点;
  • 通过 trade 模块中的主函数(handle函数)查看每日的买卖交易信号,按照买卖原则执行相应的买入/卖出/调仓操作。

三、策略的实现

可视化策略实现如下:

    {"description":"实验创建于2021/12/6","graph":{"edges":[{"to_node_id":"-227:instruments","from_node_id":"-216:data"}],"nodes":[{"node_id":"-216","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-04-06","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-05-12","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_FUTURE","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"RB2110.SHF","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-216"}],"output_ports":[{"name":"data","node_id":"-216"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-227","module_id":"BigQuantSpace.hftrade.hftrade-v2","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"# 交易引擎:初始化函数,只执行一次\ndef bigquant_run(context):\n # 加载预测数据\n # 设置手续费,买入时万3,卖出是千分之1.3,不足5元以5元计\n context.ins = context.get_conf_param(\"instruments\") # 从传入参数中获取需要交易的合约\n context.order_num =2 # 下单手数\n context.set_universe(context.instruments[0]) # 设置需要处理的合约\n context.closetime_day = \"14:58\" # 日内策略白盘平仓时间,一般14:58\n context.closetime_night = \"22:58\" # 日内策略夜盘平仓时间,一般22:58,注意有些商品夜盘收盘时间不一样","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 交易引擎:每个单位时间开盘前调用一次。\ndef bigquant_run(context, data):\n context.subscribe(context.instruments[0]) # 注册合约\n context.flag = 1 # 用于获取今开\n context.count = 0 # 交易次数记录\n \n bar1d_df = data.history(context.instruments[0], [\"high\",\"low\",'close'], 1, \"1d\")\n context.high = bar1d_df.iloc[0]['high'] # 昨高\n context.low = bar1d_df.iloc[0]['low'] # 昨低\n \n","type":"Literal","bound_global_parameter":null},{"name":"handle_tick","value":"# 交易引擎:tick数据处理函数,每个tick执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"def bigquant_run(context, data):\n # 获取当天开盘价\n from datetime import datetime,timedelta\n if context.flag == 1:\n open_price = data.history(context.instruments[0], [\"open\"], 1, \"1m\")\n context.flag = context.flag + 1\n context.today_open = open_price.iloc[-1]['open'] \n \n cur_date = data.current_dt\n cur_hm = cur_date.strftime('%H:%M')\n \n # 部分品种夜盘收盘时间不一样,此时间表示指定的尾盘平仓时间往后偏移30分钟,这段时间内不能开新仓,只能平仓。给30分钟是为了足够的冗余\n closetime_nightshift = (datetime.strptime(context.closetime_night,'%H:%M') + timedelta(minutes = 30)).strftime('%H:%M')\n # 分别获取多头持和空头持仓\n position_long = context.get_position(context.instruments[0], Direction.LONG)\n position_short = context.get_position(context.instruments[0], Direction.SHORT)\n # 获取当前价格\n price = data.current(context.instruments[0], \"close\")\n \n # 尾盘平仓\n if((cur_hm>=context.closetime_day and cur_hm<=\"15:00\") or (cur_hm>=context.closetime_night and cur_hm<=closetime_nightshift)):\n if(position_long.current_qty != 0):\n rv = context.sell_close(context.instruments[0], position_long.avail_qty, price, order_type=OrderType.MARKET)\n msg = \"{} 尾盘平多 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.write_log(msg, stdout=1) #输出关键日志\n if(position_short.current_qty != 0):\n rv = context.buy_close(context.instruments[0], position_short.avail_qty, price, order_type=OrderType.MARKET)\n msg = \"{} 尾盘平空 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.write_log(msg, stdout=1) #输出关键日志\n #尾盘不开新仓,直接返回\n return\n \n \n # 建仓逻辑\n # 多头持仓,最新价小于开盘价 平多\n if position_long.current_qty != 0 and price < context.today_open:\n rv = context.sell_close(context.instruments[0], position_long.avail_qty, price, order_type=OrderType.MARKET)\n msg = \"{} 平多 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.write_log(msg, stdout=1) \n \n # 空头持仓,最新价大于开盘价 平空\n elif position_short.current_qty != 0 and price > context.today_open:\n rv = context.buy_close(context.instruments[0], position_short.avail_qty, price, order_type=OrderType.MARKET)\n msg = \"{} 平空 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.write_log(msg, stdout=1) \n \n # 当前的最新价大于前一天的最高价且没有持仓 开多\n if (position_long.current_qty == 0) and (price > context.high) and (context.count<=1):\n rv = context.buy_open(context.instruments[0], context.order_num, price, order_type=OrderType.MARKET)\n msg = \"{} 开多 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.count += 1 #只开仓一次的判断\n context.write_log(msg, stdout=1) \n # 当前最新价小于前一天的最低价且没有持仓 开空\n elif (position_short.current_qty == 0) and (price < context.low) and (context.count<=1):\n rv = context.sell_open(context.instruments[0], context.order_num, price, order_type=OrderType.MARKET)\n msg = \"{} 开空 for {} 最新价={} 下单函数返回={}\".format(str(data.current_dt),context.instruments[0],str(price),str(rv))\n context.count += 1\n context.write_log(msg, stdout=1) ","type":"Literal","bound_global_parameter":null},{"name":"handle_trade","value":"# 交易引擎:成交回报处理函数,每个成交发生时执行一次\ndef bigquant_run(context, data):\n msg = \"handle_trade data:{}\".format(data.log_str())\n context.write_log(msg, stdout=1) \n # 分别获取最新的多头持仓和空头持仓\n position_long = context.get_position(data.symbol, Direction.LONG)\n position_short = context.get_position(data.symbol, Direction.SHORT)\n msg = \"当前多头持仓:{} 当前空头持仓:{}\".format(str(position_long),str(position_short))\n context.write_log(msg, stdout=1) \n\n","type":"Literal","bound_global_parameter":null},{"name":"handle_order","value":"# 交易引擎:委托回报处理函数,每个委托变化时执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"after_trading","value":"# 交易引擎:盘后处理函数,每日盘后执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"capital_base","value":1000000,"type":"Literal","bound_global_parameter":null},{"name":"frequency","value":"minute","type":"Literal","bound_global_parameter":null},{"name":"price_type","value":"真实价格","type":"Literal","bound_global_parameter":null},{"name":"product_type","value":"期货","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"0","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.HIX","type":"Literal","bound_global_parameter":null},{"name":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"disable_cache","value":"False","type":"Literal","bound_global_parameter":null},{"name":"show_debug_info","value":"False","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-227"},{"name":"options_data","node_id":"-227"},{"name":"history_ds","node_id":"-227"},{"name":"benchmark_ds","node_id":"-227"}],"output_ports":[{"name":"raw_perf","node_id":"-227"}],"cacheable":false,"seq_num":2,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-216' Position='68,107,200,200'/><node_position Node='-227' Position='24,234,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [11]:
    # 本代码由可视化策略环境自动生成 2021年12月10日 11:12
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # 交易引擎:初始化函数,只执行一次
    def m2_initialize_bigquant_run(context):
        # 加载预测数据
        # 设置手续费,买入时万3,卖出是千分之1.3,不足5元以5元计
        context.ins = context.get_conf_param("instruments") # 从传入参数中获取需要交易的合约
        context.order_num =2 # 下单手数
        context.set_universe(context.instruments[0]) # 设置需要处理的合约
        context.closetime_day = "14:58" # 日内策略白盘平仓时间,一般14:58
        context.closetime_night = "22:58" # 日内策略夜盘平仓时间,一般22:58,注意有些商品夜盘收盘时间不一样
    # 交易引擎:每个单位时间开盘前调用一次。
    def m2_before_trading_start_bigquant_run(context, data):
        context.subscribe(context.instruments[0]) # 注册合约
        context.flag = 1 # 用于获取今开
        context.count = 0 # 交易次数记录
        
        bar1d_df = data.history(context.instruments[0], ["high","low",'close'], 1, "1d")
        context.high = bar1d_df.iloc[0]['high'] # 昨高
        context.low = bar1d_df.iloc[0]['low']  # 昨低
        
    
    # 交易引擎:tick数据处理函数,每个tick执行一次
    def m2_handle_tick_bigquant_run(context, data):
        pass
    
    def m2_handle_data_bigquant_run(context, data):
        # 获取当天开盘价
        from datetime import datetime,timedelta
        if context.flag == 1:
            open_price = data.history(context.instruments[0], ["open"], 1, "1m")
            context.flag = context.flag + 1
            context.today_open = open_price.iloc[-1]['open'] 
            
        cur_date =  data.current_dt
        cur_hm = cur_date.strftime('%H:%M')
        
        # 部分品种夜盘收盘时间不一样,此时间表示指定的尾盘平仓时间往后偏移30分钟,这段时间内不能开新仓,只能平仓。给30分钟是为了足够的冗余
        closetime_nightshift = (datetime.strptime(context.closetime_night,'%H:%M') + timedelta(minutes = 30)).strftime('%H:%M')
        # 分别获取多头持和空头持仓
        position_long = context.get_position(context.instruments[0], Direction.LONG)
        position_short = context.get_position(context.instruments[0], Direction.SHORT)
        # 获取当前价格
        price = data.current(context.instruments[0], "close")
        
        # 尾盘平仓
        if((cur_hm>=context.closetime_day and cur_hm<="15:00") or (cur_hm>=context.closetime_night and cur_hm<=closetime_nightshift)):
            if(position_long.current_qty != 0):
                rv = context.sell_close(context.instruments[0], position_long.avail_qty, price, order_type=OrderType.MARKET)
                msg = "{} 尾盘平多 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
                context.write_log(msg, stdout=1) #输出关键日志
            if(position_short.current_qty != 0):
                rv = context.buy_close(context.instruments[0], position_short.avail_qty, price, order_type=OrderType.MARKET)
                msg = "{} 尾盘平空 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
                context.write_log(msg, stdout=1) #输出关键日志
            #尾盘不开新仓,直接返回
            return
        
        
        # 建仓逻辑
        # 多头持仓,最新价小于开盘价 平多
        if position_long.current_qty != 0 and price < context.today_open:
            rv = context.sell_close(context.instruments[0], position_long.avail_qty, price, order_type=OrderType.MARKET)
            msg = "{} 平多 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
            context.write_log(msg, stdout=1) 
            
        # 空头持仓,最新价大于开盘价 平空
        elif position_short.current_qty != 0 and price > context.today_open:
            rv = context.buy_close(context.instruments[0], position_short.avail_qty, price, order_type=OrderType.MARKET)
            msg = "{} 平空 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
            context.write_log(msg, stdout=1) 
           
        # 当前的最新价大于前一天的最高价且没有持仓 开多
        if (position_long.current_qty == 0) and (price > context.high) and (context.count<=1):
            rv = context.buy_open(context.instruments[0], context.order_num, price, order_type=OrderType.MARKET)
            msg = "{} 开多 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
            context.count += 1 #只开仓一次的判断
            context.write_log(msg, stdout=1) 
        # 当前最新价小于前一天的最低价且没有持仓 开空
        elif (position_short.current_qty == 0) and (price < context.low) and (context.count<=1):
            rv = context.sell_open(context.instruments[0], context.order_num, price, order_type=OrderType.MARKET)
            msg = "{} 开空 for {}  最新价={} 下单函数返回={}".format(str(data.current_dt),context.instruments[0],str(price),str(rv))
            context.count += 1
            context.write_log(msg, stdout=1) 
    # 交易引擎:成交回报处理函数,每个成交发生时执行一次
    def m2_handle_trade_bigquant_run(context, data):
        msg = "handle_trade data:{}".format(data.log_str())
        context.write_log(msg, stdout=1) 
        # 分别获取最新的多头持仓和空头持仓
        position_long = context.get_position(data.symbol, Direction.LONG)
        position_short = context.get_position(data.symbol, Direction.SHORT)
        msg = "当前多头持仓:{} 当前空头持仓:{}".format(str(position_long),str(position_short))
        context.write_log(msg, stdout=1) 
    
    
    # 交易引擎:委托回报处理函数,每个委托变化时执行一次
    def m2_handle_order_bigquant_run(context, data):
        pass
    
    # 交易引擎:盘后处理函数,每日盘后执行一次
    def m2_after_trading_bigquant_run(context, data):
        pass
    
    
    m1 = M.instruments.v2(
        start_date='2021-04-06',
        end_date='2021-05-12',
        market='CN_FUTURE',
        instrument_list='RB2110.SHF',
        max_count=0
    )
    
    m2 = M.hftrade.v2(
        instruments=m1.data,
        start_date='',
        end_date='',
        initialize=m2_initialize_bigquant_run,
        before_trading_start=m2_before_trading_start_bigquant_run,
        handle_tick=m2_handle_tick_bigquant_run,
        handle_data=m2_handle_data_bigquant_run,
        handle_trade=m2_handle_trade_bigquant_run,
        handle_order=m2_handle_order_bigquant_run,
        after_trading=m2_after_trading_bigquant_run,
        capital_base=1000000,
        frequency='minute',
        price_type='真实价格',
        product_type='期货',
        before_start_days='0',
        benchmark='000300.HIX',
        plot_charts=True,
        disable_cache=False,
        show_debug_info=False,
        backtest_only=False
    )
    
    2021-12-06 17:30:50.879126 strategy_20211206(bkt999,): 2021-04-06 09:02:00 开多 for RB2110.SHF  最新价=5121.0 下单函数返回=0 
    2021-12-06 17:30:50.884117 strategy_20211206(bkt999,): handle_trade data:[bkt999,1,RB2110.SHF,long,open,2,5119.0,1,20210406 09:03:00.000000,strategy_20211206] 
    2021-12-06 17:30:50.885337 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5119.0,last_price:5119.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:50.887675 strategy_20211206(bkt999,): 2021-04-06 09:03:00 平多 for RB2110.SHF  最新价=5126.0 下单函数返回=0 
    2021-12-06 17:30:50.892279 strategy_20211206(bkt999,): handle_trade data:[bkt999,2,RB2110.SHF,short,close_today,2,5127.0,2,20210406 09:04:00.000000,strategy_20211206] 
    2021-12-06 17:30:50.892979 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5119.0,last_price:5127.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:50.894898 strategy_20211206(bkt999,): 2021-04-06 09:04:00 开多 for RB2110.SHF  最新价=5124.0 下单函数返回=0 
    2021-12-06 17:30:50.899294 strategy_20211206(bkt999,): handle_trade data:[bkt999,3,RB2110.SHF,long,open,2,5125.0,3,20210406 09:05:00.000000,strategy_20211206] 
    2021-12-06 17:30:50.899578 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5125.0,last_price:5125.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:50.900809 strategy_20211206(bkt999,): 2021-04-06 09:05:00 平多 for RB2110.SHF  最新价=5122.0 下单函数返回=0 
    2021-12-06 17:30:50.904956 strategy_20211206(bkt999,): handle_trade data:[bkt999,4,RB2110.SHF,short,close_today,2,5124.0,4,20210406 09:06:00.000000,strategy_20211206] 
    2021-12-06 17:30:50.905243 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5125.0,last_price:5124.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:51.184626 strategy_20211206(bkt999,): 2021-04-06 22:40:00 开多 for RB2110.SHF  最新价=5171.0 下单函数返回=0 
    2021-12-06 17:30:51.188839 strategy_20211206(bkt999,): handle_trade data:[bkt999,5,RB2110.SHF,long,open,2,5171.0,5,20210406 22:41:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.189096 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5171.0,last_price:5171.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:51.197871 strategy_20211206(bkt999,): 2021-04-06 22:48:00 平多 for RB2110.SHF  最新价=5146.0 下单函数返回=0 
    2021-12-06 17:30:51.202265 strategy_20211206(bkt999,): handle_trade data:[bkt999,6,RB2110.SHF,short,close_today,2,5147.0,6,20210406 22:49:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.202958 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5171.0,last_price:5147.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:51.214100 strategy_20211206(bkt999,): 2021-04-07 09:01:00 开多 for RB2110.SHF  最新价=5169.0 下单函数返回=0 
    2021-12-06 17:30:51.217468 strategy_20211206(bkt999,): handle_trade data:[bkt999,7,RB2110.SHF,long,open,2,5170.0,7,20210407 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.217858 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5170.0,last_price:5170.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:51.265077 strategy_20211206(bkt999,): 2021-04-07 10:08:00 平多 for RB2110.SHF  最新价=5139.0 下单函数返回=0 
    2021-12-06 17:30:51.268947 strategy_20211206(bkt999,): handle_trade data:[bkt999,8,RB2110.SHF,short,close_today,2,5139.0,8,20210407 10:09:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.270171 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5170.0,last_price:5139.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:51.839476 strategy_20211206(bkt999,): 2021-04-09 10:57:00 开空 for RB2110.SHF  最新价=5054.0 下单函数返回=0 
    2021-12-06 17:30:51.843124 strategy_20211206(bkt999,): handle_trade data:[bkt999,9,RB2110.SHF,short,open,2,5054.0,9,20210409 10:58:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.844247 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5054.0,last_price:5054.0) 
    2021-12-06 17:30:51.932093 strategy_20211206(bkt999,): 2021-04-09 14:58:00 尾盘平空 for RB2110.SHF  最新价=5058.0 下单函数返回=0 
    2021-12-06 17:30:51.936526 strategy_20211206(bkt999,): handle_trade data:[bkt999,10,RB2110.SHF,long,close_today,2,5058.0,10,20210409 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:51.936841 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5054.0,last_price:5058.0) 
    2021-12-06 17:30:52.061224 strategy_20211206(bkt999,): 2021-04-09 22:29:00 开空 for RB2110.SHF  最新价=5040.0 下单函数返回=0 
    2021-12-06 17:30:52.064686 strategy_20211206(bkt999,): handle_trade data:[bkt999,11,RB2110.SHF,short,open,2,5040.0,11,20210409 22:30:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.064923 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5040.0,last_price:5040.0) 
    2021-12-06 17:30:52.076997 strategy_20211206(bkt999,): 2021-04-09 22:45:00 平空 for RB2110.SHF  最新价=5070.0 下单函数返回=0 
    2021-12-06 17:30:52.081052 strategy_20211206(bkt999,): handle_trade data:[bkt999,12,RB2110.SHF,long,close_today,2,5070.0,12,20210409 22:46:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.081301 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5040.0,last_price:5070.0) 
    2021-12-06 17:30:52.094078 strategy_20211206(bkt999,): 2021-04-12 09:01:00 开空 for RB2110.SHF  最新价=4996.0 下单函数返回=0 
    2021-12-06 17:30:52.097913 strategy_20211206(bkt999,): handle_trade data:[bkt999,13,RB2110.SHF,short,open,2,4996.0,13,20210412 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.098700 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:4996.0,last_price:4996.0) 
    2021-12-06 17:30:52.263764 strategy_20211206(bkt999,): 2021-04-12 14:58:00 尾盘平空 for RB2110.SHF  最新价=4987.0 下单函数返回=0 
    2021-12-06 17:30:52.272728 strategy_20211206(bkt999,): handle_trade data:[bkt999,14,RB2110.SHF,long,close_today,2,4986.0,14,20210412 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.273033 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:4996.0,last_price:4986.0) 
    2021-12-06 17:30:52.482874 strategy_20211206(bkt999,): 2021-04-13 10:58:00 开多 for RB2110.SHF  最新价=5097.0 下单函数返回=0 
    2021-12-06 17:30:52.487761 strategy_20211206(bkt999,): handle_trade data:[bkt999,15,RB2110.SHF,long,open,2,5097.0,15,20210413 10:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.488670 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5097.0,last_price:5097.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:52.581883 strategy_20211206(bkt999,): 2021-04-13 14:58:00 尾盘平多 for RB2110.SHF  最新价=5112.0 下单函数返回=0 
    2021-12-06 17:30:52.586928 strategy_20211206(bkt999,): handle_trade data:[bkt999,16,RB2110.SHF,short,close_today,2,5113.0,16,20210413 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.587220 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5097.0,last_price:5113.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:52.618400 strategy_20211206(bkt999,): 2021-04-13 21:01:00 开多 for RB2110.SHF  最新价=5171.0 下单函数返回=0 
    2021-12-06 17:30:52.622388 strategy_20211206(bkt999,): handle_trade data:[bkt999,17,RB2110.SHF,long,open,2,5172.0,17,20210413 21:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.622754 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5172.0,last_price:5172.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:52.634494 strategy_20211206(bkt999,): 2021-04-13 21:13:00 平多 for RB2110.SHF  最新价=5146.0 下单函数返回=0 
    2021-12-06 17:30:52.638991 strategy_20211206(bkt999,): handle_trade data:[bkt999,18,RB2110.SHF,short,close_today,2,5146.0,18,20210413 21:14:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.640145 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5172.0,last_price:5146.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:52.642217 strategy_20211206(bkt999,): 2021-04-13 21:14:00 开多 for RB2110.SHF  最新价=5148.0 下单函数返回=0 
    2021-12-06 17:30:52.646724 strategy_20211206(bkt999,): handle_trade data:[bkt999,19,RB2110.SHF,long,open,2,5148.0,19,20210413 21:15:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.648051 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5148.0,last_price:5148.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:52.650418 strategy_20211206(bkt999,): 2021-04-13 21:15:00 平多 for RB2110.SHF  最新价=5145.0 下单函数返回=0 
    2021-12-06 17:30:52.654682 strategy_20211206(bkt999,): handle_trade data:[bkt999,20,RB2110.SHF,short,close_today,2,5144.0,20,20210413 21:16:00.000000,strategy_20211206] 
    2021-12-06 17:30:52.655488 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5148.0,last_price:5144.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:53.105691 strategy_20211206(bkt999,): 2021-04-15 13:44:00 开空 for RB2110.SHF  最新价=5092.0 下单函数返回=0 
    2021-12-06 17:30:53.109210 strategy_20211206(bkt999,): handle_trade data:[bkt999,21,RB2110.SHF,short,open,2,5091.0,21,20210415 13:45:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.109891 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5091.0,last_price:5091.0) 
    2021-12-06 17:30:53.165866 strategy_20211206(bkt999,): 2021-04-15 14:58:00 尾盘平空 for RB2110.SHF  最新价=5110.0 下单函数返回=0 
    2021-12-06 17:30:53.170283 strategy_20211206(bkt999,): handle_trade data:[bkt999,22,RB2110.SHF,long,close_today,2,5109.0,22,20210415 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.171289 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5091.0,last_price:5109.0) 
    2021-12-06 17:30:53.276180 strategy_20211206(bkt999,): 2021-04-15 22:41:00 开多 for RB2110.SHF  最新价=5169.0 下单函数返回=0 
    2021-12-06 17:30:53.279247 strategy_20211206(bkt999,): handle_trade data:[bkt999,23,RB2110.SHF,long,open,2,5168.0,23,20210415 22:42:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.280332 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5168.0,last_price:5168.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:53.296410 strategy_20211206(bkt999,): 2021-04-15 22:58:00 尾盘平多 for RB2110.SHF  最新价=5138.0 下单函数返回=0 
    2021-12-06 17:30:53.302513 strategy_20211206(bkt999,): handle_trade data:[bkt999,24,RB2110.SHF,short,close_today,2,5138.0,24,20210415 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.302753 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5168.0,last_price:5138.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:53.601618 strategy_20211206(bkt999,): 2021-04-19 09:01:00 开空 for RB2110.SHF  最新价=5083.0 下单函数返回=0 
    2021-12-06 17:30:53.605117 strategy_20211206(bkt999,): handle_trade data:[bkt999,25,RB2110.SHF,short,open,2,5083.0,25,20210419 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.605839 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5083.0,last_price:5083.0) 
    2021-12-06 17:30:53.646610 strategy_20211206(bkt999,): 2021-04-19 09:38:00 平空 for RB2110.SHF  最新价=5125.0 下单函数返回=0 
    2021-12-06 17:30:53.651133 strategy_20211206(bkt999,): handle_trade data:[bkt999,26,RB2110.SHF,long,close_today,2,5124.0,26,20210419 09:39:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.652278 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5083.0,last_price:5124.0) 
    2021-12-06 17:30:53.731350 strategy_20211206(bkt999,): 2021-04-19 11:30:00 开空 for RB2110.SHF  最新价=5079.0 下单函数返回=0 
    2021-12-06 17:30:53.735994 strategy_20211206(bkt999,): handle_trade data:[bkt999,27,RB2110.SHF,short,open,2,5079.0,27,20210419 13:31:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.737392 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5079.0,last_price:5079.0) 
    2021-12-06 17:30:53.806185 strategy_20211206(bkt999,): 2021-04-19 14:58:00 尾盘平空 for RB2110.SHF  最新价=5080.0 下单函数返回=0 
    2021-12-06 17:30:53.811231 strategy_20211206(bkt999,): handle_trade data:[bkt999,28,RB2110.SHF,long,close_today,2,5080.0,28,20210419 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:53.811832 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5079.0,last_price:5080.0) 
    2021-12-06 17:30:54.073333 strategy_20211206(bkt999,): 2021-04-20 14:06:00 开多 for RB2110.SHF  最新价=5144.0 下单函数返回=0 
    2021-12-06 17:30:54.078269 strategy_20211206(bkt999,): handle_trade data:[bkt999,29,RB2110.SHF,long,open,2,5145.0,29,20210420 14:07:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.079162 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5145.0,last_price:5145.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.125254 strategy_20211206(bkt999,): 2021-04-20 14:58:00 尾盘平多 for RB2110.SHF  最新价=5162.0 下单函数返回=0 
    2021-12-06 17:30:54.129959 strategy_20211206(bkt999,): handle_trade data:[bkt999,30,RB2110.SHF,short,close_today,2,5162.0,30,20210420 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.130224 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5145.0,last_price:5162.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.168250 strategy_20211206(bkt999,): 2021-04-20 21:02:00 开多 for RB2110.SHF  最新价=5173.0 下单函数返回=0 
    2021-12-06 17:30:54.173284 strategy_20211206(bkt999,): handle_trade data:[bkt999,31,RB2110.SHF,long,open,2,5173.0,31,20210420 21:03:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.174145 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5173.0,last_price:5173.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.251428 strategy_20211206(bkt999,): 2021-04-20 22:37:00 平多 for RB2110.SHF  最新价=5157.0 下单函数返回=0 
    2021-12-06 17:30:54.255217 strategy_20211206(bkt999,): handle_trade data:[bkt999,32,RB2110.SHF,short,close_today,2,5157.0,32,20210420 22:38:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.255458 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5173.0,last_price:5157.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.458860 strategy_20211206(bkt999,): 2021-04-21 14:51:00 开多 for RB2110.SHF  最新价=5172.0 下单函数返回=0 
    2021-12-06 17:30:54.463066 strategy_20211206(bkt999,): handle_trade data:[bkt999,33,RB2110.SHF,long,open,2,5172.0,33,20210421 14:52:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.463327 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5172.0,last_price:5172.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.470488 strategy_20211206(bkt999,): 2021-04-21 14:58:00 尾盘平多 for RB2110.SHF  最新价=5183.0 下单函数返回=0 
    2021-12-06 17:30:54.474500 strategy_20211206(bkt999,): handle_trade data:[bkt999,34,RB2110.SHF,short,close_today,2,5184.0,34,20210421 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.474729 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5172.0,last_price:5184.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.505268 strategy_20211206(bkt999,): 2021-04-21 21:02:00 开多 for RB2110.SHF  最新价=5200.0 下单函数返回=0 
    2021-12-06 17:30:54.509220 strategy_20211206(bkt999,): handle_trade data:[bkt999,35,RB2110.SHF,long,open,2,5201.0,35,20210421 21:03:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.510209 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5201.0,last_price:5201.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.522075 strategy_20211206(bkt999,): 2021-04-21 21:17:00 平多 for RB2110.SHF  最新价=5193.0 下单函数返回=0 
    2021-12-06 17:30:54.525893 strategy_20211206(bkt999,): handle_trade data:[bkt999,36,RB2110.SHF,short,close_today,2,5194.0,36,20210421 21:18:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.526079 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5201.0,last_price:5194.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.528103 strategy_20211206(bkt999,): 2021-04-21 21:18:00 开多 for RB2110.SHF  最新价=5195.0 下单函数返回=0 
    2021-12-06 17:30:54.531915 strategy_20211206(bkt999,): handle_trade data:[bkt999,37,RB2110.SHF,long,open,2,5196.0,37,20210421 21:19:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.532228 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5196.0,last_price:5196.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.595306 strategy_20211206(bkt999,): 2021-04-21 22:42:00 平多 for RB2110.SHF  最新价=5188.0 下单函数返回=0 
    2021-12-06 17:30:54.598897 strategy_20211206(bkt999,): handle_trade data:[bkt999,38,RB2110.SHF,short,close_today,2,5186.0,38,20210421 22:43:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.599094 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5196.0,last_price:5186.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.862197 strategy_20211206(bkt999,): 2021-04-22 22:40:00 开多 for RB2110.SHF  最新价=5240.0 下单函数返回=0 
    2021-12-06 17:30:54.866144 strategy_20211206(bkt999,): handle_trade data:[bkt999,39,RB2110.SHF,long,open,2,5240.0,39,20210422 22:41:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.866473 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5240.0,last_price:5240.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.882391 strategy_20211206(bkt999,): 2021-04-22 22:58:00 尾盘平多 for RB2110.SHF  最新价=5240.0 下单函数返回=0 
    2021-12-06 17:30:54.886654 strategy_20211206(bkt999,): handle_trade data:[bkt999,40,RB2110.SHF,short,close_today,2,5241.0,40,20210422 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.886886 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5240.0,last_price:5241.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:54.918858 strategy_20211206(bkt999,): 2021-04-23 09:38:00 开多 for RB2110.SHF  最新价=5240.0 下单函数返回=0 
    2021-12-06 17:30:54.923187 strategy_20211206(bkt999,): handle_trade data:[bkt999,41,RB2110.SHF,long,open,2,5240.0,41,20210423 09:39:00.000000,strategy_20211206] 
    2021-12-06 17:30:54.923953 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5240.0,last_price:5240.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.064683 strategy_20211206(bkt999,): 2021-04-23 14:58:00 尾盘平多 for RB2110.SHF  最新价=5291.0 下单函数返回=0 
    2021-12-06 17:30:55.069482 strategy_20211206(bkt999,): handle_trade data:[bkt999,42,RB2110.SHF,short,close_today,2,5291.0,42,20210423 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.070066 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5240.0,last_price:5291.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.102960 strategy_20211206(bkt999,): 2021-04-23 21:06:00 开多 for RB2110.SHF  最新价=5307.0 下单函数返回=0 
    2021-12-06 17:30:55.106667 strategy_20211206(bkt999,): handle_trade data:[bkt999,43,RB2110.SHF,long,open,2,5308.0,43,20210423 21:07:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.107622 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5308.0,last_price:5308.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.183745 strategy_20211206(bkt999,): 2021-04-23 22:58:00 尾盘平多 for RB2110.SHF  最新价=5370.0 下单函数返回=0 
    2021-12-06 17:30:55.187522 strategy_20211206(bkt999,): handle_trade data:[bkt999,44,RB2110.SHF,short,close_today,2,5370.0,44,20210423 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.188428 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5308.0,last_price:5370.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.191123 strategy_20211206(bkt999,): 2021-04-26 09:01:00 开多 for RB2110.SHF  最新价=5415.0 下单函数返回=0 
    2021-12-06 17:30:55.195684 strategy_20211206(bkt999,): handle_trade data:[bkt999,45,RB2110.SHF,long,open,2,5415.0,45,20210426 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.196256 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5415.0,last_price:5415.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.348104 strategy_20211206(bkt999,): 2021-04-26 14:58:00 尾盘平多 for RB2110.SHF  最新价=5380.0 下单函数返回=0 
    2021-12-06 17:30:55.352067 strategy_20211206(bkt999,): handle_trade data:[bkt999,46,RB2110.SHF,short,close_today,2,5380.0,46,20210426 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.352417 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5415.0,last_price:5380.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:55.690594 strategy_20211206(bkt999,): 2021-04-27 21:31:00 开空 for RB2110.SHF  最新价=5355.0 下单函数返回=0 
    2021-12-06 17:30:55.695056 strategy_20211206(bkt999,): handle_trade data:[bkt999,47,RB2110.SHF,short,open,2,5355.0,47,20210427 21:32:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.696072 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5355.0,last_price:5355.0) 
    2021-12-06 17:30:55.754624 strategy_20211206(bkt999,): 2021-04-27 22:58:00 尾盘平空 for RB2110.SHF  最新价=5338.0 下单函数返回=0 
    2021-12-06 17:30:55.759491 strategy_20211206(bkt999,): handle_trade data:[bkt999,48,RB2110.SHF,long,close_today,2,5339.0,48,20210427 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.760376 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5355.0,last_price:5339.0) 
    2021-12-06 17:30:55.764486 strategy_20211206(bkt999,): 2021-04-28 09:01:00 开空 for RB2110.SHF  最新价=5340.0 下单函数返回=0 
    2021-12-06 17:30:55.771807 strategy_20211206(bkt999,): handle_trade data:[bkt999,49,RB2110.SHF,short,open,2,5340.0,49,20210428 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:55.772331 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:2,avail_qty:2,cost_price:5340.0,last_price:5340.0) 
    2021-12-06 17:30:55.996218 strategy_20211206(bkt999,): 2021-04-28 14:58:00 尾盘平空 for RB2110.SHF  最新价=5363.0 下单函数返回=0 
    2021-12-06 17:30:56.000279 strategy_20211206(bkt999,): handle_trade data:[bkt999,50,RB2110.SHF,long,close_today,2,5364.0,50,20210428 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.001361 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:5340.0,last_price:5364.0) 
    2021-12-06 17:30:56.070495 strategy_20211206(bkt999,): 2021-04-28 21:42:00 开多 for RB2110.SHF  最新价=5423.0 下单函数返回=0 
    2021-12-06 17:30:56.075776 strategy_20211206(bkt999,): handle_trade data:[bkt999,51,RB2110.SHF,long,open,2,5423.0,51,20210428 21:43:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.076621 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5423.0,last_price:5423.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.132080 strategy_20211206(bkt999,): 2021-04-28 22:58:00 尾盘平多 for RB2110.SHF  最新价=5409.0 下单函数返回=0 
    2021-12-06 17:30:56.136381 strategy_20211206(bkt999,): handle_trade data:[bkt999,52,RB2110.SHF,short,close_today,2,5409.0,52,20210428 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.136694 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5423.0,last_price:5409.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.184482 strategy_20211206(bkt999,): 2021-04-29 10:13:00 开多 for RB2110.SHF  最新价=5423.0 下单函数返回=0 
    2021-12-06 17:30:56.189224 strategy_20211206(bkt999,): handle_trade data:[bkt999,53,RB2110.SHF,long,open,2,5423.0,53,20210429 10:14:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.190124 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5423.0,last_price:5423.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.322922 strategy_20211206(bkt999,): 2021-04-29 14:58:00 尾盘平多 for RB2110.SHF  最新价=5461.0 下单函数返回=0 
    2021-12-06 17:30:56.327651 strategy_20211206(bkt999,): handle_trade data:[bkt999,54,RB2110.SHF,short,close_today,2,5461.0,54,20210429 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.328917 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5423.0,last_price:5461.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.388422 strategy_20211206(bkt999,): 2021-04-29 21:09:00 开多 for RB2110.SHF  最新价=5479.0 下单函数返回=0 
    2021-12-06 17:30:56.395676 strategy_20211206(bkt999,): handle_trade data:[bkt999,55,RB2110.SHF,long,open,2,5479.0,55,20210429 21:10:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.395891 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5479.0,last_price:5479.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.436389 strategy_20211206(bkt999,): 2021-04-29 21:55:00 平多 for RB2110.SHF  最新价=5462.0 下单函数返回=0 
    2021-12-06 17:30:56.440623 strategy_20211206(bkt999,): handle_trade data:[bkt999,56,RB2110.SHF,short,close_today,2,5461.0,56,20210429 21:56:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.441366 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5479.0,last_price:5461.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.687358 strategy_20211206(bkt999,): 2021-05-06 09:01:00 开多 for RB2110.SHF  最新价=5550.0 下单函数返回=0 
    2021-12-06 17:30:56.692162 strategy_20211206(bkt999,): handle_trade data:[bkt999,57,RB2110.SHF,long,open,2,5550.0,57,20210506 09:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.693261 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5550.0,last_price:5550.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.849012 strategy_20211206(bkt999,): 2021-05-06 14:58:00 尾盘平多 for RB2110.SHF  最新价=5662.0 下单函数返回=0 
    2021-12-06 17:30:56.851869 strategy_20211206(bkt999,): handle_trade data:[bkt999,58,RB2110.SHF,short,close_today,2,5662.0,58,20210506 14:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.852818 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5550.0,last_price:5662.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.884630 strategy_20211206(bkt999,): 2021-05-06 21:02:00 开多 for RB2110.SHF  最新价=5673.0 下单函数返回=0 
    2021-12-06 17:30:56.888351 strategy_20211206(bkt999,): handle_trade data:[bkt999,59,RB2110.SHF,long,open,2,5673.0,59,20210506 21:03:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.889075 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5673.0,last_price:5673.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.907973 strategy_20211206(bkt999,): 2021-05-06 21:26:00 平多 for RB2110.SHF  最新价=5666.0 下单函数返回=0 
    2021-12-06 17:30:56.912145 strategy_20211206(bkt999,): handle_trade data:[bkt999,60,RB2110.SHF,short,close_today,2,5665.0,60,20210506 21:27:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.912409 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5673.0,last_price:5665.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.915349 strategy_20211206(bkt999,): 2021-05-06 21:30:00 开多 for RB2110.SHF  最新价=5674.0 下单函数返回=0 
    2021-12-06 17:30:56.919553 strategy_20211206(bkt999,): handle_trade data:[bkt999,61,RB2110.SHF,long,open,2,5673.0,61,20210506 21:31:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.919802 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5673.0,last_price:5673.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:56.930316 strategy_20211206(bkt999,): 2021-05-06 21:44:00 平多 for RB2110.SHF  最新价=5668.0 下单函数返回=0 
    2021-12-06 17:30:56.935269 strategy_20211206(bkt999,): handle_trade data:[bkt999,62,RB2110.SHF,short,close_today,2,5668.0,62,20210506 21:45:00.000000,strategy_20211206] 
    2021-12-06 17:30:56.936600 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5673.0,last_price:5668.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.187272 strategy_20211206(bkt999,): 2021-05-07 21:04:00 开多 for RB2110.SHF  最新价=5708.0 下单函数返回=0 
    2021-12-06 17:30:57.190352 strategy_20211206(bkt999,): handle_trade data:[bkt999,63,RB2110.SHF,long,open,2,5707.0,63,20210507 21:05:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.190540 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5707.0,last_price:5707.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.208099 strategy_20211206(bkt999,): 2021-05-07 21:25:00 平多 for RB2110.SHF  最新价=5674.0 下单函数返回=0 
    2021-12-06 17:30:57.211938 strategy_20211206(bkt999,): handle_trade data:[bkt999,64,RB2110.SHF,short,close_today,2,5674.0,64,20210507 21:26:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.212571 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5707.0,last_price:5674.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.262069 strategy_20211206(bkt999,): 2021-05-07 22:34:00 开多 for RB2110.SHF  最新价=5699.0 下单函数返回=0 
    2021-12-06 17:30:57.265774 strategy_20211206(bkt999,): handle_trade data:[bkt999,65,RB2110.SHF,long,open,2,5699.0,65,20210507 22:35:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.266423 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:5699.0,last_price:5699.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.284857 strategy_20211206(bkt999,): 2021-05-07 22:58:00 尾盘平多 for RB2110.SHF  最新价=5731.0 下单函数返回=0 
    2021-12-06 17:30:57.289003 strategy_20211206(bkt999,): handle_trade data:[bkt999,66,RB2110.SHF,short,close_today,2,5732.0,66,20210507 22:59:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.290102 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:5699.0,last_price:5732.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.481631 strategy_20211206(bkt999,): 2021-05-10 21:01:00 开多 for RB2110.SHF  最新价=6195.0 下单函数返回=0 
    2021-12-06 17:30:57.486026 strategy_20211206(bkt999,): handle_trade data:[bkt999,67,RB2110.SHF,long,open,2,6193.0,67,20210510 21:02:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.487019 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:6193.0,last_price:6193.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.490883 strategy_20211206(bkt999,): 2021-05-10 21:05:00 平多 for RB2110.SHF  最新价=6101.0 下单函数返回=0 
    2021-12-06 17:30:57.494784 strategy_20211206(bkt999,): handle_trade data:[bkt999,68,RB2110.SHF,short,close_today,2,6102.0,68,20210510 21:06:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.494967 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:6193.0,last_price:6102.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.496934 strategy_20211206(bkt999,): 2021-05-10 21:06:00 开多 for RB2110.SHF  最新价=6081.0 下单函数返回=0 
    2021-12-06 17:30:57.502459 strategy_20211206(bkt999,): handle_trade data:[bkt999,69,RB2110.SHF,long,open,2,6082.0,69,20210510 21:07:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.502802 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:2,avail_qty:2,cost_price:6082.0,last_price:6082.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    2021-12-06 17:30:57.506285 strategy_20211206(bkt999,): 2021-05-10 21:10:00 平多 for RB2110.SHF  最新价=6112.0 下单函数返回=0 
    2021-12-06 17:30:57.511382 strategy_20211206(bkt999,): handle_trade data:[bkt999,70,RB2110.SHF,short,close_today,2,6113.0,70,20210510 21:11:00.000000,strategy_20211206] 
    2021-12-06 17:30:57.511583 strategy_20211206(bkt999,): 当前多头持仓:Position(bkt999,RB2110.SHF,long,current_qty:0,avail_qty:0,cost_price:6082.0,last_price:6113.0) 当前空头持仓:Position(bkt999,RB2110.SHF,short,current_qty:0,avail_qty:0,cost_price:0.0,last_price:0.0) 
    
    • 收益率-0.17%
    • 年化收益率-1.72%
    • 基准收益率-1.86%
    • 阿尔法-0.05
    • 贝塔-0.02
    • 夏普比率-4.16
    • 胜率0.19
    • 盈亏比0.86
    • 收益波动率1.13%
    • 最大回撤0.39%
    bigcharts-data-start/{"__type":"tabs","__id":"bigchart-e9e91a5c3259464e9371691472a0e603"}/bigcharts-data-end