{"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":"-215: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-43:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-215:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-222:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-231:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-238:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24: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":"-250:options_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"to_node_id":"-231:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-250:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:training_ds","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":"-222:input_data","from_node_id":"-215:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"-222:data"},{"to_node_id":"-238:input_data","from_node_id":"-231:data"},{"to_node_id":"-86:input_data","from_node_id":"-238:data"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2018-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2020-12-31","type":"Literal","bound_global_parameter":null},{"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/develop/datasource/deprecated/history_data.html\n# 添加benchmark_前缀,可使用对应的benchmark数据\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/develop/bigexpr/usage.html>`_\n\n#自定义函数实现\ncal_fun(close, open, benchmark_close,benchmark_open)\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":"import empyrical\nimport bottleneck as bn\n\n#标准化\ndef standardize(df, columns):\n def handle(df1,columns):\n for col in columns:\n mean = bn.nanmean(df1[col], axis=0)\n std = bn.nanstd(df1[col], ddof=1, axis=0)\n df1[col] = (df1[col] - mean) / std\n return df1\n\n df[columns] = df.groupby(\"date\").apply(handle, columns = columns)[columns]\n return df \n\n#计算函数,用到的列名也需要传入,例如close\n#注意这里的df_total是整个数据集没有经过任何的groupby\ndef cal_fun(df_total, close, open,benchmark_close,benchmark_open):\n def get_label(df):\n #未来5日相对收益\n relative_r = df.close.shift(-5) / df.open.shift(-1) - df.benchmark_close.shift(-5) / df.benchmark_open.shift(-1)\n #每日相对收益\n relative_r_daily = df.close.shift(-1) / df.close - df.benchmark_close.shift(-1) / df.benchmark_close\n #滚动求5日的最大回撤\n max_dd = relative_r_daily.rolling(5).apply(lambda x:abs(empyrical.max_drawdown(x)))\n #偏移成未来5日\n max_dd1 = max_dd.shift(-5) \n df['label'] = relative_r / max_dd1\n return df\n \n df1=df_total.groupby([\"instrument\"]).apply(get_label)\n df1['label'] = np.where(np.isinf(df1.label),np.nan,df1.label)\n df1 = standardize(df1,['label'])\n return df1['label']\n\n \nbigquant_run = {\n 'cal_fun':cal_fun\n}\n","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\nreturn_10\nreturn_20\navg_amount_0/avg_amount_5\navg_amount_5/avg_amount_20\nrank_avg_amount_0/rank_avg_amount_5\nrank_avg_amount_5/rank_avg_amount_10\nrank_return_0\nrank_return_5\nrank_return_10\nrank_return_0/rank_return_5\nrank_return_5/rank_return_10\npe_ttm_0\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-43","module_id":"BigQuantSpace.stock_ranker_train.stock_ranker_train-v6","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":"data_row_fraction","value":1,"type":"Literal","bound_global_parameter":null},{"name":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"ndcg_discount_base","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":"2021-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2021-12-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":"-215","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":90,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-215"},{"name":"features","node_id":"-215"}],"output_ports":[{"name":"data","node_id":"-215"}],"cacheable":true,"seq_num":15,"comment":"","comment_collapsed":true},{"node_id":"-222","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":"-222"},{"name":"features","node_id":"-222"}],"output_ports":[{"name":"data","node_id":"-222"}],"cacheable":true,"seq_num":16,"comment":"","comment_collapsed":true},{"node_id":"-231","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":90,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-231"},{"name":"features","node_id":"-231"}],"output_ports":[{"name":"data","node_id":"-231"}],"cacheable":true,"seq_num":17,"comment":"","comment_collapsed":true},{"node_id":"-238","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":"-238"},{"name":"features","node_id":"-238"}],"output_ports":[{"name":"data","node_id":"-238"}],"cacheable":true,"seq_num":18,"comment":"","comment_collapsed":true},{"node_id":"-250","module_id":"BigQuantSpace.trade.trade-v4","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"# 回测引擎:初始化函数,只执行一次\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":"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.portfolio.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.portfolio.positions.items()}\n instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(\n lambda x: x in equities)])))\n\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.HIX","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-250"},{"name":"options_data","node_id":"-250"},{"name":"history_ds","node_id":"-250"},{"name":"benchmark_ds","node_id":"-250"},{"name":"trading_calendar","node_id":"-250"}],"output_ports":[{"name":"raw_perf","node_id":"-250"}],"cacheable":false,"seq_num":19,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-8' Position='211,62,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-15' Position='61,218,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='765,21,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-43' Position='638,561,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='249,376,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='906,647,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='-215' Position='381,188,200,200'/><node_position Node='-222' Position='385,280,200,200'/><node_position Node='-231' Position='1078,236,200,200'/><node_position Node='-238' Position='1081,327,200,200'/><node_position Node='-250' Position='1037,751,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2023-01-13 14:43:06.337949] INFO: moduleinvoker: instruments.v2 开始运行..
[2023-01-13 14:43:06.346481] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:43:06.348387] INFO: moduleinvoker: instruments.v2 运行完成[0.010453s].
[2023-01-13 14:43:06.365126] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2023-01-13 14:43:09.869120] INFO: 自动标注(股票): 加载历史数据: 2647809 行
[2023-01-13 14:43:09.871196] INFO: 自动标注(股票): 开始标注 ..
[2023-01-13 14:48:34.044815] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[327.679687s].
[2023-01-13 14:48:34.054257] INFO: moduleinvoker: input_features.v1 开始运行..
[2023-01-13 14:48:34.062254] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:48:34.064206] INFO: moduleinvoker: input_features.v1 运行完成[0.009971s].
[2023-01-13 14:48:34.081131] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2023-01-13 14:48:34.087998] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:48:34.089701] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.008599s].
[2023-01-13 14:48:34.099198] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2023-01-13 14:48:34.108268] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:48:34.110406] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.011204s].
[2023-01-13 14:48:34.122531] INFO: moduleinvoker: join.v3 开始运行..
[2023-01-13 14:48:43.647818] INFO: join: /y_2017, 行数=0/193398, 耗时=1.280122s
[2023-01-13 14:48:47.004162] INFO: join: /y_2018, 行数=792072/816987, 耗时=3.353905s
[2023-01-13 14:48:50.600010] INFO: join: /y_2019, 行数=867293/884867, 耗时=3.584323s
[2023-01-13 14:48:54.495488] INFO: join: /y_2020, 行数=901015/945961, 耗时=3.886224s
[2023-01-13 14:48:54.675347] INFO: join: 最终行数: 2560380
[2023-01-13 14:48:54.702089] INFO: moduleinvoker: join.v3 运行完成[20.579553s].
[2023-01-13 14:48:54.715389] INFO: moduleinvoker: dropnan.v1 开始运行..
[2023-01-13 14:48:55.562622] INFO: dropnan: /y_2017, 0/0
[2023-01-13 14:48:58.876516] INFO: dropnan: /y_2018, 790408/792072
[2023-01-13 14:49:02.780622] INFO: dropnan: /y_2019, 864030/867293
[2023-01-13 14:49:06.875553] INFO: dropnan: /y_2020, 892822/901015
[2023-01-13 14:49:07.064494] INFO: dropnan: 行数: 2547260/2560380
[2023-01-13 14:49:07.083295] INFO: moduleinvoker: dropnan.v1 运行完成[12.3679s].
[2023-01-13 14:49:07.096918] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2023-01-13 14:49:17.462995] INFO: StockRanker: 特征预处理 ..
[2023-01-13 14:49:21.596950] INFO: StockRanker: prepare data: training ..
[2023-01-13 14:49:25.466088] INFO: StockRanker: sort ..
[2023-01-13 14:50:00.752505] INFO: StockRanker训练: 6032e81c 准备训练: 2547260 行数
[2023-01-13 14:50:00.754512] INFO: StockRanker训练: AI模型训练,将在2547260*13=3311.44万数据上对模型训练进行20轮迭代训练。预计将需要10~21分钟。请耐心等待。
[2023-01-13 14:50:00.989974] INFO: StockRanker训练: 正在训练 ..
[2023-01-13 14:50:01.052904] INFO: StockRanker训练: 任务状态: Pending
[2023-01-13 14:50:11.099413] INFO: StockRanker训练: 任务状态: Running
[2023-01-13 14:51:21.461795] INFO: StockRanker训练: 00:01:13.8963291, finished iteration 1
[2023-01-13 14:51:31.507963] INFO: StockRanker训练: 00:01:23.3063624, finished iteration 2
[2023-01-13 14:51:41.569657] INFO: StockRanker训练: 00:01:32.8330672, finished iteration 3
[2023-01-13 14:51:51.619104] INFO: StockRanker训练: 00:01:42.3287158, finished iteration 4
[2023-01-13 14:52:01.660387] INFO: StockRanker训练: 00:01:52.3005441, finished iteration 5
[2023-01-13 14:52:11.706972] INFO: StockRanker训练: 00:02:03.3735834, finished iteration 6
[2023-01-13 14:52:21.757752] INFO: StockRanker训练: 00:02:15.4889279, finished iteration 7
[2023-01-13 14:52:31.808312] INFO: StockRanker训练: 00:02:27.0148468, finished iteration 8
[2023-01-13 14:52:51.929834] INFO: StockRanker训练: 00:02:38.4960733, finished iteration 9
[2023-01-13 14:53:02.070017] INFO: StockRanker训练: 00:02:49.8407091, finished iteration 10
[2023-01-13 14:53:12.195133] INFO: StockRanker训练: 00:03:01.8571982, finished iteration 11
[2023-01-13 14:53:22.278187] INFO: StockRanker训练: 00:03:13.7841206, finished iteration 12
[2023-01-13 14:53:32.511440] INFO: StockRanker训练: 00:03:25.4425513, finished iteration 13
[2023-01-13 14:53:42.586692] INFO: StockRanker训练: 00:03:37.3171804, finished iteration 14
[2023-01-13 14:54:02.848341] INFO: StockRanker训练: 00:03:49.7194581, finished iteration 15
[2023-01-13 14:54:12.908742] INFO: StockRanker训练: 00:04:01.7402489, finished iteration 16
[2023-01-13 14:54:22.953840] INFO: StockRanker训练: 00:04:13.7593589, finished iteration 17
[2023-01-13 14:54:33.025522] INFO: StockRanker训练: 00:04:26.2569376, finished iteration 18
[2023-01-13 14:54:53.127964] INFO: StockRanker训练: 00:04:38.8382253, finished iteration 19
[2023-01-13 14:55:03.181966] INFO: StockRanker训练: 00:04:50.7540539, finished iteration 20
[2023-01-13 14:55:03.183671] INFO: StockRanker训练: 任务状态: Succeeded
[2023-01-13 14:55:03.333952] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[356.237038s].
[2023-01-13 14:55:03.339875] INFO: moduleinvoker: instruments.v2 开始运行..
[2023-01-13 14:55:03.350921] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:55:03.352762] INFO: moduleinvoker: instruments.v2 运行完成[0.01289s].
[2023-01-13 14:55:03.367817] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2023-01-13 14:55:03.376444] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:55:03.378625] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.010833s].
[2023-01-13 14:55:03.386942] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2023-01-13 14:55:03.399608] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:55:03.401501] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.014568s].
[2023-01-13 14:55:03.416184] INFO: moduleinvoker: dropnan.v1 开始运行..
[2023-01-13 14:55:03.492169] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:55:03.494756] INFO: moduleinvoker: dropnan.v1 运行完成[0.078567s].
[2023-01-13 14:55:03.518420] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2023-01-13 14:55:04.294669] INFO: StockRanker预测: /y_2020 ..
[2023-01-13 14:55:06.559301] INFO: StockRanker预测: /y_2021 ..
[2023-01-13 14:55:10.189985] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[6.671587s].
[2023-01-13 14:55:13.917498] INFO: moduleinvoker: backtest.v8 开始运行..
[2023-01-13 14:55:13.931962] INFO: backtest: biglearning backtest:V8.6.3
[2023-01-13 14:55:13.933718] INFO: backtest: product_type:stock by specified
[2023-01-13 14:55:14.010072] INFO: moduleinvoker: cached.v2 开始运行..
[2023-01-13 14:55:14.022630] INFO: moduleinvoker: 命中缓存
[2023-01-13 14:55:14.025167] INFO: moduleinvoker: cached.v2 运行完成[0.015119s].
[2023-01-13 14:55:23.837282] INFO: backtest: algo history_data=DataSource(a929ac626e724fc5a53ed51cf775e582T)
[2023-01-13 14:55:23.839101] INFO: algo: TradingAlgorithm V1.8.9
[2023-01-13 14:55:26.362551] INFO: algo: trading transform...
[2023-01-13 14:55:35.722431] INFO: Performance: Simulated 243 trading days out of 243.
[2023-01-13 14:55:35.724322] INFO: Performance: first open: 2021-01-04 09:30:00+00:00
[2023-01-13 14:55:35.725832] INFO: Performance: last close: 2021-12-31 15:00:00+00:00
[2023-01-13 14:55:39.775169] INFO: moduleinvoker: backtest.v8 运行完成[25.857673s].
[2023-01-13 14:55:39.776959] INFO: moduleinvoker: trade.v4 运行完成[29.572417s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-f4ddced285ca42ba9819dbd9a576ac23"}/bigcharts-data-end
- 收益率-22.98%
- 年化收益率-23.73%
- 基准收益率-5.2%
- 阿尔法-0.19
- 贝塔0.74
- 夏普比率-0.99
- 胜率0.44
- 盈亏比1.13
- 收益波动率26.82%
- 信息比率-0.05
- 最大回撤30.67%
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-1e91b03aef4847edaf524e955623be5b"}/bigcharts-data-end