{"description":"实验创建于2022/4/8","graph":{"edges":[{"to_node_id":"-1290:features","from_node_id":"-1278:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:features","from_node_id":"-1278:data"},{"to_node_id":"-2427:features","from_node_id":"-1278:data"},{"to_node_id":"-1290:input_data","from_node_id":"-1283:data"},{"to_node_id":"-1079:input_data","from_node_id":"-1283:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"-1290:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data1","from_node_id":"-1079: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":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:model","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:model"},{"to_node_id":"-3135:options_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:training_ds","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:data"},{"to_node_id":"-2427:input_data","from_node_id":"-2411:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:data","from_node_id":"-2427:data"},{"to_node_id":"-760:input","from_node_id":"-512:data"},{"to_node_id":"-2411:instruments","from_node_id":"-760:instrument_list"},{"to_node_id":"-3135:instruments","from_node_id":"-760:instrument_list"}],"nodes":[{"node_id":"-1278","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"return_5 = close/shift(close, 5)\nreturn_10 = close/shift(close, 10)\nreturn_20 = close/shift(close, 20)\namount/mean(amount,5)\nmean(amount,5)/mean(amount,20)\nrank(amount)/rank(mean(amount,5))\nrank(mean(amount,5))/rank(mean(amount,10))\nrank(close/shift(close, 1))\nrank(close/shift(close, 5))\nrank(close/shift(close, 10)) \nrank(close/shift(close, 1))/rank(close/shift(close, 5)) \nrank(close/shift(close, 5))/rank(close/shift(close, 10))","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-1278"}],"output_ports":[{"name":"data","node_id":"-1278"}],"cacheable":true,"seq_num":11,"comment":"","comment_collapsed":true},{"node_id":"-1283","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"bar1d_CN_CONBOND","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2017-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2020-12-31","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-1283"},{"name":"features","node_id":"-1283"}],"output_ports":[{"name":"data","node_id":"-1283"}],"cacheable":false,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"-1290","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":"-1290"},{"name":"features","node_id":"-1290"}],"output_ports":[{"name":"data","node_id":"-1290"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"node_id":"-1079","module_id":"BigQuantSpace.auto_labeler_on_datasource.auto_labeler_on_datasource-v1","parameters":[{"name":"label_expr","value":"# #号开始的表示注释\n# 0. 每行一个,顺序执行,从第二个开始,可以使用label字段\n# 1. 可用数据字段见 https://bigquant.com/docs/develop/datasource/deprecated/history_data.html\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/develop/bigexpr/usage.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":"drop_na_label","value":"True","type":"Literal","bound_global_parameter":null},{"name":"cast_label_int","value":"True","type":"Literal","bound_global_parameter":null},{"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":"-1079"}],"output_ports":[{"name":"data","node_id":"-1079"}],"cacheable":true,"seq_num":14,"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":15,"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":16,"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":17,"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":false,"seq_num":18,"comment":"","comment_collapsed":true},{"node_id":"-2411","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"bar1d_CN_CONBOND","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2018-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-09-15","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-2411"},{"name":"features","node_id":"-2411"}],"output_ports":[{"name":"data","node_id":"-2411"}],"cacheable":true,"seq_num":28,"comment":"","comment_collapsed":true},{"node_id":"-2427","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":"-2427"},{"name":"features","node_id":"-2427"}],"output_ports":[{"name":"data","node_id":"-2427"}],"cacheable":true,"seq_num":30,"comment":"","comment_collapsed":true},{"node_id":"-3135","module_id":"BigQuantSpace.hftrade.hftrade-v2","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"# 交易引擎:初始化函数,只执行一次\ndef bigquant_run(context):\n # 加载股票指标数据,数据继承自m6模块\n context.indicator_data = context.options['data'].read_df()\n\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))\n \n # 设置数量\n context.stock_num = 5\n \n # 调仓天数,22个交易日大概就是一个月。可以理解为一个月换仓一次\n context.rebalance_days = 22\n \n # 如果策略运行中,需要将数据进行保存,可以借用extension这个对象,类型为dict\n # 比如当前运行的k线的索引,比如个股持仓天数、买入均价\n context.extension.index = 0\n context.subscribe(context.instruments)\n ","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 交易引擎:每个单位时间开盘前调用一次。\ndef bigquant_run(context, data):\n pass","type":"Literal","bound_global_parameter":null},{"name":"handle_tick","value":"# 交易引擎:tick数据处理函数,每个tick执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n \n context.extension.index += 1\n # 不在换仓日就return,相当于后面的代码只会一个月运行一次,买入的股票会持有1个月\n if context.extension.index % context.rebalance_days != 0:\n return\n \n # 当前的日期\n date = data.current_dt.strftime('%Y-%m-%d')\n cur_data = context.indicator_data[context.indicator_data['date'] == date]\n\n stock_to_buy = list(cur_data.instrument[:context.stock_num])\n # 通过positions对象,使用列表生成式的方法获取目前持仓的股票列表\n stock_hold_now = [equity for equity in context.portfolio.positions]\n # 继续持有的股票:调仓时,如果买入的股票已经存在于目前的持仓里,那么应继续持有\n no_need_to_sell = [i for i in stock_hold_now if i in stock_to_buy]\n # 需要卖出的股票\n stock_to_sell = [i for i in stock_hold_now if i not in no_need_to_sell] \n \n # 卖出\n\n for stock in stock_to_sell:\n context.order_target_percent(stock, 0)\n \n # 如果当天没有买入的股票,就返回\n if len(stock_to_buy) == 0:\n print(date,'当天没有买入的股票')\n return\n\n # 等权重买入 \n weight = 1 / len(stock_to_buy)\n print(stock_to_buy,weight)\n # 买入\n for stock in stock_to_buy:\n context.order_target_percent(stock, weight)\n ","type":"Literal","bound_global_parameter":null},{"name":"handle_trade","value":"# 交易引擎:成交回报处理函数,每个成交发生时执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"handle_order","value":"# 交易引擎:委托回报处理函数,每个委托变化时执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"after_trading","value":"# 交易引擎:盘后处理函数,每日盘后执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"capital_base","value":"1000001","type":"Literal","bound_global_parameter":null},{"name":"frequency","value":"daily","type":"Literal","bound_global_parameter":null},{"name":"price_type","value":"真实价格","type":"Literal","bound_global_parameter":null},{"name":"product_type","value":"可转债","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"0","type":"Literal","bound_global_parameter":null},{"name":"volume_limit","value":1,"type":"Literal","bound_global_parameter":null},{"name":"order_price_field_buy","value":"close","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_sell","value":"close","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.HIX","type":"Literal","bound_global_parameter":null},{"name":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"disable_cache","value":"False","type":"Literal","bound_global_parameter":null},{"name":"replay_bdb","value":"False","type":"Literal","bound_global_parameter":null},{"name":"show_debug_info","value":"False","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-3135"},{"name":"options_data","node_id":"-3135"},{"name":"history_ds","node_id":"-3135"},{"name":"benchmark_ds","node_id":"-3135"}],"output_ports":[{"name":"raw_perf","node_id":"-3135"}],"cacheable":false,"seq_num":19,"comment":"","comment_collapsed":true},{"node_id":"-512","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"market_performance_CN_CONBOND","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2021-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-09-16","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-512"},{"name":"features","node_id":"-512"}],"output_ports":[{"name":"data","node_id":"-512"}],"cacheable":false,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-760","module_id":"BigQuantSpace.trade_data_generation.trade_data_generation-v1","parameters":[{"name":"category","value":"CN_STOCK","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input","node_id":"-760"}],"output_ports":[{"name":"history_data","node_id":"-760"},{"name":"instrument_list","node_id":"-760"},{"name":"calendar","node_id":"-760"}],"cacheable":false,"seq_num":2,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-1278' Position='1318,-545,200,200'/><node_position Node='-1283' Position='991,-558.0519409179688,200,200'/><node_position Node='-1290' Position='1194.9481201171875,-247,200,200'/><node_position Node='-1079' Position='861,-239,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='1097,-104,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-43' Position='1264.103759765625,107.79232788085938,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='1471,245,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-84' Position='1104,0,200,200'/><node_position Node='-2411' Position='1729,-192,200,200'/><node_position Node='-2427' Position='1722,6,200,200'/><node_position Node='-3135' Position='1742,400,200,200'/><node_position Node='-512' Position='1734,-522.9480895996094,200,200'/><node_position Node='-760' Position='1727,-368,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-09-17 13:48:50.531321] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-09-17 13:48:50.698847] INFO: moduleinvoker: 命中缓存
[2022-09-17 13:48:50.700863] INFO: moduleinvoker: input_features.v1 运行完成[0.169562s].
[2022-09-17 13:48:50.706011] INFO: moduleinvoker: use_datasource.v1 开始运行..
[2022-09-17 13:48:52.548117] INFO: moduleinvoker: use_datasource.v1 运行完成[1.842095s].
[2022-09-17 13:48:52.556990] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-09-17 13:48:54.927844] INFO: derived_feature_extractor: 提取完成 return_5 = close/shift(close, 5), 0.118s
[2022-09-17 13:48:55.047196] INFO: derived_feature_extractor: 提取完成 return_10 = close/shift(close, 10), 0.118s
[2022-09-17 13:48:55.168236] INFO: derived_feature_extractor: 提取完成 return_20 = close/shift(close, 20), 0.119s
[2022-09-17 13:48:55.883286] INFO: derived_feature_extractor: 提取完成 amount/mean(amount,5), 0.713s
[2022-09-17 13:48:57.301118] INFO: derived_feature_extractor: 提取完成 mean(amount,5)/mean(amount,20), 1.416s
[2022-09-17 13:48:58.289849] INFO: derived_feature_extractor: 提取完成 rank(amount)/rank(mean(amount,5)), 0.987s
[2022-09-17 13:48:59.967549] INFO: derived_feature_extractor: 提取完成 rank(mean(amount,5))/rank(mean(amount,10)), 1.676s
[2022-09-17 13:49:00.225367] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 1)), 0.256s
[2022-09-17 13:49:00.480272] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 5)), 0.253s
[2022-09-17 13:49:00.726347] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 10)), 0.244s
[2022-09-17 13:49:01.206176] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 1))/rank(close/shift(close, 5)), 0.478s
[2022-09-17 13:49:01.764824] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 5))/rank(close/shift(close, 10)), 0.557s
[2022-09-17 13:49:04.747853] INFO: derived_feature_extractor: /data, 824071
[2022-09-17 13:49:05.601752] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[13.044731s].
[2022-09-17 13:49:05.611899] INFO: moduleinvoker: auto_labeler_on_datasource.v1 开始运行..
[2022-09-17 13:49:08.045904] INFO: 自动标注(任意数据源): 开始标注 ..
[2022-09-17 13:49:08.757675] INFO: moduleinvoker: auto_labeler_on_datasource.v1 运行完成[3.145776s].
[2022-09-17 13:49:08.772956] INFO: moduleinvoker: join.v3 开始运行..
[2022-09-17 13:49:12.346744] INFO: join: /data, 行数=128516/824071, 耗时=3.056673s
[2022-09-17 13:49:12.409536] INFO: join: 最终行数: 128516
[2022-09-17 13:49:12.420070] INFO: moduleinvoker: join.v3 运行完成[3.647101s].
[2022-09-17 13:49:12.431501] INFO: moduleinvoker: dropnan.v1 开始运行..
[2022-09-17 13:49:13.109172] INFO: dropnan: /data, 4002/128516
[2022-09-17 13:49:13.138182] INFO: dropnan: 行数: 4002/128516
[2022-09-17 13:49:13.141199] INFO: moduleinvoker: dropnan.v1 运行完成[0.709693s].
[2022-09-17 13:49:13.150568] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2022-09-17 13:49:13.307641] INFO: StockRanker: 特征预处理 ..
[2022-09-17 13:49:13.339222] INFO: StockRanker: prepare data: training ..
[2022-09-17 13:49:13.504362] INFO: StockRanker训练: 754b267a 准备训练: 4002 行数
[2022-09-17 13:49:13.506462] INFO: StockRanker训练: AI模型训练,将在4002*12=4.80万数据上对模型训练进行20轮迭代训练。预计将需要1~2分钟。请耐心等待。
[2022-09-17 13:49:13.785945] INFO: StockRanker训练: 正在训练 ..
[2022-09-17 13:49:13.857297] INFO: StockRanker训练: 任务状态: Pending
[2022-09-17 13:49:23.919317] INFO: StockRanker训练: 任务状态: Running
[2022-09-17 13:50:24.190134] INFO: StockRanker训练: 00:01:01.9206451, finished iteration 1
[2022-09-17 13:50:24.192524] INFO: StockRanker训练: 00:01:01.9356027, finished iteration 2
[2022-09-17 13:50:24.194472] INFO: StockRanker训练: 00:01:01.9464325, finished iteration 3
[2022-09-17 13:50:24.196094] INFO: StockRanker训练: 00:01:01.9527329, finished iteration 4
[2022-09-17 13:50:24.197807] INFO: StockRanker训练: 00:01:01.9601216, finished iteration 5
[2022-09-17 13:50:24.199438] INFO: StockRanker训练: 00:01:01.9654635, finished iteration 6
[2022-09-17 13:50:24.201202] INFO: StockRanker训练: 00:01:01.9712878, finished iteration 7
[2022-09-17 13:50:24.203584] INFO: StockRanker训练: 00:01:01.9754248, finished iteration 8
[2022-09-17 13:50:24.206014] INFO: StockRanker训练: 00:01:01.9796057, finished iteration 9
[2022-09-17 13:50:24.208294] INFO: StockRanker训练: 00:01:01.9837284, finished iteration 10
[2022-09-17 13:50:24.210534] INFO: StockRanker训练: 00:01:01.9881059, finished iteration 11
[2022-09-17 13:50:24.212802] INFO: StockRanker训练: 00:01:01.9923424, finished iteration 12
[2022-09-17 13:50:24.215028] INFO: StockRanker训练: 00:01:01.9971697, finished iteration 13
[2022-09-17 13:50:24.217291] INFO: StockRanker训练: 00:01:02.0027930, finished iteration 14
[2022-09-17 13:50:24.219227] INFO: StockRanker训练: 00:01:02.0082682, finished iteration 15
[2022-09-17 13:50:24.221152] INFO: StockRanker训练: 00:01:02.0155078, finished iteration 16
[2022-09-17 13:50:24.223010] INFO: StockRanker训练: 00:01:02.0212089, finished iteration 17
[2022-09-17 13:50:24.224890] INFO: StockRanker训练: 00:01:02.0265658, finished iteration 18
[2022-09-17 13:50:24.226859] INFO: StockRanker训练: 00:01:02.0351589, finished iteration 19
[2022-09-17 13:50:24.228850] INFO: StockRanker训练: 00:01:02.0430125, finished iteration 20
[2022-09-17 13:50:24.231012] INFO: StockRanker训练: 任务状态: Succeeded
[2022-09-17 13:50:24.423575] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[71.272999s].
[2022-09-17 13:50:24.429233] INFO: moduleinvoker: use_datasource.v1 开始运行..
[2022-09-17 13:50:26.158987] INFO: moduleinvoker: use_datasource.v1 运行完成[1.729738s].
[2022-09-17 13:50:26.179065] INFO: moduleinvoker: trade_data_generation.v1 开始运行..
[2022-09-17 13:50:28.257484] INFO: moduleinvoker: trade_data_generation.v1 运行完成[2.078421s].
[2022-09-17 13:50:28.263482] INFO: moduleinvoker: use_datasource.v1 开始运行..
[2022-09-17 13:50:28.796901] INFO: moduleinvoker: use_datasource.v1 运行完成[0.533407s].
[2022-09-17 13:50:28.806445] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-09-17 13:50:29.358078] INFO: derived_feature_extractor: 提取完成 return_5 = close/shift(close, 5), 0.021s
[2022-09-17 13:50:29.381563] INFO: derived_feature_extractor: 提取完成 return_10 = close/shift(close, 10), 0.022s
[2022-09-17 13:50:29.404732] INFO: derived_feature_extractor: 提取完成 return_20 = close/shift(close, 20), 0.021s
[2022-09-17 13:50:29.538319] INFO: derived_feature_extractor: 提取完成 amount/mean(amount,5), 0.132s
[2022-09-17 13:50:29.775296] INFO: derived_feature_extractor: 提取完成 mean(amount,5)/mean(amount,20), 0.235s
[2022-09-17 13:50:30.004535] INFO: derived_feature_extractor: 提取完成 rank(amount)/rank(mean(amount,5)), 0.228s
[2022-09-17 13:50:30.349088] INFO: derived_feature_extractor: 提取完成 rank(mean(amount,5))/rank(mean(amount,10)), 0.343s
[2022-09-17 13:50:30.419084] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 1)), 0.068s
[2022-09-17 13:50:30.488000] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 5)), 0.067s
[2022-09-17 13:50:30.555704] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 10)), 0.066s
[2022-09-17 13:50:30.701239] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 1))/rank(close/shift(close, 5)), 0.144s
[2022-09-17 13:50:30.862802] INFO: derived_feature_extractor: 提取完成 rank(close/shift(close, 5))/rank(close/shift(close, 10)), 0.160s
[2022-09-17 13:50:31.343373] INFO: derived_feature_extractor: /data, 154013
[2022-09-17 13:50:31.543608] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[2.737141s].
[2022-09-17 13:50:31.553443] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-09-17 13:50:32.343266] INFO: StockRanker预测: /data ..
[2022-09-17 13:50:32.854002] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[1.300549s].
[2022-09-17 13:50:32.899102] INFO: moduleinvoker: hfbacktest.v1 开始运行..
[2022-09-17 13:50:32.904426] INFO: hfbacktest: biglearning V1.4.19
[2022-09-17 13:50:32.905523] INFO: hfbacktest: bigtrader v1.9.7_sp6 2022-09-02
[2022-09-17 13:50:32.927534] INFO: moduleinvoker: cached.v2 开始运行..
[2022-09-17 13:50:33.153071] INFO: moduleinvoker: cached.v2 运行完成[0.225534s].
[2022-09-17 13:50:33.259430] INFO: moduleinvoker: cached.v2 开始运行..
[2022-09-17 13:50:33.897317] INFO: moduleinvoker: cached.v2 运行完成[0.637895s].
[2022-09-17 13:50:40.593377] INFO: hfbacktest: backtest done, raw_perf_ds:DataSource(aa543c36def84fcf898186d67a882e59T)
[2022-09-17 13:50:42.896222] INFO: moduleinvoker: hfbacktest.v1 运行完成[9.99713s].
[2022-09-17 13:50:42.898307] INFO: moduleinvoker: hftrade.v2 运行完成[10.036131s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-816774ca1e0a4f2f8fd867aae4944e28"}/bigcharts-data-end
2022-09-17 13:50:34.547520 init history datas...
2022-09-17 13:50:34.548647 init history datas done.
2022-09-17 13:50:34.568683 run_backtest() capital_base:1000001, frequency:1d, product_type:conbond, date:2021-01-04 ~ 2022-09-02
2022-09-17 13:50:34.568981 run_backtest() running...
2022-09-17 13:50:34.578033 initial contracts len=0
2022-09-17 13:50:34.578194 backtest inited.
2022-09-17 13:50:34.843408 backtest transforming 1d, bars=1...
2022-09-17 13:50:34.844104 transform start_trading_day=2021-01-04 00:00:00, simulation period=2021-01-04 ~ 2022-09-02
2022-09-17 13:50:34.844140 transform source=None, before_start_days=0
2022-09-17 13:50:34.844168 transform replay_func=<cyfunction BacktestEngine.transform.<locals>.replay_bars_dt at 0x7f36e4b2c6c0>
['128103.ZCB', '113587.HCB', '113559.HCB', '113525.HCB', '110058.HCB'] 0.2
['123086.ZCB', '110048.HCB', '110058.HCB', '110061.HCB', '113040.HCB'] 0.2
['110057.HCB', '128072.ZCB', '128070.ZCB', '128014.ZCB', '113546.HCB'] 0.2
['123048.ZCB', '123053.ZCB', '123091.ZCB', '113589.HCB', '123028.ZCB'] 0.2
['113505.HCB', '128101.ZCB', '128041.ZCB', '128118.ZCB', '128050.ZCB'] 0.2
['123104.ZCB', '110076.HCB', '123056.ZCB', '123114.ZCB', '128014.ZCB'] 0.2
['113545.HCB', '128035.ZCB', '110041.HCB', '110073.HCB', '113013.HCB'] 0.2
['113051.HCB', '113505.HCB', '113580.HCB', '113603.HCB', '123083.ZCB'] 0.2
['113570.HCB', '123078.ZCB', '123113.ZCB', '128131.ZCB', '123073.ZCB'] 0.2
['113566.HCB', '113597.HCB', '113609.HCB', '113624.HCB', '123011.ZCB'] 0.2
['113504.HCB', '123088.ZCB', '127005.ZCB', '128122.ZCB', '113606.HCB'] 0.2
['123011.ZCB', '113606.HCB', '127016.ZCB', '123071.ZCB', '128141.ZCB'] 0.2
['128132.ZCB', '113053.HCB', '113618.HCB', '123018.ZCB', '128128.ZCB'] 0.2
['113584.HCB', '123117.ZCB', '113519.HCB', '110059.HCB', '127043.ZCB'] 0.2
['113549.HCB', '123093.ZCB', '123097.ZCB', '123129.ZCB', '123132.ZCB'] 0.2
['113047.HCB', '123137.ZCB', '128014.ZCB', '128042.ZCB', '128109.ZCB'] 0.2
['113624.HCB', '113638.HCB', '123044.ZCB', '123050.ZCB', '123120.ZCB'] 0.2
['113608.HCB', '113530.HCB', '113596.HCB', '113624.HCB', '127062.ZCB'] 0.2
2022-09-17 13:50:37.114012 backtest run end!
2022-09-17 13:50:38.216441 run_backtest() finished! time cost 3.647s!
- 收益率39.69%
- 年化收益率22.05%
- 基准收益率-23.62%
- 阿尔法0.23
- 贝塔0.09
- 夏普比率1.09
- 胜率0.68
- 盈亏比4.7
- 收益波动率17.68%
- 信息比率0.09
- 最大回撤9.99%
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-dec83af86eeb42b4b0bf472f6f4fd8d0"}/bigcharts-data-end