复制链接
克隆策略

    {"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"-52:features","from_node_id":"-331:data"},{"to_node_id":"-52:instruments","from_node_id":"-312:data"},{"to_node_id":"-88:instruments","from_node_id":"-312:data"},{"to_node_id":"-250:instruments","from_node_id":"-312:data"},{"to_node_id":"-101:input_1","from_node_id":"-52:data"},{"to_node_id":"-783:input_1","from_node_id":"-52:data"},{"to_node_id":"-41:features","from_node_id":"-64:data"},{"to_node_id":"-783:input_2","from_node_id":"-64:data"},{"to_node_id":"-88:features","from_node_id":"-79:data"},{"to_node_id":"-95:input_data","from_node_id":"-88:data"},{"to_node_id":"-101:input_2","from_node_id":"-95:data"},{"to_node_id":"-250:options_data","from_node_id":"-101:data"},{"to_node_id":"-52:user_functions","from_node_id":"-726:functions"},{"to_node_id":"-41:user_factor_data","from_node_id":"-783:data_1"}],"nodes":[{"node_id":"-331","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"_amt = amount\n_ret = ret_sim(close, open)\nbig_order_ret = np.prod(1 + _ret*where(_amt >= _amt.sort_values(ascending=False).iloc[np.int(240*0.3-1)], 1, 0))\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-331"}],"output_ports":[{"name":"data","node_id":"-331"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-312","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2019-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-05-26","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":"0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-312"}],"output_ports":[{"name":"data","node_id":"-312"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-52","module_id":"BigQuantSpace.feature_extractor_1m.feature_extractor_1m-v2","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"20","type":"Literal","bound_global_parameter":null},{"name":"workers","value":"20","type":"Literal","bound_global_parameter":null},{"name":"parallel_mode","value":"集群","type":"Literal","bound_global_parameter":null},{"name":"table_1m","value":"level2_bar1m_CN_STOCK_A","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-52"},{"name":"features","node_id":"-52"},{"name":"user_functions","node_id":"-52"}],"output_ports":[{"name":"data","node_id":"-52"}],"cacheable":true,"seq_num":7,"comment":"V2","comment_collapsed":true},{"node_id":"-41","module_id":"BigQuantSpace.factorlens.factorlens-v1","parameters":[{"name":"title","value":"因子分析: {factor_name}","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2019-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-08-01","type":"Literal","bound_global_parameter":null},{"name":"rebalance_period","value":"2","type":"Literal","bound_global_parameter":null},{"name":"delay_rebalance_days","value":0,"type":"Literal","bound_global_parameter":null},{"name":"rebalance_price","value":"close_0","type":"Literal","bound_global_parameter":null},{"name":"stock_pool","value":"全市场","type":"Literal","bound_global_parameter":null},{"name":"quantile_count","value":"10","type":"Literal","bound_global_parameter":null},{"name":"commission_rate","value":"0.0002","type":"Literal","bound_global_parameter":null},{"name":"returns_calculation_method","value":"累乘","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"无","type":"Literal","bound_global_parameter":null},{"name":"drop_new_stocks","value":60,"type":"Literal","bound_global_parameter":null},{"name":"drop_price_limit_stocks","value":"False","type":"Literal","bound_global_parameter":null},{"name":"drop_st_stocks","value":"False","type":"Literal","bound_global_parameter":null},{"name":"drop_suspended_stocks","value":"False","type":"Literal","bound_global_parameter":null},{"name":"normalization","value":"False","type":"Literal","bound_global_parameter":null},{"name":"neutralization","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E8%A1%8C%E4%B8%9A%22%2C%22displayValue%22%3A%22%E8%A1%8C%E4%B8%9A%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%B8%82%E5%80%BC%22%2C%22displayValue%22%3A%22%E5%B8%82%E5%80%BC%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"metrics","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%A8%E7%8E%B0%E6%A6%82%E8%A7%88%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%A8%E7%8E%B0%E6%A6%82%E8%A7%88%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%8C%E4%B8%9A%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%8C%E4%B8%9A%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%B8%82%E5%80%BC%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%B8%82%E5%80%BC%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22IC%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22IC%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%B9%B0%E5%85%A5%E4%BF%A1%E5%8F%B7%E9%87%8D%E5%90%88%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E4%B9%B0%E5%85%A5%E4%BF%A1%E5%8F%B7%E9%87%8D%E5%90%88%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E4%BC%B0%E5%80%BC%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E4%BC%B0%E5%80%BC%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E6%8B%A5%E6%8C%A4%E5%BA%A6%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E6%8B%A5%E6%8C%A4%E5%BA%A6%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%80%BC%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E8%82%A1%E7%A5%A8%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%80%BC%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E8%82%A1%E7%A5%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%9B%A0%E5%AD%90%E5%80%BC%22%2C%22displayValue%22%3A%22%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%9B%A0%E5%AD%90%E5%80%BC%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%A4%9A%E5%9B%A0%E5%AD%90%E7%9B%B8%E5%85%B3%E6%80%A7%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%A4%9A%E5%9B%A0%E5%AD%90%E7%9B%B8%E5%85%B3%E6%80%A7%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"factor_coverage","value":0.5,"type":"Literal","bound_global_parameter":null},{"name":"user_data_merge","value":"inner","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features","node_id":"-41"},{"name":"user_factor_data","node_id":"-41"}],"output_ports":[{"name":"data","node_id":"-41"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-64","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"big_order_ret","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-64"}],"output_ports":[{"name":"data","node_id":"-64"}],"cacheable":true,"seq_num":9,"comment":"","comment_collapsed":true},{"node_id":"-79","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"in_csi500_0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-79"}],"output_ports":[{"name":"data","node_id":"-79"}],"cacheable":true,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"-88","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":90,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-88"},{"name":"features","node_id":"-88"}],"output_ports":[{"name":"data","node_id":"-88"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"node_id":"-95","module_id":"BigQuantSpace.filter.filter-v3","parameters":[{"name":"expr","value":"in_csi500_0 == 1","type":"Literal","bound_global_parameter":null},{"name":"output_left_data","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-95"}],"output_ports":[{"name":"data","node_id":"-95"},{"name":"left_data","node_id":"-95"}],"cacheable":true,"seq_num":14,"comment":"","comment_collapsed":true},{"node_id":"-101","module_id":"BigQuantSpace.data_join.data_join-v3","parameters":[{"name":"on","value":"date,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":"input_1","node_id":"-101"},{"name":"input_2","node_id":"-101"}],"output_ports":[{"name":"data","node_id":"-101"}],"cacheable":true,"seq_num":15,"comment":"","comment_collapsed":true},{"node_id":"-250","module_id":"BigQuantSpace.trade.trade-v4","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"def bigquant_run(context):\n \n context.ranker_prediction = context.options['data'].read_df()\n factor_name = [i for i in context.ranker_prediction.columns if i not in ['date','instrument','in_csi500_0']]\n print('因子名称:', factor_name)\n \n context.ranker_prediction.sort_values(['date',factor_name[0]], ascending=[True,False], inplace=True)\n context.ranker_prediction.rename(columns={factor_name[0]:'prediction'}, inplace=True)\n \n # 股票数量 \n context.stock_count = 100\n # 组合权重\n #context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, context.stock_count)])\n context.stock_weights = [1/ context.stock_count]* context.stock_count\n # 换仓频率\n context.rebalance_days = 1\n \n # 设置交易费用,买入是万三,卖出是千分之1.3,如果不足5元按5元算\n context.set_commission(PerOrder(buy_cost=0.00015, \n sell_cost=0.00015, min_cost=5))\n \n if 'index' not in context.extension:\n context.extension['index'] = 0","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n # 日期\n date = data.current_dt.strftime('%Y-%m-%d')\n context.extension['index'] += 1\n \n if context.extension['index'] % context.rebalance_days != 0:\n return \n\n \n cur_df = context.ranker_prediction[context.ranker_prediction['date'] == date]\n stock_to_buy = cur_df.instrument.tolist()[: context.stock_count]\n \n # 目前持仓列表 \n stock_hold_now = [equity.symbol 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 if data.can_trade(context.symbol(stock)):\n context.order_target_percent(context.symbol(stock), 0)\n \n if len(stock_to_buy) == 0:\n return\n \n # 执行买入\n for i in np.arange(len(stock_to_buy)):\n cp = stock_to_buy[i]\n weight = context.stock_weights[i]\n if data.can_trade(context.symbol(cp)):\n context.order_target_percent(context.symbol(cp), weight)","type":"Literal","bound_global_parameter":null},{"name":"prepare","value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"","type":"Literal","bound_global_parameter":null},{"name":"volume_limit","value":"0.025","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_buy","value":"open","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_sell","value":"close","type":"Literal","bound_global_parameter":null},{"name":"capital_base","value":"10000000","type":"Literal","bound_global_parameter":null},{"name":"auto_cancel_non_tradable_orders","value":"True","type":"Literal","bound_global_parameter":null},{"name":"data_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":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000905.HIX","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-250"},{"name":"options_data","node_id":"-250"},{"name":"history_ds","node_id":"-250"},{"name":"benchmark_ds","node_id":"-250"},{"name":"trading_calendar","node_id":"-250"}],"output_ports":[{"name":"raw_perf","node_id":"-250"}],"cacheable":false,"seq_num":11,"comment":"指数增强","comment_collapsed":false},{"node_id":"-726","module_id":"BigQuantSpace.feature_extractor_user_function.feature_extractor_user_function-v1","parameters":[{"name":"name","value":"ret_sim","type":"Literal","bound_global_parameter":null},{"name":"func","value":"def bigquant_run(df, close, op):\n res = close.pct_change()\n res.iloc[0] = close.iloc[0] / op.iloc[0] - 1\n return res\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_functions","node_id":"-726"}],"output_ports":[{"name":"functions","node_id":"-726"}],"cacheable":false,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-783","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 f = input_2.read()[0]\n df[f] = df[f] * -1\n data_1 = DataSource.write_df(df)\n return Outputs(data_1=data_1)","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":"-783"},{"name":"input_2","node_id":"-783"},{"name":"input_3","node_id":"-783"}],"output_ports":[{"name":"data_1","node_id":"-783"},{"name":"data_2","node_id":"-783"},{"name":"data_3","node_id":"-783"}],"cacheable":true,"seq_num":5,"comment":"因子值越大越好","comment_collapsed":false}],"node_layout":"<node_postions><node_position Node='-331' Position='-528,-803,200,200'/><node_position Node='-312' Position='-852,-733,200,200'/><node_position Node='-52' Position='-540,-603,200,200'/><node_position Node='-41' Position='-366.3339385986328,-237.62039184570312,200,200'/><node_position Node='-64' Position='-207,-466,200,200'/><node_position Node='-79' Position='-819,-376,200,200'/><node_position Node='-88' Position='-819,-303,200,200'/><node_position Node='-95' Position='-821,-246,200,200'/><node_position Node='-101' Position='-819,-166,200,200'/><node_position Node='-250' Position='-561,-73,200,200'/><node_position Node='-726' Position='-223,-712,200,200'/><node_position Node='-783' Position='-341,-369,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [6]:
    # 本代码由可视化策略环境自动生成 2022年7月2日 10:08
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    def m4_func_bigquant_run(df, close, op):
        res = close.pct_change()
        res.iloc[0] = close.iloc[0] / op.iloc[0] - 1
        return res
    
    def m11_initialize_bigquant_run(context):
        
        context.ranker_prediction = context.options['data'].read_df()
        factor_name = [i for i in context.ranker_prediction.columns if i not in ['date','instrument','in_csi500_0']]
        print('因子名称:', factor_name)
         
        context.ranker_prediction.sort_values(['date',factor_name[0]], ascending=[True,False], inplace=True)
        context.ranker_prediction.rename(columns={factor_name[0]:'prediction'}, inplace=True)
        
        # 股票数量        
        context.stock_count = 100
        # 组合权重
        #context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, context.stock_count)])
        context.stock_weights = [1/ context.stock_count]* context.stock_count
        # 换仓频率
        context.rebalance_days = 1
        
        # 设置交易费用,买入是万三,卖出是千分之1.3,如果不足5元按5元算
        context.set_commission(PerOrder(buy_cost=0.00015,   
                                            sell_cost=0.00015, min_cost=5))
     
        if 'index' not in context.extension:
             context.extension['index'] = 0
    # 回测引擎:每日数据处理函数,每天执行一次
    def m11_handle_data_bigquant_run(context, data):
        # 日期
        date = data.current_dt.strftime('%Y-%m-%d')
        context.extension['index'] += 1
        
        if  context.extension['index'] % context.rebalance_days != 0:
            return 
    
       
        cur_df = context.ranker_prediction[context.ranker_prediction['date'] == date]
        stock_to_buy = cur_df.instrument.tolist()[: context.stock_count]
            
        # 目前持仓列表    
        stock_hold_now = [equity.symbol 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:
            if data.can_trade(context.symbol(stock)):
                context.order_target_percent(context.symbol(stock), 0)
        
        if len(stock_to_buy) == 0:
            return
        
        # 执行买入
        for  i in np.arange(len(stock_to_buy)):
            cp = stock_to_buy[i]
            weight =  context.stock_weights[i]
            if data.can_trade(context.symbol(cp)):
                context.order_target_percent(context.symbol(cp), weight)
    # 回测引擎:准备数据,只执行一次
    def m11_prepare_bigquant_run(context):
        pass
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m5_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read() 
        f = input_2.read()[0]
        df[f] = df[f] * -1
        data_1 = DataSource.write_df(df)
        return Outputs(data_1=data_1)
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m5_post_run_bigquant_run(outputs):
        return outputs
    
    
    m1 = M.input_features.v1(
        features="""_amt = amount
    _ret = ret_sim(close, open)
    big_order_ret = np.prod(1 + _ret*where(_amt >= _amt.sort_values(ascending=False).iloc[np.int(240*0.3-1)], 1, 0))
    """
    )
    
    m2 = M.instruments.v2(
        start_date='2019-01-01',
        end_date='2022-05-26',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m9 = M.input_features.v1(
        features='big_order_ret'
    )
    
    m12 = M.input_features.v1(
        features='in_csi500_0'
    )
    
    m13 = M.general_feature_extractor.v7(
        instruments=m2.data,
        features=m12.data,
        start_date='',
        end_date='',
        before_start_days=90
    )
    
    m14 = M.filter.v3(
        input_data=m13.data,
        expr='in_csi500_0 == 1',
        output_left_data=False
    )
    
    m4 = M.feature_extractor_user_function.v1(
        name='ret_sim',
        func=m4_func_bigquant_run
    )
    
    m7 = M.feature_extractor_1m.v2(
        instruments=m2.data,
        features=m1.data,
        user_functions=m4.functions,
        start_date='',
        end_date='',
        before_start_days=20,
        workers=20,
        parallel_mode='集群',
        table_1m='level2_bar1m_CN_STOCK_A'
    )
    
    m15 = M.data_join.v3(
        input_1=m7.data,
        input_2=m14.data,
        on='date,instrument',
        how='inner',
        sort=False
    )
    
    m11 = M.trade.v4(
        instruments=m2.data,
        options_data=m15.data,
        start_date='',
        end_date='',
        initialize=m11_initialize_bigquant_run,
        handle_data=m11_handle_data_bigquant_run,
        prepare=m11_prepare_bigquant_run,
        volume_limit=0.025,
        order_price_field_buy='open',
        order_price_field_sell='close',
        capital_base=10000000,
        auto_cancel_non_tradable_orders=True,
        data_frequency='daily',
        price_type='真实价格',
        product_type='股票',
        plot_charts=True,
        backtest_only=False,
        benchmark='000905.HIX'
    )
    
    m5 = M.cached.v3(
        input_1=m7.data,
        input_2=m9.data,
        run=m5_run_bigquant_run,
        post_run=m5_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m8 = M.factorlens.v1(
        features=m9.data,
        user_factor_data=m5.data_1,
        title='因子分析: {factor_name}',
        start_date='2019-01-01',
        end_date='2022-08-01',
        rebalance_period=2,
        delay_rebalance_days=0,
        rebalance_price='close_0',
        stock_pool='全市场',
        quantile_count=10,
        commission_rate=0.0002,
        returns_calculation_method='累乘',
        benchmark='无',
        drop_new_stocks=60,
        drop_price_limit_stocks=False,
        drop_st_stocks=False,
        drop_suspended_stocks=False,
        normalization=False,
        neutralization=[],
        metrics=['因子表现概览', '因子分布', '因子行业分布', '因子市值分布', 'IC分析', '买入信号重合分析', '因子估值分析', '因子拥挤度分析', '因子值最大/最小股票', '表达式因子值', '多因子相关性分析'],
        factor_coverage=0.5,
        user_data_merge='inner'
    )
    

    因子分析: big_order_ret

    { "type": "factor-track", "data": { "exprs": ["big_order_ret"], "options": {"BacktestInterval": ["2019-01-01", "2022-08-01"], "Benchmark": "none", "StockPool": "all", "UserDataMerge": "inner", "DropSTStocks": 0, "DropPriceLimitStocks": 0, "DropNewStocks": 60, "DropSuspendedStocks": 0, "QuantileCount": 10, "CommissionRates": 0.0002, "Cutoutliers": 1, "Normalization": 0, "Neutralization": "", "DelayRebalanceDays": 0, "RebalancePeriod": 2, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "701e60fc1a4abfa6fe0173b644307153"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 51.97% 23.57% -6.43% 8.23% 0.38% -0.24% 29.97% 0.97 0.54 0.51 24.79%
    最大分位 -32.01% -20.17% -22.30% -4.90% -1.55% 0.13% 52.12% 0.86 0.52 -0.44 26.91%
    多空组合 46.97% 23.80% 9.43% 6.51% 0.96% -0.19% 7.69% 1.20 0.53 1.24 7.08%

    基本特征分析

    IC分析

    0.01

    0.09

    0.09

    80.89%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

    因子值最小的20只股票 (2022-05-26)

    股票名称 股票代码 因子值
    国茂股份 603915.SHA -1.2132
    金埔园林 301098.SZA -1.1447
    国瑞科技 300600.SZA -1.1415
    宝塔实业 000595.SZA -1.1366
    震裕科技 300953.SZA -1.1343
    麦迪科技 603990.SHA -1.1313
    青鸟消防 002960.SZA -1.1308
    迈信林 688685.SHA -1.1289
    苏文电能 300982.SZA -1.1284
    上海能源 600508.SHA -1.1282
    盛视科技 002990.SZA -1.1271
    开立医疗 300633.SZA -1.1266
    中文在线 300364.SZA -1.1261
    火炬电子 603678.SHA -1.1166
    退市游久 600652.SHA -1.1163
    禾盛新材 002290.SZA -1.1158
    粤传媒 002181.SZA -1.1150
    陕西建工 600248.SHA -1.1136
    贵人鸟 603555.SHA -1.1129
    德新交运 603032.SHA -1.1124

    因子值最大的20只股票 (2022-05-26)

    股票名称 股票代码 因子值
    奥普家居 603551.SHA -0.9041
    *ST腾信 300392.SZA -0.9041
    闽发铝业 002578.SZA -0.9017
    恒玄科技 688608.SHA -0.9005
    达志科技 300530.SZA -0.8996
    卓郎智能 600545.SHA -0.8982
    众源新材 603527.SHA -0.8975
    数源科技 000909.SZA -0.8932
    汇得科技 603192.SHA -0.8914
    友阿股份 002277.SZA -0.8889
    凤凰光学 600071.SHA -0.8813
    远东传动 002406.SZA -0.8804
    兴民智通 002355.SZA -0.8766
    浙江世宝 002703.SZA -0.8736
    万胜智能 300882.SZA -0.8723
    德力股份 002571.SZA -0.8591
    中岩大地 003001.SZA -0.8545
    浩物股份 000757.SZA -0.8528
    中水渔业 000798.SZA -0.8497
    英特集团 000411.SZA -0.8256