复制链接
克隆策略

    {"description":"实验创建于2022/4/8","graph":{"edges":[{"to_node_id":"-161:input_data","from_node_id":"-505:data"},{"to_node_id":"-760:input","from_node_id":"-505:data"},{"to_node_id":"-645:input_1","from_node_id":"-512:data"},{"to_node_id":"-1953:input_1","from_node_id":"-519:data"},{"to_node_id":"-161:features","from_node_id":"-666:data"},{"to_node_id":"-549:input_1","from_node_id":"-161:data"},{"to_node_id":"-7412:instruments","from_node_id":"-760:instrument_list"},{"to_node_id":"-519:data2","from_node_id":"-645:data_1"},{"to_node_id":"-519:data1","from_node_id":"-549:data_1"},{"to_node_id":"-7412:options_data","from_node_id":"-1953:data_1"}],"nodes":[{"node_id":"-505","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"market_performance_CN_CONBOND","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2018-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2020-12-31","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-505"},{"name":"features","node_id":"-505"}],"output_ports":[{"name":"data","node_id":"-505"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-512","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"basic_info_CN_CONBOND","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2018-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2020-12-31","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-512"},{"name":"features","node_id":"-512"}],"output_ports":[{"name":"data","node_id":"-512"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-519","module_id":"BigQuantSpace.join.join-v3","parameters":[{"name":"on","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"how","value":"inner","type":"Literal","bound_global_parameter":null},{"name":"sort","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"data1","node_id":"-519"},{"name":"data2","node_id":"-519"}],"output_ports":[{"name":"data","node_id":"-519"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-666","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\ndouble_low = close + bond_prem_ratio\nremain_size > 1.5\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-666"}],"output_ports":[{"name":"data","node_id":"-666"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"-161","module_id":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","parameters":[{"name":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"drop_na","value":"False","type":"Literal","bound_global_parameter":null},{"name":"remove_extra_columns","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-161"},{"name":"features","node_id":"-161"}],"output_ports":[{"name":"data","node_id":"-161"}],"cacheable":true,"seq_num":7,"comment":"","comment_collapsed":true},{"node_id":"-760","module_id":"BigQuantSpace.trade_data_generation.trade_data_generation-v1","parameters":[{"name":"category","value":"CN_STOCK","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input","node_id":"-760"}],"output_ports":[{"name":"history_data","node_id":"-760"},{"name":"instrument_list","node_id":"-760"},{"name":"calendar","node_id":"-760"}],"cacheable":false,"seq_num":9,"comment":"","comment_collapsed":true},{"node_id":"-7412","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 print(\"initializing\")\n # 加载股票指标数据,数据继承自m6模块\n context.indicator_data = context.options['data'].read_df()\n\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))\n \n # 设置股票数量\n context.stock_num = 20\n \n # 调仓天数,22个交易日大概就是一个月。可以理解为一个月换仓一次\n context.rebalance_days = 22\n \n # 如果策略运行中,需要将数据进行保存,可以借用extension这个对象,类型为dict\n # 比如当前运行的k线的索引,比如个股持仓天数、买入均价\n try:\n print(f\"check idx: {context.extension.idx}\")\n except AttributeError as e:\n context.extension.idx = 0\n ","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 交易引擎:每个单位时间开盘前调用一次。\ndef bigquant_run(context, data):\n context.subscribe(context.instruments)\n pass","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":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n \n context.extension.idx += 1\n # 不在换仓日就return,相当于后面的代码只会一个月运行一次,买入的股票会持有1个月\n if context.extension.idx % context.rebalance_days != 0:\n return\n \n # 当前的日期\n date = data.current_dt.strftime('%Y-%m-%d')\n cur_data = context.indicator_data[context.indicator_data['date'] == date]\n \n #建仓条件判断:市场双低均值达到170可进行建仓\n if cur_data['double_low'].mean() > 170:\n print(date,':该调仓日市场双低均值为',cur_data['double_low'].mean(),\",无需建仓\")\n return\n \n \n # 设定股票池\n # 条件1:上市超过1个月\n stock_can_buy = cur_data[cur_data['can_buy'] == 1]\n # 条件2:剩余期限小于180个自然日\n stock_to_clean = cur_data[cur_data['to_clean'] == 1]\n \n symbols = list(set(stock_can_buy['instrument'].values).difference(set(stock_to_clean['instrument'].values)))\n cur_data = cur_data.set_index('instrument').loc[symbols,:].reset_index().sort_values('double_low')\n stock_to_buy = list(cur_data.instrument[:context.stock_num])\n \n # 通过positions对象,使用列表生成式的方法获取目前持仓的股票列表\n stock_hold_now = [equity for equity in context.portfolio.positions]\n # 继续持有的股票:调仓时,如果买入的股票已经存在于目前的持仓里,那么应继续持有\n no_need_to_sell = [i for i in stock_hold_now if i in stock_to_buy]\n # 需要卖出的股票\n stock_to_sell = [i for i in stock_hold_now if i not in no_need_to_sell] \n \n # 卖出\n for stock in stock_to_sell:\n context.order_target_percent(stock, 0)\n \n # 如果当天没有买入的股票,就返回\n if len(stock_to_buy) == 0:\n print(date,'当天没有买入的股票')\n return\n\n # 等权重买入 \n weight = 1 / len(stock_to_buy)\n \n # 买入\n for stock in stock_to_buy:\n context.order_target_percent(stock, weight)\n ","type":"Literal","bound_global_parameter":null},{"name":"handle_trade","value":"# 交易引擎:成交回报处理函数,每个成交发生时执行一次\ndef bigquant_run(context, data):\n pass\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":"1000001","type":"Literal","bound_global_parameter":null},{"name":"frequency","value":"daily","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":"volume_limit","value":1,"type":"Literal","bound_global_parameter":null},{"name":"order_price_field_buy","value":"close","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_sell","value":"close","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":"replay_bdb","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":"-7412"},{"name":"options_data","node_id":"-7412"},{"name":"history_ds","node_id":"-7412"},{"name":"benchmark_ds","node_id":"-7412"}],"output_ports":[{"name":"raw_perf","node_id":"-7412"}],"cacheable":false,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-645","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n df = input_1.read()\n df['list_date'] = df['list_date'].astype(str)\n df['delist_date'] = df['delist_date'].astype(str)\n df = df.loc[:,['instrument','list_date','delist_date']]\n \n data_1 = DataSource.write_df(df)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","type":"Literal","bound_global_parameter":null},{"name":"post_run","value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","type":"Literal","bound_global_parameter":null},{"name":"input_ports","value":"","type":"Literal","bound_global_parameter":null},{"name":"params","value":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-645"},{"name":"input_2","node_id":"-645"},{"name":"input_3","node_id":"-645"}],"output_ports":[{"name":"data_1","node_id":"-645"},{"name":"data_2","node_id":"-645"},{"name":"data_3","node_id":"-645"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true},{"node_id":"-549","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n df = input_1.read()\n \n df = df.loc[:,['date','instrument','close','bond_prem_ratio','double_low','remain_size']]\n \n data_1 = DataSource.write_df(df)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","type":"Literal","bound_global_parameter":null},{"name":"post_run","value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","type":"Literal","bound_global_parameter":null},{"name":"input_ports","value":"","type":"Literal","bound_global_parameter":null},{"name":"params","value":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-549"},{"name":"input_2","node_id":"-549"},{"name":"input_3","node_id":"-549"}],"output_ports":[{"name":"data_1","node_id":"-549"},{"name":"data_2","node_id":"-549"},{"name":"data_3","node_id":"-549"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-1953","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n df = input_1.read()\n \n df['date'] = pd.to_datetime(df['date'])\n df['list_date'] = pd.to_datetime(df['list_date'])\n df['delist_date'] = pd.to_datetime(df['delist_date'])\n \n #买入规则:上市满30天才能买入\n df['can_buy'] = df['date'] > (df['list_date'] + datetime.timedelta(days=30))\n\n #卖出规则:离退市日期差6个月时清仓\n df['to_clean'] = (df['date'] + datetime.timedelta(days=180)) > df['delist_date']\n \n data_1 = DataSource.write_df(df)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","type":"Literal","bound_global_parameter":null},{"name":"post_run","value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","type":"Literal","bound_global_parameter":null},{"name":"input_ports","value":"","type":"Literal","bound_global_parameter":null},{"name":"params","value":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-1953"},{"name":"input_2","node_id":"-1953"},{"name":"input_3","node_id":"-1953"}],"output_ports":[{"name":"data_1","node_id":"-1953"},{"name":"data_2","node_id":"-1953"},{"name":"data_3","node_id":"-1953"}],"cacheable":true,"seq_num":10,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-505' Position='139,-159,200,200'/><node_position Node='-512' Position='623,-44,200,200'/><node_position Node='-519' Position='423,176,200,200'/><node_position Node='-666' Position='445,-164,200,200'/><node_position Node='-161' Position='322,-49,200,200'/><node_position Node='-760' Position='6.2948455810546875,48,200,200'/><node_position Node='-7412' Position='361.29486083984375,400,200,200'/><node_position Node='-645' Position='603,50,200,200'/><node_position Node='-549' Position='302,50,200,200'/><node_position Node='-1953' Position='405,279,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [12]:
    # 本代码由可视化策略环境自动生成 2023年4月19日 10:23
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m5_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read()
        df['list_date'] = df['list_date'].astype(str)
        df['delist_date'] = df['delist_date'].astype(str)
        df = df.loc[:,['instrument','list_date','delist_date']]
        
        data_1 = DataSource.write_df(df)
        return Outputs(data_1=data_1, data_2=None, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m5_post_run_bigquant_run(outputs):
        return outputs
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m4_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read()
        
        df = df.loc[:,['date','instrument','close','bond_prem_ratio','double_low','remain_size']]
        
        data_1 = DataSource.write_df(df)
        return Outputs(data_1=data_1, data_2=None, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m4_post_run_bigquant_run(outputs):
        return outputs
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m10_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read()
        
        df['date'] = pd.to_datetime(df['date'])
        df['list_date'] = pd.to_datetime(df['list_date'])
        df['delist_date'] = pd.to_datetime(df['delist_date'])
        
        #买入规则:上市满30天才能买入
        df['can_buy'] = df['date'] > (df['list_date'] + datetime.timedelta(days=30))
    
        #卖出规则:离退市日期差6个月时清仓
        df['to_clean'] = (df['date'] + datetime.timedelta(days=180)) > df['delist_date']
        
        data_1 = DataSource.write_df(df)
        return Outputs(data_1=data_1, data_2=None, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m10_post_run_bigquant_run(outputs):
        return outputs
    
    # 交易引擎:初始化函数,只执行一次
    def m8_initialize_bigquant_run(context):
        print("initializing")
           # 加载股票指标数据,数据继承自m6模块
        context.indicator_data = context.options['data'].read_df()
    
        # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数
        context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))
        
        # 设置股票数量
        context.stock_num = 20
        
        # 调仓天数,22个交易日大概就是一个月。可以理解为一个月换仓一次
        context.rebalance_days = 22
        
        # 如果策略运行中,需要将数据进行保存,可以借用extension这个对象,类型为dict
        # 比如当前运行的k线的索引,比如个股持仓天数、买入均价
        try:
            print(f"check idx: {context.extension.idx}")
        except AttributeError as e:
            context.extension.idx = 0
     
    # 交易引擎:每个单位时间开盘前调用一次。
    def m8_before_trading_start_bigquant_run(context, data):
        context.subscribe(context.instruments)
        pass
    # 交易引擎:tick数据处理函数,每个tick执行一次
    def m8_handle_tick_bigquant_run(context, data):
        pass
    
    # 回测引擎:每日数据处理函数,每天执行一次
    def m8_handle_data_bigquant_run(context, data):
        
        context.extension.idx += 1
        # 不在换仓日就return,相当于后面的代码只会一个月运行一次,买入的股票会持有1个月
        if  context.extension.idx % context.rebalance_days != 0:
            return
        
        # 当前的日期
        date = data.current_dt.strftime('%Y-%m-%d')
        cur_data = context.indicator_data[context.indicator_data['date'] == date]
        
        #建仓条件判断:市场双低均值达到170可进行建仓
        if cur_data['double_low'].mean() > 170:
            print(date,':该调仓日市场双低均值为',cur_data['double_low'].mean(),",无需建仓")
            return
        
        
        # 设定股票池
        # 条件1:上市超过1个月
        stock_can_buy = cur_data[cur_data['can_buy'] == 1]
        # 条件2:剩余期限小于180个自然日
        stock_to_clean = cur_data[cur_data['to_clean'] == 1]
        
        symbols = list(set(stock_can_buy['instrument'].values).difference(set(stock_to_clean['instrument'].values)))
        cur_data = cur_data.set_index('instrument').loc[symbols,:].reset_index().sort_values('double_low')
        stock_to_buy = list(cur_data.instrument[:context.stock_num])
       
        # 通过positions对象,使用列表生成式的方法获取目前持仓的股票列表
        stock_hold_now = [equity for equity in context.portfolio.positions]
        # 继续持有的股票:调仓时,如果买入的股票已经存在于目前的持仓里,那么应继续持有
        no_need_to_sell = [i for i in stock_hold_now if i in stock_to_buy]
        # 需要卖出的股票
        stock_to_sell = [i for i in stock_hold_now if i not in no_need_to_sell] 
        
        # 卖出
        for stock in stock_to_sell:
            context.order_target_percent(stock, 0)
        
        # 如果当天没有买入的股票,就返回
        if len(stock_to_buy) == 0:
            print(date,'当天没有买入的股票')
            return
    
        # 等权重买入 
        weight =  1 / len(stock_to_buy)
        
        # 买入
        for stock in stock_to_buy:
            context.order_target_percent(stock, weight)
     
    # 交易引擎:成交回报处理函数,每个成交发生时执行一次
    def m8_handle_trade_bigquant_run(context, data):
        pass
    
    # 交易引擎:委托回报处理函数,每个委托变化时执行一次
    def m8_handle_order_bigquant_run(context, data):
        pass
    
    # 交易引擎:盘后处理函数,每日盘后执行一次
    def m8_after_trading_bigquant_run(context, data):
        pass
    
    
    m1 = M.use_datasource.v1(
        datasource_id='market_performance_CN_CONBOND',
        start_date='2018-01-01',
        end_date='2020-12-31'
    )
    
    m9 = M.trade_data_generation.v1(
        input=m1.data,
        category='CN_STOCK',
        m_cached=False
    )
    
    m2 = M.use_datasource.v1(
        datasource_id='basic_info_CN_CONBOND',
        start_date='2018-01-01',
        end_date='2020-12-31'
    )
    
    m5 = M.cached.v3(
        input_1=m2.data,
        run=m5_run_bigquant_run,
        post_run=m5_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m6 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    double_low = close + bond_prem_ratio
    remain_size > 1.5
    """
    )
    
    m7 = M.derived_feature_extractor.v3(
        input_data=m1.data,
        features=m6.data,
        date_col='date',
        instrument_col='instrument',
        drop_na=False,
        remove_extra_columns=False,
        user_functions={}
    )
    
    m4 = M.cached.v3(
        input_1=m7.data,
        run=m4_run_bigquant_run,
        post_run=m4_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m3 = M.join.v3(
        data1=m4.data_1,
        data2=m5.data_1,
        on='instrument',
        how='inner',
        sort=False
    )
    
    m10 = M.cached.v3(
        input_1=m3.data,
        run=m10_run_bigquant_run,
        post_run=m10_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m8 = M.hftrade.v2(
        instruments=m9.instrument_list,
        options_data=m10.data_1,
        start_date='',
        end_date='',
        initialize=m8_initialize_bigquant_run,
        before_trading_start=m8_before_trading_start_bigquant_run,
        handle_tick=m8_handle_tick_bigquant_run,
        handle_data=m8_handle_data_bigquant_run,
        handle_trade=m8_handle_trade_bigquant_run,
        handle_order=m8_handle_order_bigquant_run,
        after_trading=m8_after_trading_bigquant_run,
        capital_base=1000001,
        frequency='daily',
        price_type='真实价格',
        product_type='可转债',
        before_start_days='0',
        volume_limit=1,
        order_price_field_buy='close',
        order_price_field_sell='close',
        benchmark='000300.HIX',
        plot_charts=True,
        disable_cache=False,
        replay_bdb=False,
        show_debug_info=False,
        backtest_only=False
    )
    
    initializing
    
    • 收益率36.93%
    • 年化收益率10.98%
    • 基准收益率27.5%
    • 阿尔法0.06
    • 贝塔0.38
    • 夏普比率0.67
    • 胜率0.55
    • 盈亏比2.56
    • 收益波动率12.96%
    • 信息比率0.0
    • 最大回撤14.77%
    bigcharts-data-start/{"__type":"tabs","__id":"bigchart-c4760e911465417fbe09c277a5be3371"}/bigcharts-data-end