{"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"-201:instruments","from_node_id":"-185:data"},{"to_node_id":"-216:instruments","from_node_id":"-185:data"},{"to_node_id":"-232:instruments","from_node_id":"-193:data"},{"to_node_id":"-291:instruments","from_node_id":"-193:data"},{"to_node_id":"-248:data1","from_node_id":"-201:data"},{"to_node_id":"-216:features","from_node_id":"-211:data"},{"to_node_id":"-223:features","from_node_id":"-211:data"},{"to_node_id":"-232:features","from_node_id":"-211:data"},{"to_node_id":"-239:features","from_node_id":"-211:data"},{"to_node_id":"-267:features","from_node_id":"-211:data"},{"to_node_id":"-223:input_data","from_node_id":"-216:data"},{"to_node_id":"-248:data2","from_node_id":"-223:data"},{"to_node_id":"-239:input_data","from_node_id":"-232:data"},{"to_node_id":"-259:input_data","from_node_id":"-239:data"},{"to_node_id":"-255:input_data","from_node_id":"-248:data"},{"to_node_id":"-267:training_ds","from_node_id":"-255:data"},{"to_node_id":"-283:data","from_node_id":"-259:data"},{"to_node_id":"-283:model","from_node_id":"-267:model"},{"to_node_id":"-291:options_data","from_node_id":"-283:predictions"}],"nodes":[{"node_id":"-185","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2013-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2016-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":"-185"}],"output_ports":[{"name":"data","node_id":"-185"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-193","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2017-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2018-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":"-193"}],"output_ports":[{"name":"data","node_id":"-193"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-201","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# 计算收益: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":"-201"}],"output_ports":[{"name":"data","node_id":"-201"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-211","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\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":"-211"}],"output_ports":[{"name":"data","node_id":"-211"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-216","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":"-216"},{"name":"features","node_id":"-216"}],"output_ports":[{"name":"data","node_id":"-216"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true},{"node_id":"-223","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":"-223"},{"name":"features","node_id":"-223"}],"output_ports":[{"name":"data","node_id":"-223"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"-232","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":"-232"},{"name":"features","node_id":"-232"}],"output_ports":[{"name":"data","node_id":"-232"}],"cacheable":true,"seq_num":7,"comment":"","comment_collapsed":true},{"node_id":"-239","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":"-239"},{"name":"features","node_id":"-239"}],"output_ports":[{"name":"data","node_id":"-239"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-248","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":"-248"},{"name":"data2","node_id":"-248"}],"output_ports":[{"name":"data","node_id":"-248"}],"cacheable":true,"seq_num":9,"comment":"","comment_collapsed":true},{"node_id":"-255","module_id":"BigQuantSpace.dropnan.dropnan-v2","parameters":[],"input_ports":[{"name":"input_data","node_id":"-255"},{"name":"features","node_id":"-255"}],"output_ports":[{"name":"data","node_id":"-255"}],"cacheable":true,"seq_num":10,"comment":"","comment_collapsed":true},{"node_id":"-259","module_id":"BigQuantSpace.dropnan.dropnan-v2","parameters":[],"input_ports":[{"name":"input_data","node_id":"-259"},{"name":"features","node_id":"-259"}],"output_ports":[{"name":"data","node_id":"-259"}],"cacheable":true,"seq_num":11,"comment":"","comment_collapsed":true},{"node_id":"-267","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":"-267"},{"name":"features","node_id":"-267"},{"name":"test_ds","node_id":"-267"},{"name":"base_model","node_id":"-267"}],"output_ports":[{"name":"model","node_id":"-267"},{"name":"feature_gains","node_id":"-267"},{"name":"m_lazy_run","node_id":"-267"}],"cacheable":true,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"-283","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":"-283"},{"name":"data","node_id":"-283"}],"output_ports":[{"name":"predictions","node_id":"-283"},{"name":"m_lazy_run","node_id":"-283"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"node_id":"-291","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.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.hold_days # 是否在建仓期间(前 hold_days 天)\n cash_avg = context.portfolio.portfolio_value / context.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天之后才开始卖出;对持仓的股票,按StockRanker预测的排序末位淘汰\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. 生成买入订单:按StockRanker预测的排序,买入前面的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":"# 回测引擎:每个单位时间开始前调用一次,即每日开盘前调用一次。\ndef bigquant_run(context, data):\n pass\n","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":"-291"},{"name":"options_data","node_id":"-291"},{"name":"history_ds","node_id":"-291"},{"name":"benchmark_ds","node_id":"-291"},{"name":"trading_calendar","node_id":"-291"}],"output_ports":[{"name":"raw_perf","node_id":"-291"}],"cacheable":false,"seq_num":14,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-185' Position='312,91,200,200'/><node_position Node='-193' Position='994,94,200,200'/><node_position Node='-201' Position='174,293,200,200'/><node_position Node='-211' Position='675,7,200,200'/><node_position Node='-216' Position='426,219,200,200'/><node_position Node='-223' Position='430,367,200,200'/><node_position Node='-232' Position='991,215,200,200'/><node_position Node='-239' Position='987,363,200,200'/><node_position Node='-248' Position='279,488,200,200'/><node_position Node='-255' Position='277,619,200,200'/><node_position Node='-259' Position='987,624,200,200'/><node_position Node='-267' Position='496,758,200,200'/><node_position Node='-283' Position='696,886,200,200'/><node_position Node='-291' Position='837,1015,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-02-20 20:56:42.725851] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-02-20 20:56:42.739878] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:42.744230] INFO: moduleinvoker: instruments.v2 运行完成[0.018373s].
[2022-02-20 20:56:42.789861] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2022-02-20 20:56:42.803791] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:42.806188] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[0.016346s].
[2022-02-20 20:56:42.812994] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-02-20 20:56:42.954585] INFO: moduleinvoker: instruments.v2 运行完成[0.141547s].
[2022-02-20 20:56:42.995166] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-02-20 20:56:43.006000] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:43.009070] INFO: moduleinvoker: input_features.v1 运行完成[0.013942s].
[2022-02-20 20:56:43.027048] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-02-20 20:56:43.042980] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:43.045358] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.018342s].
[2022-02-20 20:56:43.073285] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-02-20 20:56:43.085664] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:43.088366] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.015094s].
[2022-02-20 20:56:43.113316] INFO: moduleinvoker: join.v3 开始运行..
[2022-02-20 20:56:43.136066] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:43.139531] INFO: moduleinvoker: join.v3 运行完成[0.026217s].
[2022-02-20 20:56:43.192106] INFO: moduleinvoker: dropnan.v2 开始运行..
[2022-02-20 20:56:43.207937] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:56:43.210315] INFO: moduleinvoker: dropnan.v2 运行完成[0.018233s].
[2022-02-20 20:56:43.231831] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-02-20 20:56:47.068819] INFO: 基础特征抽取: 年份 2016, 特征行数=165781
[2022-02-20 20:57:29.050964] INFO: 基础特征抽取: 年份 2017, 特征行数=743233
[2022-02-20 20:58:22.414614] INFO: 基础特征抽取: 年份 2018, 特征行数=816987
[2022-02-20 20:58:22.573166] INFO: 基础特征抽取: 总行数: 1726001
[2022-02-20 20:58:22.587697] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[99.355902s].
[2022-02-20 20:58:22.611414] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-02-20 20:58:27.139266] INFO: derived_feature_extractor: 提取完成 avg_amount_0/avg_amount_5, 0.010s
[2022-02-20 20:58:27.148744] INFO: derived_feature_extractor: 提取完成 avg_amount_5/avg_amount_20, 0.007s
[2022-02-20 20:58:27.163007] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_0/rank_avg_amount_5, 0.011s
[2022-02-20 20:58:27.176431] INFO: derived_feature_extractor: 提取完成 rank_avg_amount_5/rank_avg_amount_10, 0.011s
[2022-02-20 20:58:27.182919] INFO: derived_feature_extractor: 提取完成 rank_return_0/rank_return_5, 0.004s
[2022-02-20 20:58:27.232194] INFO: derived_feature_extractor: 提取完成 rank_return_5/rank_return_10, 0.048s
[2022-02-20 20:58:27.878762] INFO: derived_feature_extractor: /y_2016, 165781
[2022-02-20 20:58:29.703150] INFO: derived_feature_extractor: /y_2017, 743233
[2022-02-20 20:58:32.158765] INFO: derived_feature_extractor: /y_2018, 816987
[2022-02-20 20:58:32.927830] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[10.316454s].
[2022-02-20 20:58:32.947416] INFO: moduleinvoker: dropnan.v2 开始运行..
[2022-02-20 20:58:33.345949] INFO: dropnan: /y_2016, 163887/165781
[2022-02-20 20:58:34.687516] INFO: dropnan: /y_2017, 733820/743233
[2022-02-20 20:58:36.074135] INFO: dropnan: /y_2018, 814562/816987
[2022-02-20 20:58:36.202070] INFO: dropnan: 行数: 1712269/1726001
[2022-02-20 20:58:36.213918] INFO: moduleinvoker: dropnan.v2 运行完成[3.266507s].
[2022-02-20 20:58:36.226684] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2022-02-20 20:58:36.371270] INFO: moduleinvoker: 命中缓存
[2022-02-20 20:58:36.600861] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[0.374177s].
[2022-02-20 20:58:36.621053] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-20 20:58:36.938116] INFO: StockRanker预测: /y_2016 ..
[2022-02-20 20:58:37.908341] INFO: StockRanker预测: /y_2017 ..
[2022-02-20 20:58:40.120244] INFO: StockRanker预测: /y_2018 ..
[2022-02-20 20:58:46.710579] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[10.089518s].
[2022-02-20 20:58:46.809464] INFO: moduleinvoker: backtest.v8 开始运行..
[2022-02-20 20:58:46.821279] INFO: backtest: biglearning backtest:V8.6.1
[2022-02-20 20:58:46.822883] INFO: backtest: product_type:stock by specified
[2022-02-20 20:58:47.106265] INFO: moduleinvoker: cached.v2 开始运行..
[2022-02-20 20:59:04.409324] INFO: backtest: 读取股票行情完成:2581648
[2022-02-20 20:59:10.830490] INFO: moduleinvoker: cached.v2 运行完成[23.724204s].
[2022-02-20 20:59:13.794760] INFO: algo: TradingAlgorithm V1.8.7
[2022-02-20 20:59:15.364201] INFO: algo: trading transform...
[2022-02-20 20:59:23.569458] INFO: algo: handle_splits get splits [dt:2017-05-09 00:00:00+00:00] [asset:Equity(487 [603322.SHA]), ratio:0.9979960918426514]
[2022-02-20 20:59:23.571891] INFO: Position: position stock handle split[sid:487, orig_amount:2800, new_amount:2805.0, orig_cost:62.39500160160807, new_cost:62.27, ratio:0.9979960918426514, last_sale_price:59.760005950927734]
[2022-02-20 20:59:23.575306] INFO: Position: after split: PositionStock(asset:Equity(487 [603322.SHA]), amount:2805.0, cost_basis:62.27, last_sale_price:59.880001068115234)
[2022-02-20 20:59:23.577997] INFO: Position: returning cash: 37.1832
[2022-02-20 20:59:23.961881] INFO: algo: handle_splits get splits [dt:2017-05-22 00:00:00+00:00] [asset:Equity(374 [300548.SZA]), ratio:0.9965568780899048]
[2022-02-20 20:59:23.964926] INFO: Position: position stock handle split[sid:374, orig_amount:800, new_amount:802.0, orig_cost:57.030006292308165, new_cost:56.8336, ratio:0.9965568780899048, last_sale_price:57.88002395629883]
[2022-02-20 20:59:23.967477] INFO: Position: after split: PositionStock(asset:Equity(374 [300548.SZA]), amount:802.0, cost_basis:56.8336, last_sale_price:58.08000183105469)
[2022-02-20 20:59:23.969878] INFO: Position: returning cash: 44.2212
[2022-02-20 20:59:24.188015] INFO: algo: handle_splits get splits [dt:2017-05-26 00:00:00+00:00] [asset:Equity(1839 [002797.SZA]), ratio:0.623359739780426]
[2022-02-20 20:59:24.191544] INFO: Position: position stock handle split[sid:1839, orig_amount:13100, new_amount:21015.0, orig_cost:13.686335589835526, new_cost:8.5315, ratio:0.623359739780426, last_sale_price:9.500001907348633]
[2022-02-20 20:59:24.195280] INFO: Position: after split: PositionStock(asset:Equity(1839 [002797.SZA]), amount:21015.0, cost_basis:8.5315, last_sale_price:15.239999771118164)
[2022-02-20 20:59:24.198052] INFO: Position: returning cash: 1.4488
[2022-02-20 20:59:24.421857] INFO: algo: handle_splits get splits [dt:2017-06-06 00:00:00+00:00] [asset:Equity(2289 [300387.SZA]), ratio:0.9926353096961975]
[2022-02-20 20:59:24.423372] INFO: Position: position stock handle split[sid:2289, orig_amount:2700, new_amount:2720.0, orig_cost:18.65002412471148, new_cost:18.5127, ratio:0.9926353096961975, last_sale_price:18.869997024536133]
[2022-02-20 20:59:24.424484] INFO: Position: after split: PositionStock(asset:Equity(2289 [300387.SZA]), amount:2720.0, cost_basis:18.5127, last_sale_price:19.010000228881836)
[2022-02-20 20:59:24.428706] INFO: Position: returning cash: 0.6075
[2022-02-20 20:59:25.055732] INFO: algo: handle_splits get splits [dt:2017-06-23 00:00:00+00:00] [asset:Equity(1406 [300261.SZA]), ratio:0.9955899715423584]
[2022-02-20 20:59:25.058993] INFO: Position: position stock handle split[sid:1406, orig_amount:6500, new_amount:6528.0, orig_cost:9.240005611124051, new_cost:9.1993, ratio:0.9955899715423584, last_sale_price:9.030000686645508]
[2022-02-20 20:59:25.063629] INFO: Position: after split: PositionStock(asset:Equity(1406 [300261.SZA]), amount:6528.0, cost_basis:9.1993, last_sale_price:9.069999694824219)
[2022-02-20 20:59:25.066658] INFO: Position: returning cash: 7.1532
[2022-02-20 20:59:25.571694] INFO: algo: handle_splits get splits [dt:2017-07-10 00:00:00+00:00] [asset:Equity(178 [603223.SHA]), ratio:0.9959980249404907]
[2022-02-20 20:59:25.576200] INFO: Position: position stock handle split[sid:178, orig_amount:1400, new_amount:1405.0, orig_cost:24.920010862775865, new_cost:24.8203, ratio:0.9959980249404907, last_sale_price:24.889991760253906]
[2022-02-20 20:59:25.579202] INFO: Position: after split: PositionStock(asset:Equity(178 [603223.SHA]), amount:1405.0, cost_basis:24.8203, last_sale_price:24.990001678466797)
[2022-02-20 20:59:25.582522] INFO: Position: returning cash: 15.5631
[2022-02-20 20:59:25.882237] INFO: algo: handle_splits get splits [dt:2017-07-18 00:00:00+00:00] [asset:Equity(180 [300522.SZA]), ratio:0.5523555874824524]
[2022-02-20 20:59:27.100397] INFO: algo: handle_splits get splits [dt:2017-08-24 00:00:00+00:00] [asset:Equity(3208 [300517.SZA]), ratio:0.9946913123130798]
[2022-02-20 20:59:27.103047] INFO: Position: position stock handle split[sid:3208, orig_amount:1500, new_amount:1508.0, orig_cost:24.62001206082065, new_cost:24.4893, ratio:0.9946913123130798, last_sale_price:24.359989166259766]
[2022-02-20 20:59:27.106776] INFO: Position: after split: PositionStock(asset:Equity(3208 [300517.SZA]), amount:1508.0, cost_basis:24.4893, last_sale_price:24.489999771118164)
[2022-02-20 20:59:27.108952] INFO: Position: returning cash: 0.1347
[2022-02-20 20:59:36.902673] INFO: algo: handle_splits get splits [dt:2018-07-05 00:00:00+00:00] [asset:Equity(602 [600682.SHA]), ratio:0.9931350946426392]
[2022-02-20 20:59:36.905705] INFO: Position: position stock handle split[sid:602, orig_amount:400, new_amount:402.0, orig_cost:13.579999923758576, new_cost:13.4868, ratio:0.9931350946426392, last_sale_price:13.020000457763672]
[2022-02-20 20:59:36.908270] INFO: Position: after split: PositionStock(asset:Equity(602 [600682.SHA]), amount:402.0, cost_basis:13.4868, last_sale_price:13.109999656677246)
[2022-02-20 20:59:36.910113] INFO: Position: returning cash: 9.9596
[2022-02-20 20:59:37.273747] INFO: algo: handle_splits get splits [dt:2018-07-13 00:00:00+00:00] [asset:Equity(1829 [300266.SZA]), ratio:0.6649048924446106]
[2022-02-20 20:59:37.276111] INFO: Position: position stock handle split[sid:1829, orig_amount:100, new_amount:150.0, orig_cost:7.739999771118291, new_cost:5.1464, ratio:0.6649048924446106, last_sale_price:6.2900004386901855]
[2022-02-20 20:59:37.278955] INFO: Position: after split: PositionStock(asset:Equity(1829 [300266.SZA]), amount:150.0, cost_basis:5.1464, last_sale_price:9.460000038146973)
[2022-02-20 20:59:37.282839] INFO: Position: returning cash: 2.5
[2022-02-20 20:59:39.072360] INFO: algo: handle_splits get splits [dt:2018-08-29 00:00:00+00:00] [asset:Equity(33 [600687.SHA]), ratio:0.9910112619400024]
[2022-02-20 20:59:39.076025] INFO: Position: position stock handle split[sid:33, orig_amount:100, new_amount:100.0, orig_cost:4.400000095367966, new_cost:4.3604, ratio:0.9910112619400024, last_sale_price:4.409999847412109]
[2022-02-20 20:59:39.081421] INFO: Position: after split: PositionStock(asset:Equity(33 [600687.SHA]), amount:100.0, cost_basis:4.3604, last_sale_price:4.449999809265137)
[2022-02-20 20:59:39.084185] INFO: Position: returning cash: 4.0
[2022-02-20 20:59:42.567939] INFO: Performance: Simulated 487 trading days out of 487.
[2022-02-20 20:59:42.572467] INFO: Performance: first open: 2017-01-03 09:30:00+00:00
[2022-02-20 20:59:42.575693] INFO: Performance: last close: 2018-12-28 15:00:00+00:00
[2022-02-20 20:59:53.077981] INFO: moduleinvoker: backtest.v8 运行完成[66.26852s].
[2022-02-20 20:59:53.082043] INFO: moduleinvoker: trade.v4 运行完成[66.362243s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-e724164270914e74afd5c1b41212418e"}/bigcharts-data-end
- 收益率-55.53%
- 年化收益率-34.25%
- 基准收益率-9.05%
- 阿尔法-0.34
- 贝塔0.19
- 夏普比率-2.55
- 胜率0.52
- 盈亏比0.64
- 收益波动率17.04%
- 信息比率-0.11
- 最大回撤58.03%
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-2b0add5b96c34bebb987e6ce46c69b7d"}/bigcharts-data-end