复制链接
克隆策略

    {"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:model","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:model"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data"},{"to_node_id":"-2130:data1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-1839:input_1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70:data"},{"to_node_id":"-86:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76:data"},{"to_node_id":"-2141:input_1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:data","from_node_id":"-86:data"},{"to_node_id":"-1839:input_2","from_node_id":"-1554:data"},{"to_node_id":"-2130:data2","from_node_id":"-1839:data_1"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81:options_data","from_node_id":"-2130:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:training_ds","from_node_id":"-2141:data_1"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2011-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2016-01-01","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":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15","module_id":"BigQuantSpace.advanced_auto_labeler.advanced_auto_labeler-v2","parameters":[{"name":"label_expr","value":"# #号开始的表示注释\n# 0. 每行一个,顺序执行,从第二个开始,可以使用label字段\n# 1. 可用数据字段见 {{web_host_url}}docs/data_history_data.html\n# 添加benchmark_前缀,可使用对应的benchmark数据\n# 2. 可用操作符和函数见 `表达式引擎 <{{web_host_url}}docs/big_expr.html>`_\n\n# 计算收益:5日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)\nshift(close, -5) / shift(open, -1)\n\n# 极值处理:用1%和99%分位的值做clip\nclip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))\n\n# 将分数映射到分类,这里使用20个分类\nall_wbins(label, 20)\n\n# 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)\nwhere(shift(high, -1) == shift(low, -1), NaN, label)\n","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.HIX","type":"Literal","bound_global_parameter":null},{"name":"drop_na_label","value":"True","type":"Literal","bound_global_parameter":null},{"name":"cast_label_int","value":"True","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\nreturn_5\nmf_net_amount_5\navg_mf_net_amount_10\nfs_net_profit_yoy_0\nrank_fs_net_profit_yoy_0\nsh_holder_avg_pct_3m_chng_0\nlist_days_0\nst_status_0\n\n\nta_ma(close_0, 5)\nta_ma(close_0, 10)\nta_ma(close_0, 20)\n# ta_ma(close_0, 60)\n# st_status_0\n# open_0\nclose_0\nhigh_0\nlow_20","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v6","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":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-29"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35","module_id":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v2","parameters":[{"name":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-35"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43","module_id":"BigQuantSpace.stock_ranker_train.stock_ranker_train-v5","parameters":[{"name":"learning_algorithm","value":"排序","type":"Literal","bound_global_parameter":null},{"name":"number_of_leaves","value":30,"type":"Literal","bound_global_parameter":null},{"name":"minimum_docs_per_leaf","value":1000,"type":"Literal","bound_global_parameter":null},{"name":"number_of_trees","value":20,"type":"Literal","bound_global_parameter":null},{"name":"learning_rate","value":0.1,"type":"Literal","bound_global_parameter":null},{"name":"max_bins","value":1023,"type":"Literal","bound_global_parameter":null},{"name":"feature_fraction","value":1,"type":"Literal","bound_global_parameter":null},{"name":"m_lazy_run","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"training_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"test_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"base_model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"}],"output_ports":[{"name":"model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"feature_gains","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"m_lazy_run","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53","module_id":"BigQuantSpace.join.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":"data1","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"},{"name":"data2","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"}],"cacheable":true,"seq_num":7,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60","module_id":"BigQuantSpace.stock_ranker_predict.stock_ranker_predict-v5","parameters":[{"name":"m_lazy_run","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"},{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"}],"output_ports":[{"name":"predictions","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"},{"name":"m_lazy_run","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2022-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2022-04-15","type":"Literal","bound_global_parameter":"交易日期"},{"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":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"cacheable":true,"seq_num":9,"comment":"预测数据,用于回测和模拟","comment_collapsed":false},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v6","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":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-70"}],"cacheable":true,"seq_num":10,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76","module_id":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v2","parameters":[{"name":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-76"}],"cacheable":true,"seq_num":11,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81","module_id":"BigQuantSpace.trade.trade-v3","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n # 按日期过滤得到今日的预测数据\n ranker_prediction = context.ranker_prediction[\n context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]\n \n print(ranker_prediction)\n\n# # 1. 资金分配\n# # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金\n# # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)\n# is_staging = context.trading_day_index < context.options['hold_days'] # 是否在建仓期间(前 hold_days 天)\n# cash_avg = context.portfolio.portfolio_value / context.options['hold_days']\n# cash_for_buy = min(context.portfolio.cash, (1 if is_staging else 1.5) * cash_avg)\n# cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)\n# positions = {e.symbol: p.amount * p.last_sale_price\n# for e, p in context.perf_tracker.position_tracker.positions.items()}\n\n# # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按机器学习算法预测的排序末位淘汰\n# if not is_staging and cash_for_sell > 0:\n# equities = {e.symbol: e for e, p in context.perf_tracker.position_tracker.positions.items()}\n# instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(\n# lambda x: x in equities and not context.has_unfinished_sell_order(equities[x]))])))\n# # print('rank order for sell %s' % instruments)\n# for instrument in instruments:\n# context.order_target(context.symbol(instrument), 0)\n# cash_for_sell -= positions[instrument]\n# if cash_for_sell <= 0:\n# break\n\n# # 3. 生成买入订单:按机器学习算法预测的排序,买入前面的stock_count只股票\n# buy_cash_weights = context.stock_weights\n# buy_instruments = list(ranker_prediction.instrument[:len(buy_cash_weights)])\n# max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument\n# for i, instrument in enumerate(buy_instruments):\n# cash = cash_for_buy * buy_cash_weights[i]\n# if cash > max_cash_per_instrument - positions.get(instrument, 0):\n# # 确保股票持仓量不会超过每次股票最大的占用资金量\n# cash = max_cash_per_instrument - positions.get(instrument, 0)\n# if cash > 0:\n# context.order_value(context.symbol(instrument), cash)\n","type":"Literal","bound_global_parameter":null},{"name":"prepare","value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"# 回测引擎:初始化函数,只执行一次\ndef bigquant_run(context):\n # 加载预测数据\n context.ranker_prediction = context.options['data'].read_df()\n\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))\n # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)\n # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只\n stock_count = 5\n # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]\n context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, stock_count)])\n # 设置每只股票占用的最大资金比例\n context.max_cash_per_instrument = 0.2\n context.options['hold_days'] = 5\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":1000000,"type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.HIX","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":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81"},{"name":"options_data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81"}],"output_ports":[{"name":"raw_perf","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-81"}],"cacheable":false,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84","module_id":"BigQuantSpace.dropnan.dropnan-v1","parameters":[],"input_ports":[{"name":"input_data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"node_id":"-86","module_id":"BigQuantSpace.dropnan.dropnan-v1","parameters":[],"input_ports":[{"name":"input_data","node_id":"-86"}],"output_ports":[{"name":"data","node_id":"-86"}],"cacheable":true,"seq_num":14,"comment":"","comment_collapsed":true},{"node_id":"-1554","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\n# close_0/mean(close_0,5)\n# close_0/mean(close_0,10)\n# close_0/mean(close_0,20)\n# close_0/open_0\n# open_0/mean(close_0,5)\n# open_0/mean(close_0,10)\n# open_0/mean(close_0,20)\n\n\n\n\n# ret_1=close/shift(close,1)\n# ret_3=close/shift(close,3)\n# volumepct_1=volume/shift(volume,1)\nvolume_ma5=mean(volume, 5)\nvolume_ma10=mean(volume, 10)\nbm_risk = where(volume_ma5 - volume_ma10<0,1,0)\n# bm_ret0=ret_1\n# bm_ret1=shift(bm_ret0,1)\n# bm_ret2=shift(bm_ret0,2)\n# bm_ret3=ret_3\n# bm_risk_v0=volumepct_1\n\n# bm_risk_v1=shift(bm_risk_v0,1)\n# bm_risk_v2=shift(bm_risk_v0,2)","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-1554"}],"output_ports":[{"name":"data","node_id":"-1554"}],"cacheable":true,"seq_num":15,"comment":"","comment_collapsed":true},{"node_id":"-1839","module_id":"BigQuantSpace.index_feature_extract.index_feature_extract-v3","parameters":[{"name":"before_days","value":"100","type":"Literal","bound_global_parameter":null},{"name":"index","value":"000001.HIX","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-1839"},{"name":"input_2","node_id":"-1839"}],"output_ports":[{"name":"data_1","node_id":"-1839"},{"name":"data_2","node_id":"-1839"}],"cacheable":true,"seq_num":16,"comment":"","comment_collapsed":true},{"node_id":"-2130","module_id":"BigQuantSpace.join.join-v3","parameters":[{"name":"on","value":"date","type":"Literal","bound_global_parameter":null},{"name":"how","value":"left","type":"Literal","bound_global_parameter":null},{"name":"sort","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"data1","node_id":"-2130"},{"name":"data2","node_id":"-2130"}],"output_ports":[{"name":"data","node_id":"-2130"}],"cacheable":true,"seq_num":17,"comment":"","comment_collapsed":true},{"node_id":"-2141","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_final = input_1.read()\n \n\n\n #去掉ST的股票\n df_final=df_final[df_final['st_status_0']==0]\n #选择3天前MA5下穿MA10,并且前天下跌,昨天上涨的股票\n df_final=df_final[df_final['ta_ma(close_0, 5)']>df_final['ta_ma(close_0, 10)']] \n df_final = df_final[df_final['ta_ma(close_0, 10)']>df_final['ta_ma(close_0, 20)']] \n df_final = df_final[df_final['close_0']==df_final['high_0']]\n# df_final = df_final[df_final['open_0']<df_final['ta_ma(close_0, 10)']]\n# df_final = df_final[df_final['close_0']>df_final['ta_ma(close_0, 5)']]\n# df_final = df_final[df_final['close_0']<df_final['low_20']]\n \n \n print('可用样本:',len(df_final))\n data_1=DataSource.write_df(df_final) \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":"-2141"},{"name":"input_2","node_id":"-2141"},{"name":"input_3","node_id":"-2141"}],"output_ports":[{"name":"data_1","node_id":"-2141"},{"name":"data_2","node_id":"-2141"},{"name":"data_3","node_id":"-2141"}],"cacheable":true,"seq_num":18,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-8' Position='211,64,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-15' Position='70,183,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='765,21,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-29' Position='381,188,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-35' Position='385,280,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-43' Position='665,619,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='249,375,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='857,715,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='1074,127,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-70' Position='1078,236,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-76' Position='1081,327,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-81' Position='1024,872,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-84' Position='376,467,200,200'/><node_position Node='-86' Position='1078,418,200,200'/><node_position Node='-1554' Position='1420,473,200,200'/><node_position Node='-1839' Position='1347,604,200,200'/><node_position Node='-2130' Position='1101.0440673828125,783.116943359375,200,200'/><node_position Node='-2141' Position='499.87322998046875,550.44873046875,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [2]:
    # 本代码由可视化策略环境自动生成 2022年4月16日 22:05
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m18_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df_final = input_1.read()
        
    
    
        #去掉ST的股票
        df_final=df_final[df_final['st_status_0']==0]
        #选择3天前MA5下穿MA10,并且前天下跌,昨天上涨的股票
        df_final=df_final[df_final['ta_ma(close_0, 5)']>df_final['ta_ma(close_0, 10)']] 
        df_final = df_final[df_final['ta_ma(close_0, 10)']>df_final['ta_ma(close_0, 20)']]                
        df_final = df_final[df_final['close_0']==df_final['high_0']]
    #     df_final = df_final[df_final['open_0']<df_final['ta_ma(close_0, 10)']]
    #     df_final = df_final[df_final['close_0']>df_final['ta_ma(close_0, 5)']]
    #     df_final = df_final[df_final['close_0']<df_final['low_20']]
        
        
        print('可用样本:',len(df_final))
        data_1=DataSource.write_df(df_final)  
        return Outputs(data_1=data_1, data_2=None, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m18_post_run_bigquant_run(outputs):
        return outputs
    
    # 回测引擎:每日数据处理函数,每天执行一次
    def m12_handle_data_bigquant_run(context, data):
        # 按日期过滤得到今日的预测数据
        ranker_prediction = context.ranker_prediction[
            context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]
        
        print(ranker_prediction)
    
    #     # 1. 资金分配
    #     # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金
    #     # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)
    #     is_staging = context.trading_day_index < context.options['hold_days'] # 是否在建仓期间(前 hold_days 天)
    #     cash_avg = context.portfolio.portfolio_value / context.options['hold_days']
    #     cash_for_buy = min(context.portfolio.cash, (1 if is_staging else 1.5) * cash_avg)
    #     cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)
    #     positions = {e.symbol: p.amount * p.last_sale_price
    #                  for e, p in context.perf_tracker.position_tracker.positions.items()}
    
    #     # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按机器学习算法预测的排序末位淘汰
    #     if not is_staging and cash_for_sell > 0:
    #         equities = {e.symbol: e for e, p in context.perf_tracker.position_tracker.positions.items()}
    #         instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(
    #                 lambda x: x in equities and not context.has_unfinished_sell_order(equities[x]))])))
    #         # print('rank order for sell %s' % instruments)
    #         for instrument in instruments:
    #             context.order_target(context.symbol(instrument), 0)
    #             cash_for_sell -= positions[instrument]
    #             if cash_for_sell <= 0:
    #                 break
    
    #     # 3. 生成买入订单:按机器学习算法预测的排序,买入前面的stock_count只股票
    #     buy_cash_weights = context.stock_weights
    #     buy_instruments = list(ranker_prediction.instrument[:len(buy_cash_weights)])
    #     max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument
    #     for i, instrument in enumerate(buy_instruments):
    #         cash = cash_for_buy * buy_cash_weights[i]
    #         if cash > max_cash_per_instrument - positions.get(instrument, 0):
    #             # 确保股票持仓量不会超过每次股票最大的占用资金量
    #             cash = max_cash_per_instrument - positions.get(instrument, 0)
    #         if cash > 0:
    #             context.order_value(context.symbol(instrument), cash)
    
    # 回测引擎:准备数据,只执行一次
    def m12_prepare_bigquant_run(context):
        pass
    
    # 回测引擎:初始化函数,只执行一次
    def m12_initialize_bigquant_run(context):
        # 加载预测数据
        context.ranker_prediction = context.options['data'].read_df()
    
        # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数
        context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))
        # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)
        # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只
        stock_count = 5
        # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]
        context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, stock_count)])
        # 设置每只股票占用的最大资金比例
        context.max_cash_per_instrument = 0.2
        context.options['hold_days'] = 5
    
    
    m1 = M.instruments.v2(
        start_date='2011-01-01',
        end_date='2016-01-01',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m2 = M.advanced_auto_labeler.v2(
        instruments=m1.data,
        label_expr="""# #号开始的表示注释
    # 0. 每行一个,顺序执行,从第二个开始,可以使用label字段
    # 1. 可用数据字段见 {{web_host_url}}docs/data_history_data.html
    #   添加benchmark_前缀,可使用对应的benchmark数据
    # 2. 可用操作符和函数见 `表达式引擎 <{{web_host_url}}docs/big_expr.html>`_
    
    # 计算收益:5日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)
    shift(close, -5) / shift(open, -1)
    
    # 极值处理:用1%和99%分位的值做clip
    clip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))
    
    # 将分数映射到分类,这里使用20个分类
    all_wbins(label, 20)
    
    # 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)
    where(shift(high, -1) == shift(low, -1), NaN, label)
    """,
        start_date='',
        end_date='',
        benchmark='000300.HIX',
        drop_na_label=True,
        cast_label_int=True
    )
    
    m3 = M.input_features.v1(
        features="""# #号开始的表示注释
    # 多个特征,每行一个,可以包含基础特征和衍生特征
    return_5
    mf_net_amount_5
    avg_mf_net_amount_10
    fs_net_profit_yoy_0
    rank_fs_net_profit_yoy_0
    sh_holder_avg_pct_3m_chng_0
    list_days_0
    st_status_0
    
    
    ta_ma(close_0, 5)
    ta_ma(close_0, 10)
    ta_ma(close_0, 20)
    # ta_ma(close_0, 60)
    # st_status_0
    # open_0
    close_0
    high_0
    low_20"""
    )
    
    m4 = M.general_feature_extractor.v6(
        instruments=m1.data,
        features=m3.data,
        start_date='',
        end_date='',
        before_start_days=0
    )
    
    m5 = M.derived_feature_extractor.v2(
        input_data=m4.data,
        features=m3.data,
        date_col='date',
        instrument_col='instrument'
    )
    
    m7 = M.join.v3(
        data1=m2.data,
        data2=m5.data,
        on='date,instrument',
        how='inner',
        sort=False
    )
    
    m13 = M.dropnan.v1(
        input_data=m7.data
    )
    
    m18 = M.cached.v3(
        input_1=m13.data,
        run=m18_run_bigquant_run,
        post_run=m18_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m6 = M.stock_ranker_train.v5(
        training_ds=m18.data_1,
        features=m3.data,
        learning_algorithm='排序',
        number_of_leaves=30,
        minimum_docs_per_leaf=1000,
        number_of_trees=20,
        learning_rate=0.1,
        max_bins=1023,
        feature_fraction=1,
        m_lazy_run=False
    )
    
    m9 = M.instruments.v2(
        start_date=T.live_run_param('trading_date', '2022-01-01'),
        end_date=T.live_run_param('trading_date', '2022-04-15'),
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m10 = M.general_feature_extractor.v6(
        instruments=m9.data,
        features=m3.data,
        start_date='',
        end_date='',
        before_start_days=0
    )
    
    m11 = M.derived_feature_extractor.v2(
        input_data=m10.data,
        features=m3.data,
        date_col='date',
        instrument_col='instrument'
    )
    
    m14 = M.dropnan.v1(
        input_data=m11.data
    )
    
    m8 = M.stock_ranker_predict.v5(
        model=m6.model,
        data=m14.data,
        m_lazy_run=False
    )
    
    m15 = M.input_features.v1(
        features="""# #号开始的表示注释
    # 多个特征,每行一个,可以包含基础特征和衍生特征
    # close_0/mean(close_0,5)
    # close_0/mean(close_0,10)
    # close_0/mean(close_0,20)
    # close_0/open_0
    # open_0/mean(close_0,5)
    # open_0/mean(close_0,10)
    # open_0/mean(close_0,20)
    
    
    
    
    # ret_1=close/shift(close,1)
    # ret_3=close/shift(close,3)
    # volumepct_1=volume/shift(volume,1)
    volume_ma5=mean(volume, 5)
    volume_ma10=mean(volume, 10)
    bm_risk = where(volume_ma5 - volume_ma10<0,1,0)
    # bm_ret0=ret_1
    # bm_ret1=shift(bm_ret0,1)
    # bm_ret2=shift(bm_ret0,2)
    # bm_ret3=ret_3
    # bm_risk_v0=volumepct_1
    
    # bm_risk_v1=shift(bm_risk_v0,1)
    # bm_risk_v2=shift(bm_risk_v0,2)"""
    )
    
    m16 = M.index_feature_extract.v3(
        input_1=m9.data,
        input_2=m15.data,
        before_days=100,
        index='000001.HIX'
    )
    
    m17 = M.join.v3(
        data1=m8.predictions,
        data2=m16.data_1,
        on='date',
        how='left',
        sort=False
    )
    
    m12 = M.trade.v3(
        instruments=m9.data,
        options_data=m17.data,
        start_date='',
        end_date='',
        handle_data=m12_handle_data_bigquant_run,
        prepare=m12_prepare_bigquant_run,
        initialize=m12_initialize_bigquant_run,
        volume_limit=0.025,
        order_price_field_buy='open',
        order_price_field_sell='close',
        capital_base=1000000,
        benchmark='000300.HIX',
        auto_cancel_non_tradable_orders=True,
        data_frequency='daily',
        price_type='真实价格',
        plot_charts=True,
        backtest_only=False
    )
    
    可用样本: 43394
    
    设置测试数据集,查看训练迭代过程的NDCG
    bigcharts-data-start/{"__type":"tabs","__id":"bigchart-cecaf06dc6a94fe3894e1a7a94d99950"}/bigcharts-data-end
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
    Empty DataFrame
    Columns: [date, instrument, score, position, bm_risk]
    Index: []
               date  instrument     score  position  bm_risk
    0    2022-01-19  601606.SHA  1.474792         1        1
    1    2022-01-19  300821.SZA  1.449282         2        1
    2    2022-01-19  300779.SZA  1.432780         3        1
    3    2022-01-19  603133.SHA  1.410915         4        1
    4    2022-01-19  000993.SZA  1.384257         5        1
    ...         ...         ...       ...       ...      ...
    3916 2022-01-19  300846.SZA -1.038061      3917        1
    3917 2022-01-19  603288.SHA -1.073313      3918        1
    3918 2022-01-19  000810.SZA -1.077655      3919        1
    3919 2022-01-19  688180.SHA -1.086108      3920        1
    3920 2022-01-19  300467.SZA -1.498861      3921        1
    
    [3921 rows x 5 columns]
               date  instrument     score  position  bm_risk
    3921 2022-01-20  603536.SHA  1.381605         1        1
    3922 2022-01-20  601258.SHA  1.379235         2        1
    3923 2022-01-20  300830.SZA  1.376845         3        1
    3924 2022-01-20  300565.SZA  1.372861         4        1
    3925 2022-01-20  000545.SZA  1.358186         5        1
    ...         ...         ...       ...       ...      ...
    7849 2022-01-20  002371.SZA -1.002996      3929        1
    7850 2022-01-20  300603.SZA -1.022795      3930        1
    7851 2022-01-20  300204.SZA -1.049138      3931        1
    7852 2022-01-20  688180.SHA -1.096436      3932        1
    7853 2022-01-20  000419.SZA -1.305946      3933        1
    
    [3933 rows x 5 columns]
                date  instrument     score  position  bm_risk
    7854  2022-01-21  601919.SHA  1.378418         1        1
    7855  2022-01-21  605388.SHA  1.354167         2        1
    7856  2022-01-21  002433.SZA  1.347367         3        1
    7857  2022-01-21  300466.SZA  1.321776         4        1
    7858  2022-01-21  603626.SHA  1.302583         5        1
    ...          ...         ...       ...       ...      ...
    11784 2022-01-21  300603.SZA -1.083216      3931        1
    11785 2022-01-21  603716.SHA -1.120800      3932        1
    11786 2022-01-21  300199.SZA -1.120849      3933        1
    11787 2022-01-21  002349.SZA -1.124152      3934        1
    11788 2022-01-21  000953.SZA -1.145841      3935        1
    
    [3935 rows x 5 columns]
                date  instrument     score  position  bm_risk
    11789 2022-01-24  601011.SHA  1.416285         1        1
    11790 2022-01-24  688081.SHA  1.414982         2        1
    11791 2022-01-24  002808.SZA  1.411359         3        1
    11792 2022-01-24  603133.SHA  1.410915         4        1
    11793 2022-01-24  300798.SZA  1.403575         5        1
    ...          ...         ...       ...       ...      ...
    15720 2022-01-24  000002.SZA -1.007554      3932        1
    15721 2022-01-24  600132.SHA -1.013326      3933        1
    15722 2022-01-24  002241.SZA -1.013589      3934        1
    15723 2022-01-24  002371.SZA -1.013589      3935        1
    15724 2022-01-24  603887.SHA -1.128796      3936        1
    
    [3936 rows x 5 columns]
                date  instrument     score  position  bm_risk
    15725 2022-01-25  600010.SHA  1.421567         1        1
    15726 2022-01-25  002255.SZA  1.410858         2        1
    15727 2022-01-25  601919.SHA  1.378418         3        1
    15728 2022-01-25  601600.SHA  1.373396         4        1
    15729 2022-01-25  600688.SHA  1.352347         5        1
    ...          ...         ...       ...       ...      ...
    19657 2022-01-25  600250.SHA -0.949486      3933        1
    19658 2022-01-25  600756.SHA -0.960443      3934        1
    19659 2022-01-25  002475.SZA -1.020266      3935        1
    19660 2022-01-25  002371.SZA -1.052618      3936        1
    19661 2022-01-25  002153.SZA -1.058788      3937        1
    
    [3937 rows x 5 columns]
                date  instrument     score  position  bm_risk
    19662 2022-01-26  300823.SZA  1.432616         1        1
    19663 2022-01-26  002225.SZA  1.419221         2        1
    19664 2022-01-26  300846.SZA  1.416171         3        1
    19665 2022-01-26  603615.SHA  1.402208         4        1
    19666 2022-01-26  300004.SZA  1.393108         5        1
    ...          ...         ...       ...       ...      ...
    23596 2022-01-26  002528.SZA -0.966989      3935        1
    23597 2022-01-26  300763.SZA -0.969782      3936        1
    23598 2022-01-26  300316.SZA -0.986954      3937        1
    23599 2022-01-26  002371.SZA -1.052618      3938        1
    23600 2022-01-26  600250.SHA -1.141024      3939        1
    
    [3939 rows x 5 columns]
                date  instrument     score  position  bm_risk
    23601 2022-01-27  601919.SHA  1.384257         1        1
    23602 2022-01-27  000993.SZA  1.334219         2        1
    23603 2022-01-27  601168.SHA  1.330482         3        1
    23604 2022-01-27  000791.SZA  1.276464         4        1
    23605 2022-01-27  002075.SZA  1.238060         5        1
    ...          ...         ...       ...       ...      ...
    27539 2022-01-27  000002.SZA -0.945183      3939        1
    27540 2022-01-27  000038.SZA -0.961657      3940        1
    27541 2022-01-27  002304.SZA -1.009833      3941        1
    27542 2022-01-27  000611.SZA -1.025566      3942        1
    27543 2022-01-27  002475.SZA -1.073896      3943        1
    
    [3943 rows x 5 columns]
                date  instrument     score  position  bm_risk
    27544 2022-01-28  688365.SHA  1.442637         1        1
    27545 2022-01-28  603133.SHA  1.410915         2        1
    27546 2022-01-28  603615.SHA  1.402208         3        1
    27547 2022-01-28  300032.SZA  1.384257         4        1
    27548 2022-01-28  601258.SHA  1.379235         5        1
    ...          ...         ...       ...       ...      ...
    31483 2022-01-28  002241.SZA -0.968742      3940        1
    31484 2022-01-28  002304.SZA -1.009833      3941        1
    31485 2022-01-28  000038.SZA -1.013379      3942        1
    31486 2022-01-28  300059.SZA -1.052618      3943        1
    31487 2022-01-28  688390.SHA -1.117699      3944        1
    
    [3944 rows x 5 columns]
                date  instrument     score  position  bm_risk
    31488 2022-02-07  600010.SHA  1.421567         1        1
    31489 2022-02-07  600707.SHA  1.392116         2        1
    31490 2022-02-07  000725.SZA  1.384257         3        1
    31491 2022-02-07  000949.SZA  1.384257         4        1
    31492 2022-02-07  601606.SHA  1.381605         5        1
    ...          ...         ...       ...       ...      ...
    35425 2022-02-07  000038.SZA -0.965909      3938        1
    35426 2022-02-07  002487.SZA -1.029174      3939        1
    35427 2022-02-07  603606.SHA -1.039435      3940        1
    35428 2022-02-07  300059.SZA -1.052618      3941        1
    35429 2022-02-07  002475.SZA -1.073896      3942        1
    
    [3942 rows x 5 columns]
                date  instrument     score  position  bm_risk
    35430 2022-02-08  300080.SZA  1.343858         1        1
    35431 2022-02-08  601882.SHA  1.222747         2        1
    35432 2022-02-08  002069.SZA  1.213814         3        1
    35433 2022-02-08  300148.SZA  1.207850         4        1
    35434 2022-02-08  600090.SHA  1.151712         5        1
    ...          ...         ...       ...       ...      ...
    39366 2022-02-08  600298.SHA -0.949191      3937        1
    39367 2022-02-08  002464.SZA -1.001671      3938        1
    39368 2022-02-08  600112.SHA -1.002754      3939        1
    39369 2022-02-08  600228.SHA -1.096674      3940        1
    39370 2022-02-08  300675.SZA -1.181217      3941        1
    
    [3941 rows x 5 columns]
                date  instrument     score  position  bm_risk
    39371 2022-02-09  603238.SHA  1.466695         1        0
    39372 2022-02-09  300825.SZA  1.408831         2        0
    39373 2022-02-09  603536.SHA  1.388312         3        0
    39374 2022-02-09  300466.SZA  1.378822         4        0
    39375 2022-02-09  601919.SHA  1.366722         5        0
    ...          ...         ...       ...       ...      ...
    43314 2022-02-09  600191.SHA -1.059619      3944        0
    43315 2022-02-09  600751.SHA -1.111594      3945        0
    43316 2022-02-09  002464.SZA -1.130728      3946        0
    43317 2022-02-09  600228.SHA -1.146282      3947        0
    43318 2022-02-09  002663.SZA -1.155023      3948        0
    
    [3948 rows x 5 columns]
                date  instrument     score  position  bm_risk
    43319 2022-02-10  002909.SZA  1.466695         1        0
    43320 2022-02-10  603536.SHA  1.375218         2        0
    43321 2022-02-10  300869.SZA  1.200863         3        0
    43322 2022-02-10  300733.SZA  1.188256         4        0
    43323 2022-02-10  603997.SHA  1.149313         5        0
    ...          ...         ...       ...       ...      ...
    47263 2022-02-10  600191.SHA -1.072336      3945        0
    47264 2022-02-10  600055.SHA -1.112428      3946        0
    47265 2022-02-10  000514.SZA -1.200170      3947        0
    47266 2022-02-10  002464.SZA -1.205257      3948        0
    47267 2022-02-10  000419.SZA -1.277877      3949        0
    
    [3949 rows x 5 columns]
                date  instrument     score  position  bm_risk
    47268 2022-02-11  300606.SZA  1.457256         1        0
    47269 2022-02-11  300825.SZA  1.440841         2        0
    47270 2022-02-11  300080.SZA  1.428668         3        0
    47271 2022-02-11  300464.SZA  1.422241         4        0
    47272 2022-02-11  603615.SHA  1.402208         5        0
    ...          ...         ...       ...       ...      ...
    51212 2022-02-11  000622.SZA -1.155935      3945        0
    51213 2022-02-11  600250.SHA -1.159321      3946        0
    51214 2022-02-11  600775.SHA -1.168442      3947        0
    51215 2022-02-11  000514.SZA -1.175266      3948        0
    51216 2022-02-11  000965.SZA -1.233876      3949        0
    
    [3949 rows x 5 columns]
                date  instrument     score  position  bm_risk
    51217 2022-02-14  002909.SZA  1.466695         1        0
    51218 2022-02-14  002225.SZA  1.419221         2        0
    51219 2022-02-14  300335.SZA  1.405374         3        0
    51220 2022-02-14  002451.SZA  1.404418         4        0
    51221 2022-02-14  000725.SZA  1.378418         5        0
    ...          ...         ...       ...       ...      ...
    55162 2022-02-14  000953.SZA -1.058231      3946        0
    55163 2022-02-14  300171.SZA -1.087591      3947        0
    55164 2022-02-14  002336.SZA -1.121532      3948        0
    55165 2022-02-14  000955.SZA -1.187625      3949        0
    55166 2022-02-14  600775.SHA -1.257111      3950        0
    
    [3950 rows x 5 columns]
                date  instrument     score  position  bm_risk
    55167 2022-02-15  002076.SZA  1.430238         1        0
    55168 2022-02-15  603536.SHA  1.427225         2        0
    55169 2022-02-15  300565.SZA  1.423795         3        0
    55170 2022-02-15  600010.SHA  1.421567         4        0
    55171 2022-02-15  002225.SZA  1.419221         5        0
    ...          ...         ...       ...       ...      ...
    59113 2022-02-15  002104.SZA -0.974853      3947        0
    59114 2022-02-15  300199.SZA -0.986144      3948        0
    59115 2022-02-15  600555.SHA -1.041441      3949        0
    59116 2022-02-15  300546.SZA -1.151705      3950        0
    59117 2022-02-15  600775.SHA -1.175266      3951        0
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    59118 2022-02-16  002076.SZA  1.430238         1        1
    59119 2022-02-16  300828.SZA  1.423258         2        1
    59120 2022-02-16  300825.SZA  1.397580         3        1
    59121 2022-02-16  603133.SHA  1.388312         4        1
    59122 2022-02-16  002909.SZA  1.381886         5        1
    ...          ...         ...       ...       ...      ...
    63064 2022-02-16  603030.SHA -1.073782      3947        1
    63065 2022-02-16  002475.SZA -1.073896      3948        1
    63066 2022-02-16  000596.SZA -1.081466      3949        1
    63067 2022-02-16  300390.SZA -1.189553      3950        1
    63068 2022-02-16  300363.SZA -1.238494      3951        1
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    63069 2022-02-17  300670.SZA  1.391536         1        1
    63070 2022-02-17  300565.SZA  1.388312         2        1
    63071 2022-02-17  300289.SZA  1.342174         3        1
    63072 2022-02-17  002996.SZA  1.324497         4        1
    63073 2022-02-17  002627.SZA  1.321292         5        1
    ...          ...         ...       ...       ...      ...
    67015 2022-02-17  002371.SZA -0.961287      3947        1
    67016 2022-02-17  002241.SZA -0.968742      3948        1
    67017 2022-02-17  300390.SZA -0.969098      3949        1
    67018 2022-02-17  300751.SZA -0.976610      3950        1
    67019 2022-02-17  300363.SZA -1.045691      3951        1
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    67020 2022-02-18  000725.SZA  1.378418         1        1
    67021 2022-02-18  601919.SHA  1.378418         2        1
    67022 2022-02-18  600961.SHA  1.270805         3        1
    67023 2022-02-18  601991.SHA  1.180629         4        1
    67024 2022-02-18  688215.SHA  1.153641         5        1
    ...          ...         ...       ...       ...      ...
    70967 2022-02-18  002475.SZA -1.073896      3948        1
    70968 2022-02-18  002756.SZA -1.081948      3949        1
    70969 2022-02-18  002371.SZA -1.098045      3950        1
    70970 2022-02-18  300390.SZA -1.100595      3951        1
    70971 2022-02-18  601069.SHA -1.114301      3952        1
    
    [3952 rows x 5 columns]
                date  instrument     score  position  bm_risk
    70972 2022-02-21  603536.SHA  1.413729         1        1
    70973 2022-02-21  002996.SZA  1.324497         2        1
    70974 2022-02-21  002627.SZA  1.321292         3        1
    70975 2022-02-21  300004.SZA  1.305350         4        1
    70976 2022-02-21  605388.SHA  1.300234         5        1
    ...          ...         ...       ...       ...      ...
    74919 2022-02-21  600387.SHA -1.078835      3948        1
    74920 2022-02-21  300250.SZA -1.079440      3949        1
    74921 2022-02-21  000908.SZA -1.099133      3950        1
    74922 2022-02-21  000889.SZA -1.111909      3951        1
    74923 2022-02-21  600055.SHA -1.377569      3952        1
    
    [3952 rows x 5 columns]
                date  instrument     score  position  bm_risk
    74924 2022-02-22  688088.SHA  1.294807         1        1
    74925 2022-02-22  603787.SHA  1.263874         2        1
    74926 2022-02-22  002623.SZA  1.242272         3        1
    74927 2022-02-22  300317.SZA  1.238045         4        1
    74928 2022-02-22  688336.SHA  1.236445         5        1
    ...          ...         ...       ...       ...      ...
    78870 2022-02-22  600438.SHA -1.056515      3947        1
    78871 2022-02-22  600048.SHA -1.114797      3948        1
    78872 2022-02-22  600260.SHA -1.201387      3949        1
    78873 2022-02-22  600055.SHA -1.225921      3950        1
    78874 2022-02-22  300763.SZA -1.258556      3951        1
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    78875 2022-02-23  300606.SZA  1.457256         1        1
    78876 2022-02-23  000993.SZA  1.447721         2        1
    78877 2022-02-23  300464.SZA  1.422241         3        1
    78878 2022-02-23  002225.SZA  1.415875         4        1
    78879 2022-02-23  603626.SHA  1.395931         5        1
    ...          ...         ...       ...       ...      ...
    82821 2022-02-23  300661.SZA -1.068289      3947        1
    82822 2022-02-23  300555.SZA -1.077920      3948        1
    82823 2022-02-23  300313.SZA -1.168778      3949        1
    82824 2022-02-23  600260.SHA -1.320853      3950        1
    82825 2022-02-23  600055.SHA -1.335770      3951        1
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    82826 2022-02-24  300825.SZA  1.480567         1        0
    82827 2022-02-24  300335.SZA  1.405374         2        0
    82828 2022-02-24  600010.SHA  1.378418         3        0
    82829 2022-02-24  002909.SZA  1.374756         4        0
    82830 2022-02-24  300779.SZA  1.355950         5        0
    ...          ...         ...       ...       ...      ...
    86773 2022-02-24  600438.SHA -1.056515      3948        0
    86774 2022-02-24  300204.SZA -1.067040      3949        0
    86775 2022-02-24  600797.SHA -1.075741      3950        0
    86776 2022-02-24  600260.SHA -1.216920      3951        0
    86777 2022-02-24  300199.SZA -1.225252      3952        0
    
    [3952 rows x 5 columns]
                date  instrument     score  position  bm_risk
    86778 2022-02-25  300150.SZA  1.432834         1        0
    86779 2022-02-25  002225.SZA  1.419221         2        0
    86780 2022-02-25  300798.SZA  1.409114         3        0
    86781 2022-02-25  002076.SZA  1.380911         4        0
    86782 2022-02-25  601919.SHA  1.378418         5        0
    ...          ...         ...       ...       ...      ...
    90725 2022-02-25  300250.SZA -1.072463      3948        0
    90726 2022-02-25  002268.SZA -1.075610      3949        0
    90727 2022-02-25  000017.SZA -1.090451      3950        0
    90728 2022-02-25  002172.SZA -1.099133      3951        0
    90729 2022-02-25  300738.SZA -1.136220      3952        0
    
    [3952 rows x 5 columns]
                date  instrument     score  position  bm_risk
    90730 2022-02-28  300335.SZA  1.454701         1        0
    90731 2022-02-28  002225.SZA  1.419221         2        0
    90732 2022-02-28  300719.SZA  1.407908         3        0
    90733 2022-02-28  300798.SZA  1.403575         4        0
    90734 2022-02-28  000993.SZA  1.402670         5        0
    ...          ...         ...       ...       ...      ...
    94676 2022-02-28  600438.SHA -0.945776      3947        0
    94677 2022-02-28  600807.SHA -0.946136      3948        0
    94678 2022-02-28  600091.SHA -0.951986      3949        0
    94679 2022-02-28  300763.SZA -0.963708      3950        0
    94680 2022-02-28  300199.SZA -0.985575      3951        0
    
    [3951 rows x 5 columns]
                date  instrument     score  position  bm_risk
    94681 2022-03-01  601606.SHA  1.423795         1        0
    94682 2022-03-01  002442.SZA  1.390446         2        0
    94683 2022-03-01  002112.SZA  1.342665         3        0
    94684 2022-03-01  002909.SZA  1.314535         4        0
    94685 2022-03-01  603133.SHA  1.288052         5        0
    ...          ...         ...       ...       ...      ...
    98628 2022-03-01  002241.SZA -0.951218      3948        0
    98629 2022-03-01  601012.SHA -1.052218      3949        0
    98630 2022-03-01  600438.SHA -1.056515      3950        0
    98631 2022-03-01  300059.SZA -1.098045      3951        0
    98632 2022-03-01  300584.SZA -1.113873      3952        0
    
    [3952 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    98633  2022-03-02  300846.SZA  1.474714         1        0
    98634  2022-03-02  688081.SHA  1.371720         2        0
    98635  2022-03-02  300825.SZA  1.362508         3        0
    98636  2022-03-02  603378.SHA  1.344867         4        0
    98637  2022-03-02  300545.SZA  1.338118         5        0
    ...           ...         ...       ...       ...      ...
    102579 2022-03-02  300059.SZA -1.139049      3947        0
    102580 2022-03-02  600091.SHA -1.177149      3948        0
    102581 2022-03-02  000835.SZA -1.197652      3949        0
    102582 2022-03-02  600249.SHA -1.237838      3950        0
    102583 2022-03-02  000953.SZA -1.252508      3951        0
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    102584 2022-03-03  601606.SHA  1.405076         1        0
    102585 2022-03-03  688081.SHA  1.371720         2        0
    102586 2022-03-03  002112.SZA  1.333858         3        0
    102587 2022-03-03  300828.SZA  1.312914         4        0
    102588 2022-03-03  688189.SHA  1.305687         5        0
    ...           ...         ...       ...       ...      ...
    106530 2022-03-03  002164.SZA -1.130426      3947        0
    106531 2022-03-03  002583.SZA -1.153358      3948        0
    106532 2022-03-03  000911.SZA -1.161497      3949        0
    106533 2022-03-03  000835.SZA -1.194999      3950        0
    106534 2022-03-03  603963.SHA -1.237345      3951        0
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    106535 2022-03-04  002225.SZA  1.419221         1        1
    106536 2022-03-04  603997.SHA  1.394619         2        1
    106537 2022-03-04  603313.SHA  1.388735         3        1
    106538 2022-03-04  300823.SZA  1.362508         4        1
    106539 2022-03-04  000595.SZA  1.351079         5        1
    ...           ...         ...       ...       ...      ...
    110482 2022-03-04  002503.SZA -1.059536      3948        1
    110483 2022-03-04  300199.SZA -1.070887      3949        1
    110484 2022-03-04  600365.SHA -1.143855      3950        1
    110485 2022-03-04  600056.SHA -1.158177      3951        1
    110486 2022-03-04  002626.SZA -1.426290      3952        1
    
    [3952 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    110487 2022-03-07  300846.SZA  1.443504         1        1
    110488 2022-03-07  300779.SZA  1.355950         2        1
    110489 2022-03-07  002969.SZA  1.343561         3        1
    110490 2022-03-07  603220.SHA  1.341306         4        1
    110491 2022-03-07  600010.SHA  1.333367         5        1
    ...           ...         ...       ...       ...      ...
    114432 2022-03-07  300468.SZA -1.027648      3946        1
    114433 2022-03-07  600056.SHA -1.041946      3947        1
    114434 2022-03-07  600365.SHA -1.069907      3948        1
    114435 2022-03-07  000911.SZA -1.120679      3949        1
    114436 2022-03-07  300584.SZA -1.169885      3950        1
    
    [3950 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    114437 2022-03-08  300780.SZA  1.467022         1        0
    114438 2022-03-08  002893.SZA  1.444301         2        0
    114439 2022-03-08  300846.SZA  1.437665         3        0
    114440 2022-03-08  002076.SZA  1.430238         4        0
    114441 2022-03-08  002225.SZA  1.419221         5        0
    ...           ...         ...       ...       ...      ...
    118379 2022-03-08  600056.SHA -0.988954      3943        0
    118380 2022-03-08  000150.SZA -1.029321      3944        0
    118381 2022-03-08  600510.SHA -1.081075      3945        0
    118382 2022-03-08  002499.SZA -1.125736      3946        0
    118383 2022-03-08  600250.SHA -1.159321      3947        0
    
    [3947 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    118384 2022-03-09  300565.SZA  1.427225         1        0
    118385 2022-03-09  300828.SZA  1.423258         2        0
    118386 2022-03-09  605388.SHA  1.421422         3        0
    118387 2022-03-09  002225.SZA  1.419221         4        0
    118388 2022-03-09  603615.SHA  1.402208         5        0
    ...           ...         ...       ...       ...      ...
    122324 2022-03-09  600589.SHA -0.991103      3941        0
    122325 2022-03-09  600668.SHA -1.040034      3942        0
    122326 2022-03-09  300603.SZA -1.067151      3943        0
    122327 2022-03-09  600510.SHA -1.118866      3944        0
    122328 2022-03-09  002499.SZA -1.271086      3945        0
    
    [3945 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    122329 2022-03-10  600010.SHA  1.421567         1        0
    122330 2022-03-10  002928.SZA  1.405552         2        0
    122331 2022-03-10  300828.SZA  1.400606         3        0
    122332 2022-03-10  603615.SHA  1.379605         4        0
    122333 2022-03-10  601258.SHA  1.379235         5        0
    ...           ...         ...       ...       ...      ...
    126270 2022-03-10  600589.SHA -1.095965      3942        0
    126271 2022-03-10  600668.SHA -1.117450      3943        0
    126272 2022-03-10  002868.SZA -1.123221      3944        0
    126273 2022-03-10  600510.SHA -1.177428      3945        0
    126274 2022-03-10  002776.SZA -1.192230      3946        0
    
    [3946 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    126275 2022-03-11  603313.SHA  1.437562         1        0
    126276 2022-03-11  688081.SHA  1.374746         2        0
    126277 2022-03-11  002114.SZA  1.370251         3        0
    126278 2022-03-11  000993.SZA  1.360504         4        0
    126279 2022-03-11  603626.SHA  1.329028         5        0
    ...           ...         ...       ...       ...      ...
    130217 2022-03-11  600199.SHA -1.051572      3943        0
    130218 2022-03-11  002776.SZA -1.075161      3944        0
    130219 2022-03-11  002951.SZA -1.137917      3945        0
    130220 2022-03-11  603963.SHA -1.150183      3946        0
    130221 2022-03-11  600510.SHA -1.197899      3947        0
    
    [3947 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    130222 2022-03-14  002207.SZA  1.438863         1        0
    130223 2022-03-14  300828.SZA  1.432616         2        0
    130224 2022-03-14  002909.SZA  1.413669         3        0
    130225 2022-03-14  300004.SZA  1.393108         4        0
    130226 2022-03-14  603238.SHA  1.374756         5        0
    ...           ...         ...       ...       ...      ...
    134167 2022-03-14  300316.SZA -1.019992      3946        0
    134168 2022-03-14  002951.SZA -1.038268      3947        0
    134169 2022-03-14  600510.SHA -1.084224      3948        0
    134170 2022-03-14  002499.SZA -1.112511      3949        0
    134171 2022-03-14  002427.SZA -1.203390      3950        0
    
    [3950 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    134172 2022-03-15  002207.SZA  1.433024         1        0
    134173 2022-03-15  002278.SZA  1.396619         2        0
    134174 2022-03-15  300708.SZA  1.376951         3        0
    134175 2022-03-15  002627.SZA  1.329556         4        0
    134176 2022-03-15  603093.SHA  1.315681         5        0
    ...           ...         ...       ...       ...      ...
    138118 2022-03-15  600521.SHA -0.996022      3947        0
    138119 2022-03-15  600199.SHA -1.000677      3948        0
    138120 2022-03-15  300316.SZA -1.019992      3949        0
    138121 2022-03-15  002371.SZA -1.104816      3950        0
    138122 2022-03-15  600056.SHA -1.199251      3951        0
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    138123 2022-03-16  000595.SZA  1.409032         1        1
    138124 2022-03-16  601015.SHA  1.408979         2        1
    138125 2022-03-16  300828.SZA  1.400606         3        1
    138126 2022-03-16  300032.SZA  1.378418         4        1
    138127 2022-03-16  000993.SZA  1.366343         5        1
    ...           ...         ...       ...       ...      ...
    142069 2022-03-16  002427.SZA -1.184165      3947        1
    142070 2022-03-16  002432.SZA -1.225252      3948        1
    142071 2022-03-16  300436.SZA -1.235361      3949        1
    142072 2022-03-16  300320.SZA -1.251708      3950        1
    142073 2022-03-16  600545.SHA -1.292640      3951        1
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    142074 2022-03-17  002207.SZA  1.433024         1        0
    142075 2022-03-17  002480.SZA  1.431629         2        0
    142076 2022-03-17  002076.SZA  1.430238         3        0
    142077 2022-03-17  002909.SZA  1.413669         4        0
    142078 2022-03-17  601015.SHA  1.408979         5        0
    ...           ...         ...       ...       ...      ...
    146020 2022-03-17  000661.SZA -1.123630      3947        0
    146021 2022-03-17  002786.SZA -1.162321      3948        0
    146022 2022-03-17  600196.SHA -1.216573      3949        0
    146023 2022-03-17  300142.SZA -1.273286      3950        0
    146024 2022-03-17  002427.SZA -1.453405      3951        0
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    146025 2022-03-18  601606.SHA  1.474792         1        0
    146026 2022-03-18  300821.SZA  1.443442         2        0
    146027 2022-03-18  000725.SZA  1.421567         3        0
    146028 2022-03-18  002225.SZA  1.419221         4        0
    146029 2022-03-18  000595.SZA  1.409032         5        0
    ...           ...         ...       ...       ...      ...
    149970 2022-03-18  600149.SHA -1.168442      3946        0
    149971 2022-03-18  600196.SHA -1.216573      3947        0
    149972 2022-03-18  300026.SZA -1.248165      3948        0
    149973 2022-03-18  002427.SZA -1.379146      3949        0
    149974 2022-03-18  300142.SZA -1.394006      3950        0
    
    [3950 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    149975 2022-03-21  688081.SHA  1.374746         1        0
    149976 2022-03-21  603313.SHA  1.269009         2        0
    149977 2022-03-21  603803.SHA  1.216486         3        0
    149978 2022-03-21  600243.SHA  1.203983         4        0
    149979 2022-03-21  603612.SHA  1.199851         5        0
    ...           ...         ...       ...       ...      ...
    153921 2022-03-21  300373.SZA -1.129824      3947        0
    153922 2022-03-21  600149.SHA -1.134512      3948        0
    153923 2022-03-21  002427.SZA -1.164083      3949        0
    153924 2022-03-21  300026.SZA -1.248163      3950        0
    153925 2022-03-21  600196.SHA -1.446815      3951        0
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    153926 2022-03-22  603133.SHA  1.355749         1        1
    153927 2022-03-22  300708.SZA  1.332591         2        1
    153928 2022-03-22  002808.SZA  1.277502         3        1
    153929 2022-03-22  300700.SZA  1.242528         4        1
    153930 2022-03-22  688222.SHA  1.241275         5        1
    ...           ...         ...       ...       ...      ...
    157873 2022-03-22  300059.SZA -1.139049      3948        1
    157874 2022-03-22  002796.SZA -1.145199      3949        1
    157875 2022-03-22  600056.SHA -1.156880      3950        1
    157876 2022-03-22  002192.SZA -1.219544      3951        1
    157877 2022-03-22  002193.SZA -1.331755      3952        1
    
    [3952 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    157878 2022-03-23  002076.SZA  1.380911         1        1
    157879 2022-03-23  300032.SZA  1.372561         2        1
    157880 2022-03-23  000725.SZA  1.366722         3        1
    157881 2022-03-23  688007.SHA  1.340261         4        1
    157882 2022-03-23  688011.SHA  1.324759         5        1
    ...           ...         ...       ...       ...      ...
    161826 2022-03-23  000063.SZA -1.301404      3949        1
    161827 2022-03-23  000002.SZA -1.343305      3950        1
    161828 2022-03-23  002427.SZA -1.379146      3951        1
    161829 2022-03-23  002555.SZA -1.391852      3952        1
    161830 2022-03-23  600149.SHA -1.418039      3953        1
    
    [3953 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    161831 2022-03-24  002076.SZA  1.430238         1        1
    161832 2022-03-24  603335.SHA  1.409913         2        1
    161833 2022-03-24  300880.SZA  1.408831         3        1
    161834 2022-03-24  002928.SZA  1.405552         4        1
    161835 2022-03-24  300828.SZA  1.400606         5        1
    ...           ...         ...       ...       ...      ...
    165777 2022-03-24  688016.SHA -1.170810      3947        1
    165778 2022-03-24  600212.SHA -1.263928      3948        1
    165779 2022-03-24  600622.SHA -1.383598      3949        1
    165780 2022-03-24  300026.SZA -1.396529      3950        1
    165781 2022-03-24  600149.SHA -1.439089      3951        1
    
    [3951 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    165782 2022-03-25  002638.SZA  1.428668         1        1
    165783 2022-03-25  300780.SZA  1.423490         2        1
    165784 2022-03-25  000725.SZA  1.421567         3        1
    165785 2022-03-25  002225.SZA  1.419221         4        1
    165786 2022-03-25  603133.SHA  1.410915         5        1
    ...           ...         ...       ...       ...      ...
    169726 2022-03-25  000063.SZA -1.143686      3945        1
    169727 2022-03-25  600606.SHA -1.150013      3946        1
    169728 2022-03-25  600322.SHA -1.169946      3947        1
    169729 2022-03-25  600622.SHA -1.387930      3948        1
    169730 2022-03-25  002193.SZA -1.453592      3949        1
    
    [3949 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    169731 2022-03-28  300780.SZA  1.429029         1        1
    169732 2022-03-28  603335.SHA  1.415753         2        1
    169733 2022-03-28  300880.SZA  1.408831         3        1
    169734 2022-03-28  688166.SHA  1.406867         4        1
    169735 2022-03-28  300032.SZA  1.378418         5        1
    ...           ...         ...       ...       ...      ...
    173674 2022-03-28  002796.SZA -1.072104      3944        1
    173675 2022-03-28  603538.SHA -1.153925      3945        1
    173676 2022-03-28  002166.SZA -1.181457      3946        1
    173677 2022-03-28  600067.SHA -1.217689      3947        1
    173678 2022-03-28  600622.SHA -1.267892      3948        1
    
    [3948 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    173679 2022-03-29  002207.SZA  1.438863         1        1
    173680 2022-03-29  300780.SZA  1.429029         2        1
    173681 2022-03-29  000725.SZA  1.421567         3        1
    173682 2022-03-29  600010.SHA  1.421567         4        1
    173683 2022-03-29  002255.SZA  1.410858         5        1
    ...           ...         ...       ...       ...      ...
    177622 2022-03-29  600622.SHA -1.037728      3944        1
    177623 2022-03-29  002166.SZA -1.083236      3945        1
    177624 2022-03-29  002424.SZA -1.209031      3946        1
    177625 2022-03-29  600606.SHA -1.223153      3947        1
    177626 2022-03-29  600026.SHA -1.254926      3948        1
    
    [3948 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    177627 2022-03-30  300733.SZA  1.416245         1        1
    177628 2022-03-30  603133.SHA  1.410915         2        1
    177629 2022-03-30  300857.SZA  1.408831         3        1
    177630 2022-03-30  002323.SZA  1.344281         4        1
    177631 2022-03-30  002969.SZA  1.343561         5        1
    ...           ...         ...       ...       ...      ...
    181571 2022-03-30  300347.SZA -1.072600      3945        1
    181572 2022-03-30  600622.SHA -1.103940      3946        1
    181573 2022-03-30  002424.SZA -1.164529      3947        1
    181574 2022-03-30  603538.SHA -1.187346      3948        1
    181575 2022-03-30  600606.SHA -1.260752      3949        1
    
    [3949 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    181576 2022-03-31  002945.SZA  1.494986         1        1
    181577 2022-03-31  600956.SHA  1.336187         2        1
    181578 2022-03-31  603225.SHA  1.332591         3        1
    181579 2022-03-31  002808.SZA  1.321033         4        1
    181580 2022-03-31  002961.SZA  1.276684         5        1
    ...           ...         ...       ...       ...      ...
    185517 2022-03-31  002311.SZA -0.927649      3942        1
    185518 2022-03-31  600622.SHA -0.955905      3943        1
    185519 2022-03-31  002486.SZA -1.017777      3944        1
    185520 2022-03-31  603538.SHA -1.107363      3945        1
    185521 2022-03-31  002424.SZA -1.349674      3946        1
    
    [3946 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    185522 2022-04-01  002207.SZA  1.445993         1        0
    185523 2022-04-01  603536.SHA  1.423795         2        0
    185524 2022-04-01  603238.SHA  1.374756         3        0
    185525 2022-04-01  002774.SZA  1.371929         4        0
    185526 2022-04-01  300335.SZA  1.369891         5        0
    ...           ...         ...       ...       ...      ...
    189462 2022-04-01  002166.SZA -1.130824      3941        0
    189463 2022-04-01  600606.SHA -1.151049      3942        0
    189464 2022-04-01  600622.SHA -1.176044      3943        0
    189465 2022-04-01  600026.SHA -1.199169      3944        0
    189466 2022-04-01  000806.SZA -1.257111      3945        0
    
    [3945 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    189467 2022-04-06  002945.SZA  1.494986         1        0
    189468 2022-04-06  688081.SHA  1.466376         2        0
    189469 2022-04-06  600010.SHA  1.445228         3        0
    189470 2022-04-06  300846.SZA  1.359516         4        0
    189471 2022-04-06  601600.SHA  1.349227         5        0
    ...           ...         ...       ...       ...      ...
    193405 2022-04-06  000806.SZA -1.102517      3939        0
    193406 2022-04-06  002427.SZA -1.142023      3940        0
    193407 2022-04-06  600515.SHA -1.192251      3941        0
    193408 2022-04-06  600309.SHA -1.241491      3942        0
    193409 2022-04-06  600606.SHA -1.291106      3943        0
    
    [3943 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    193410 2022-04-07  002945.SZA  1.500825         1        0
    193411 2022-04-07  002112.SZA  1.403728         2        0
    193412 2022-04-07  002076.SZA  1.380911         3        0
    193413 2022-04-07  300464.SZA  1.339952         4        0
    193414 2022-04-07  600956.SHA  1.336187         5        0
    ...           ...         ...       ...       ...      ...
    197347 2022-04-07  300059.SZA -1.014169      3938        0
    197348 2022-04-07  002316.SZA -1.048083      3939        0
    197349 2022-04-07  600647.SHA -1.112192      3940        0
    197350 2022-04-07  000806.SZA -1.185342      3941        0
    197351 2022-04-07  002427.SZA -1.322955      3942        0
    
    [3942 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    197352 2022-04-08  603683.SHA  1.416655         1        0
    197353 2022-04-08  603133.SHA  1.410915         2        0
    197354 2022-04-08  002255.SZA  1.410858         3        0
    197355 2022-04-08  688166.SHA  1.401028         4        0
    197356 2022-04-08  600421.SHA  1.391293         5        0
    ...           ...         ...       ...       ...      ...
    201289 2022-04-08  603778.SHA -1.062972      3938        0
    201290 2022-04-08  603023.SHA -1.070338      3939        0
    201291 2022-04-08  600515.SHA -1.159421      3940        0
    201292 2022-04-08  600606.SHA -1.223153      3941        0
    201293 2022-04-08  600622.SHA -1.535464      3942        0
    
    [3942 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    201294 2022-04-11  688081.SHA  1.526596         1        0
    201295 2022-04-11  300780.SZA  1.420009         2        0
    201296 2022-04-11  603683.SHA  1.416655         3        0
    201297 2022-04-11  603536.SHA  1.388312         4        0
    201298 2022-04-11  002969.SZA  1.349273         5        0
    ...           ...         ...       ...       ...      ...
    205231 2022-04-11  000965.SZA -1.010675      3938        0
    205232 2022-04-11  600675.SHA -1.096228      3939        0
    205233 2022-04-11  000806.SZA -1.100851      3940        0
    205234 2022-04-11  600603.SHA -1.283222      3941        0
    205235 2022-04-11  600622.SHA -1.523778      3942        0
    
    [3942 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    205236 2022-04-12  688081.SHA  1.466376         1        0
    205237 2022-04-12  002076.SZA  1.430238         2        0
    205238 2022-04-12  000993.SZA  1.403237         3        0
    205239 2022-04-12  600010.SHA  1.376516         4        0
    205240 2022-04-12  603220.SHA  1.375235         5        0
    ...           ...         ...       ...       ...      ...
    209175 2022-04-12  300533.SZA -1.040424      3940        0
    209176 2022-04-12  600603.SHA -1.073315      3941        0
    209177 2022-04-12  600250.SHA -1.076531      3942        0
    209178 2022-04-12  000806.SZA -1.099886      3943        0
    209179 2022-04-12  002427.SZA -1.238415      3944        0
    
    [3944 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    209180 2022-04-13  688081.SHA  1.466376         1        0
    209181 2022-04-13  603335.SHA  1.463776         2        0
    209182 2022-04-13  002949.SZA  1.441924         3        0
    209183 2022-04-13  002207.SZA  1.433024         4        0
    209184 2022-04-13  002076.SZA  1.430238         5        0
    ...           ...         ...       ...       ...      ...
    213121 2022-04-13  002059.SZA -1.084354      3942        0
    213122 2022-04-13  600724.SHA -1.143478      3943        0
    213123 2022-04-13  603536.SHA -1.161980      3944        0
    213124 2022-04-13  600250.SHA -1.175266      3945        0
    213125 2022-04-13  600603.SHA -1.448811      3946        0
    
    [3946 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    213126 2022-04-14  605006.SHA  1.346406         1        0
    213127 2022-04-14  002627.SZA  1.339207         2        0
    213128 2022-04-14  000862.SZA  1.329258         3        0
    213129 2022-04-14  688309.SHA  1.275382         4        0
    213130 2022-04-14  603016.SHA  1.264184         5        0
    ...           ...         ...       ...       ...      ...
    217068 2022-04-14  300533.SZA -0.984289      3943        0
    217069 2022-04-14  002545.SZA -1.046614      3944        0
    217070 2022-04-14  603536.SHA -1.065035      3945        0
    217071 2022-04-14  002432.SZA -1.247064      3946        0
    217072 2022-04-14  600603.SHA -1.297163      3947        0
    
    [3947 rows x 5 columns]
                 date  instrument     score  position  bm_risk
    217073 2022-04-15  688189.SHA  1.426961         1        1
    217074 2022-04-15  002945.SZA  1.415982         2        1
    217075 2022-04-15  002627.SZA  1.384257         3        1
    217076 2022-04-15  605006.SHA  1.346406         4        1
    217077 2022-04-15  002282.SZA  1.318985         5        1
    ...           ...         ...       ...       ...      ...
    221011 2022-04-15  000963.SZA -0.985414      3939        1
    221012 2022-04-15  000402.SZA -1.076682      3940        1
    221013 2022-04-15  603536.SHA -1.100189      3941        1
    221014 2022-04-15  600062.SHA -1.176998      3942        1
    221015 2022-04-15  600603.SHA -1.297163      3943        1
    
    [3943 rows x 5 columns]
    
    • 收益率0.0%
    • 年化收益率0.0%
    • 基准收益率-15.21%
    • 阿尔法-0.03
    • 贝塔0.0
    • 夏普比率n/a
    • 胜率0.0
    • 盈亏比0.0
    • 收益波动率0.0%
    • 信息比率0.16
    • 最大回撤0.0%
    bigcharts-data-start/{"__type":"tabs","__id":"bigchart-723a6300b9e24b6da8441e0c35f875a2"}/bigcharts-data-end