{"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":"-106: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":"-106:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-113:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-122:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-129:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-165:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-830:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data"},{"to_node_id":"-122:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-141:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-165:training_ds","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:data"},{"to_node_id":"-165:predict_ds","from_node_id":"-86:data"},{"to_node_id":"-113:input_data","from_node_id":"-106:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"-113:data"},{"to_node_id":"-129:input_data","from_node_id":"-122:data"},{"to_node_id":"-86:input_data","from_node_id":"-129:data"},{"to_node_id":"-830:input_model","from_node_id":"-165:output_model"},{"to_node_id":"-141:options_data","from_node_id":"-165:predictions"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2015-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-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. 可用数据字段见 https://bigquant.com/docs/data_history_data.html\n# 添加benchmark_前缀,可使用对应的benchmark数据\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/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.SHA","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# 多个特征,每行一个,可以包含基础特征和衍生特征\n# return_5\n# return_10\n# return_20\n# avg_amount_0/avg_amount_5\n# avg_amount_5/avg_amount_20\n# rank_avg_amount_0/rank_avg_amount_5\n# rank_avg_amount_5/rank_avg_amount_10\n# rank_return_0\n# rank_return_5\n# rank_return_10\n# rank_return_0/rank_return_5\n# rank_return_5/rank_return_10\n# pe_ttm_0\n(close_0-mean(close_0,12))/mean(close_0,12)*100\nrank(std(amount_0,15))\nrank_avg_amount_0/rank_avg_amount_8\nts_argmin(low_0,20)\nrank_return_30\n(low_1-close_0)/close_0\nta_bbands_lowerband_14_0\nmean(mf_net_pct_s_0,4)\namount_0/avg_amount_3\nreturn_0/return_5\nreturn_1/return_5\nrank_avg_amount_7/rank_avg_amount_10\nta_sma_10_0/close_0\nsqrt(high_0*low_0)-amount_0/volume_0*adjust_factor_0\navg_turn_15/(turn_0+1e-5)\nreturn_10\nmf_net_pct_s_0\n(close_0-open_0)/close_1\n","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-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-62","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2023-03-31","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-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":"-106","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":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-106"},{"name":"features","node_id":"-106"}],"output_ports":[{"name":"data","node_id":"-106"}],"cacheable":true,"seq_num":15,"comment":"","comment_collapsed":true},{"node_id":"-113","module_id":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","parameters":[{"name":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"drop_na","value":"False","type":"Literal","bound_global_parameter":null},{"name":"remove_extra_columns","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-113"},{"name":"features","node_id":"-113"}],"output_ports":[{"name":"data","node_id":"-113"}],"cacheable":true,"seq_num":16,"comment":"","comment_collapsed":true},{"node_id":"-122","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":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-122"},{"name":"features","node_id":"-122"}],"output_ports":[{"name":"data","node_id":"-122"}],"cacheable":true,"seq_num":17,"comment":"","comment_collapsed":true},{"node_id":"-129","module_id":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","parameters":[{"name":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"drop_na","value":"False","type":"Literal","bound_global_parameter":null},{"name":"remove_extra_columns","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-129"},{"name":"features","node_id":"-129"}],"output_ports":[{"name":"data","node_id":"-129"}],"cacheable":true,"seq_num":18,"comment":"","comment_collapsed":true},{"node_id":"-141","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":"# 回测引擎:初始化函数,只执行一次\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 = 30\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":"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 # 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":"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":"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":"000300.SHA","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-141"},{"name":"options_data","node_id":"-141"},{"name":"history_ds","node_id":"-141"},{"name":"benchmark_ds","node_id":"-141"},{"name":"trading_calendar","node_id":"-141"}],"output_ports":[{"name":"raw_perf","node_id":"-141"}],"cacheable":false,"seq_num":19,"comment":"","comment_collapsed":true},{"node_id":"-165","module_id":"BigQuantSpace.xgboost.xgboost-v1","parameters":[{"name":"num_boost_round","value":"30","type":"Literal","bound_global_parameter":null},{"name":"objective","value":"排序(pairwise)","type":"Literal","bound_global_parameter":null},{"name":"booster","value":"gbtree","type":"Literal","bound_global_parameter":null},{"name":"max_depth","value":6,"type":"Literal","bound_global_parameter":null},{"name":"key_cols","value":"date,instrument","type":"Literal","bound_global_parameter":null},{"name":"group_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"nthread","value":1,"type":"Literal","bound_global_parameter":null},{"name":"n_gpus","value":-1,"type":"Literal","bound_global_parameter":null},{"name":"other_train_parameters","value":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"training_ds","node_id":"-165"},{"name":"features","node_id":"-165"},{"name":"model","node_id":"-165"},{"name":"predict_ds","node_id":"-165"}],"output_ports":[{"name":"output_model","node_id":"-165"},{"name":"predictions","node_id":"-165"}],"cacheable":true,"seq_num":20,"comment":"","comment_collapsed":true},{"node_id":"-830","module_id":"BigQuantSpace.ml_model_explanation.ml_model_explanation-v1","parameters":[{"name":"plot_kind","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E6%80%BB%E8%A7%88%E5%9B%BE%22%2C%22displayValue%22%3A%22%E6%80%BB%E8%A7%88%E5%9B%BE%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E6%95%A3%E7%82%B9%E5%9B%BE%22%2C%22displayValue%22%3A%22%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E6%95%A3%E7%82%B9%E5%9B%BE%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%8E%A8%E5%8A%9B%E5%9B%BE%22%2C%22displayValue%22%3A%22%E6%8E%A8%E5%8A%9B%E5%9B%BE%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%86%B3%E7%AD%96%E8%B7%AF%E5%BE%84%E5%9B%BE%22%2C%22displayValue%22%3A%22%E5%86%B3%E7%AD%96%E8%B7%AF%E5%BE%84%E5%9B%BE%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"class_ind","value":0,"type":"Literal","bound_global_parameter":null},{"name":"feature_name","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_model","node_id":"-830"},{"name":"features","node_id":"-830"},{"name":"input_data","node_id":"-830"}],"output_ports":[{"name":"shap_data","node_id":"-830"}],"cacheable":false,"seq_num":4,"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='706,-22,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='249,375,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='1074,127,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='-106' Position='381,188,200,200'/><node_position Node='-113' Position='385,280,200,200'/><node_position Node='-122' Position='1078,236,200,200'/><node_position Node='-129' Position='1081,327,200,200'/><node_position Node='-141' Position='896,728,200,200'/><node_position Node='-165' Position='678,558,200,200'/><node_position Node='-830' Position='497.69866943359375,766.6861572265625,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2023-05-09 13:49:35.963106] INFO: moduleinvoker: instruments.v2 开始运行..
[2023-05-09 13:49:35.988147] INFO: moduleinvoker: 命中缓存
[2023-05-09 13:49:35.989473] INFO: moduleinvoker: instruments.v2 运行完成[0.026375s].
[2023-05-09 13:49:35.999808] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2023-05-09 13:49:36.006369] INFO: moduleinvoker: 命中缓存
[2023-05-09 13:49:36.921966] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[0.92215s].
[2023-05-09 13:49:36.937664] INFO: moduleinvoker: input_features.v1 开始运行..
[2023-05-09 13:49:36.945405] INFO: moduleinvoker: 命中缓存
[2023-05-09 13:49:36.947135] INFO: moduleinvoker: input_features.v1 运行完成[0.009457s].
[2023-05-09 13:49:36.974506] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2023-05-09 13:49:39.789003] INFO: 基础特征抽取: 年份 2015, 特征行数=569698
[2023-05-09 13:49:43.172676] INFO: 基础特征抽取: 年份 2016, 特征行数=641546
[2023-05-09 13:49:46.521941] INFO: 基础特征抽取: 年份 2017, 特征行数=743233
[2023-05-09 13:49:50.353936] INFO: 基础特征抽取: 年份 2018, 特征行数=816987
[2023-05-09 13:49:55.187052] INFO: 基础特征抽取: 年份 2019, 特征行数=884867
[2023-05-09 13:49:59.806216] INFO: 基础特征抽取: 年份 2020, 特征行数=945961
[2023-05-09 13:50:00.263547] INFO: 基础特征抽取: 年份 2021, 特征行数=0
[2023-05-09 13:50:00.336764] INFO: 基础特征抽取: 总行数: 4602292
[2023-05-09 13:50:00.340431] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[23.365925s].
[2023-05-09 13:50:00.349865] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2023-05-09 13:50:16.188232] INFO: derived_feature_extractor: 提取完成 (close_0-mean(close_0,12))/mean(close_0,12)*100, 5.417s
[2023-05-09 13:50:21.397397] INFO: derived_feature_extractor: 提取完成 rank(std(amount_0,15)), 5.208s
[2023-05-09 13:50:21.404577] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_0/rank_avg_amount_8, 0.006s
[2023-05-09 13:50:34.653649] INFO: derived_feature_extractor: 提取完成 ts_argmin(low_0,20), 13.248s
[2023-05-09 13:50:34.661433] INFO: derived_feature_extractor: 提取完成 (low_1-close_0)/close_0, 0.006s
[2023-05-09 13:50:38.040750] INFO: derived_feature_extractor: 提取完成 mean(mf_net_pct_s_0,4), 3.378s
[2023-05-09 13:50:38.062614] INFO: derived_feature_extractor: 提取完成 amount_0/avg_amount_3, 0.020s
[2023-05-09 13:50:38.069807] INFO: derived_feature_extractor: 提取完成 return_0/return_5, 0.006s
[2023-05-09 13:50:38.077181] INFO: derived_feature_extractor: 提取完成 return_1/return_5, 0.006s
[2023-05-09 13:50:38.086093] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_7/rank_avg_amount_10, 0.008s
[2023-05-09 13:50:38.095882] INFO: derived_feature_extractor: 提取完成 ta_sma_10_0/close_0, 0.008s
[2023-05-09 13:50:38.153132] INFO: derived_feature_extractor: 提取完成 sqrt(high_0*low_0)-amount_0/volume_0*adjust_factor_0, 0.056s
[2023-05-09 13:50:38.176734] INFO: derived_feature_extractor: 提取完成 avg_turn_15/(turn_0+1e-5), 0.022s
[2023-05-09 13:50:38.189103] INFO: derived_feature_extractor: 提取完成 (close_0-open_0)/close_1, 0.011s
[2023-05-09 13:50:45.877509] INFO: derived_feature_extractor: /y_2015, 569698
[2023-05-09 13:50:47.323808] INFO: derived_feature_extractor: /y_2016, 641546
[2023-05-09 13:50:49.047231] INFO: derived_feature_extractor: /y_2017, 743233
[2023-05-09 13:50:51.054303] INFO: derived_feature_extractor: /y_2018, 816987
[2023-05-09 13:50:53.356612] INFO: derived_feature_extractor: /y_2019, 884867
[2023-05-09 13:50:57.817965] INFO: derived_feature_extractor: /y_2020, 945961
[2023-05-09 13:51:00.508794] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[60.158912s].
[2023-05-09 13:51:00.525089] INFO: moduleinvoker: join.v3 开始运行..
[2023-05-09 13:51:15.810730] INFO: join: /y_2015, 行数=560428/569698, 耗时=5.54038s
[2023-05-09 13:51:20.236556] INFO: join: /y_2016, 行数=637478/641546, 耗时=4.421528s
[2023-05-09 13:51:24.593227] INFO: join: /y_2017, 行数=738259/743233, 耗时=4.349656s
[2023-05-09 13:51:29.603625] INFO: join: /y_2018, 行数=813508/816987, 耗时=5.004431s
[2023-05-09 13:51:34.816684] INFO: join: /y_2019, 行数=881288/884867, 耗时=5.206719s
[2023-05-09 13:51:39.953533] INFO: join: /y_2020, 行数=919362/945961, 耗时=5.128901s
[2023-05-09 13:51:40.026982] INFO: join: 最终行数: 4550323
[2023-05-09 13:51:40.085512] INFO: moduleinvoker: join.v3 运行完成[39.560417s].
[2023-05-09 13:51:40.097775] INFO: moduleinvoker: dropnan.v1 开始运行..
[2023-05-09 13:51:43.542498] INFO: dropnan: /y_2015, 508264/560428
[2023-05-09 13:51:45.853216] INFO: dropnan: /y_2016, 633538/637478
[2023-05-09 13:51:56.341704] INFO: dropnan: /y_2017, 727999/738259
[2023-05-09 13:51:59.052029] INFO: dropnan: /y_2018, 810444/813508
[2023-05-09 13:52:05.248244] INFO: dropnan: /y_2019, 876118/881288
[2023-05-09 13:52:09.817202] INFO: dropnan: /y_2020, 908889/919362
[2023-05-09 13:52:09.938775] INFO: dropnan: 行数: 4465252/4550323
[2023-05-09 13:52:09.956949] INFO: moduleinvoker: dropnan.v1 运行完成[29.859178s].
[2023-05-09 13:52:09.962978] INFO: moduleinvoker: instruments.v2 开始运行..
[2023-05-09 13:52:10.028670] INFO: moduleinvoker: instruments.v2 运行完成[0.065684s].
[2023-05-09 13:52:10.054342] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2023-05-09 13:52:14.583222] INFO: 基础特征抽取: 年份 2021, 特征行数=1061527
[2023-05-09 13:52:19.204263] INFO: 基础特征抽取: 年份 2022, 特征行数=1171038
[2023-05-09 13:52:20.809452] INFO: 基础特征抽取: 年份 2023, 特征行数=300168
[2023-05-09 13:52:20.945611] INFO: 基础特征抽取: 总行数: 2532733
[2023-05-09 13:52:20.950680] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[10.896341s].
[2023-05-09 13:52:20.958566] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2023-05-09 13:52:27.718253] INFO: derived_feature_extractor: 提取完成 (close_0-mean(close_0,12))/mean(close_0,12)*100, 2.632s
[2023-05-09 13:52:30.044488] INFO: derived_feature_extractor: 提取完成 rank(std(amount_0,15)), 2.325s
[2023-05-09 13:52:30.049752] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_0/rank_avg_amount_8, 0.004s
[2023-05-09 13:52:36.730138] INFO: derived_feature_extractor: 提取完成 ts_argmin(low_0,20), 6.679s
[2023-05-09 13:52:36.736548] INFO: derived_feature_extractor: 提取完成 (low_1-close_0)/close_0, 0.005s
[2023-05-09 13:52:38.326938] INFO: derived_feature_extractor: 提取完成 mean(mf_net_pct_s_0,4), 1.589s
[2023-05-09 13:52:38.336162] INFO: derived_feature_extractor: 提取完成 amount_0/avg_amount_3, 0.008s
[2023-05-09 13:52:38.341148] INFO: derived_feature_extractor: 提取完成 return_0/return_5, 0.004s
[2023-05-09 13:52:38.345495] INFO: derived_feature_extractor: 提取完成 return_1/return_5, 0.003s
[2023-05-09 13:52:38.350032] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_7/rank_avg_amount_10, 0.004s
[2023-05-09 13:52:38.354675] INFO: derived_feature_extractor: 提取完成 ta_sma_10_0/close_0, 0.003s
[2023-05-09 13:52:38.367390] INFO: derived_feature_extractor: 提取完成 sqrt(high_0*low_0)-amount_0/volume_0*adjust_factor_0, 0.012s
[2023-05-09 13:52:38.377033] INFO: derived_feature_extractor: 提取完成 avg_turn_15/(turn_0+1e-5), 0.009s
[2023-05-09 13:52:38.382041] INFO: derived_feature_extractor: 提取完成 (close_0-open_0)/close_1, 0.004s
[2023-05-09 13:52:43.360271] INFO: derived_feature_extractor: /y_2021, 1061527
[2023-05-09 13:52:46.358399] INFO: derived_feature_extractor: /y_2022, 1171038
[2023-05-09 13:52:49.403021] INFO: derived_feature_extractor: /y_2023, 300168
[2023-05-09 13:52:49.832073] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[28.873499s].
[2023-05-09 13:52:49.841731] INFO: moduleinvoker: dropnan.v1 开始运行..
[2023-05-09 13:52:55.017828] INFO: dropnan: /y_2021, 966048/1061527
[2023-05-09 13:52:59.952277] INFO: dropnan: /y_2022, 1135226/1171038
[2023-05-09 13:53:00.647551] INFO: dropnan: /y_2023, 287312/300168
[2023-05-09 13:53:00.769411] INFO: dropnan: 行数: 2388586/2532733
[2023-05-09 13:53:00.774492] INFO: moduleinvoker: dropnan.v1 运行完成[10.932781s].
[2023-05-09 13:53:00.799960] INFO: moduleinvoker: xgboost.v1 开始运行..
[2023-05-09 14:12:25.794628] INFO: moduleinvoker: xgboost.v1 运行完成[1164.994667s].
[2023-05-09 14:12:25.804722] ERROR: moduleinvoker: module name: ml_model_explanation, module version: v1, trackeback: TypeError: bigquant_run() takes at least 3 positional arguments (2 given)
[13:53:45] WARNING: /workspace/src/learner.cc:686: Tree method is automatically selected to be 'approx' for faster speed. To use old behavior (exact greedy algorithm on single machine), set tree_method to 'exact'.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-cc67cd0a27e3> in <module>
148 )
149
--> 150 m4 = M.ml_model_explanation.v1(
151 input_model=m20.output_model,
152 features=m3.data,
TypeError: bigquant_run() takes at least 3 positional arguments (2 given)