{"Description":"实验创建于2019/1/21","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-87:features","SourceOutputPortId":"-131:data"},{"DestinationInputPortId":"-248:features","SourceOutputPortId":"-131:data"},{"DestinationInputPortId":"-92:input_2","SourceOutputPortId":"-131:data"},{"DestinationInputPortId":"-133:features","SourceOutputPortId":"-131:data"},{"DestinationInputPortId":"-140:features","SourceOutputPortId":"-131:data"},{"DestinationInputPortId":"-87:instruments","SourceOutputPortId":"-154:data"},{"DestinationInputPortId":"-93:instruments","SourceOutputPortId":"-154:data"},{"DestinationInputPortId":"-86:input_1","SourceOutputPortId":"-154:data"},{"DestinationInputPortId":"-123:data2","SourceOutputPortId":"-248:data"},{"DestinationInputPortId":"-86:input_2","SourceOutputPortId":"-271:data"},{"DestinationInputPortId":"-119:input_2","SourceOutputPortId":"-271:data"},{"DestinationInputPortId":"-248:input_data","SourceOutputPortId":"-87:data"},{"DestinationInputPortId":"-123:data1","SourceOutputPortId":"-93:data"},{"DestinationInputPortId":"-112:data2","SourceOutputPortId":"-119:data_1"},{"DestinationInputPortId":"-68:data2","SourceOutputPortId":"-123:data"},{"DestinationInputPortId":"-101:training_ds","SourceOutputPortId":"-68:data"},{"DestinationInputPortId":"-68:data1","SourceOutputPortId":"-86:data_1"},{"DestinationInputPortId":"-92:input_1","SourceOutputPortId":"-86:data_2"},{"DestinationInputPortId":"-101:features","SourceOutputPortId":"-92:data_1"},{"DestinationInputPortId":"-519:options_data","SourceOutputPortId":"-101:predictions"},{"DestinationInputPortId":"-101:predict_ds","SourceOutputPortId":"-112:data"},{"DestinationInputPortId":"-119:input_1","SourceOutputPortId":"-124:data"},{"DestinationInputPortId":"-133:instruments","SourceOutputPortId":"-124:data"},{"DestinationInputPortId":"-519:instruments","SourceOutputPortId":"-124:data"},{"DestinationInputPortId":"-140:input_data","SourceOutputPortId":"-133:data"},{"DestinationInputPortId":"-112:data1","SourceOutputPortId":"-140:data"}],"ModuleNodes":[{"Id":"-131","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nreturn_0\navg_turn_9/2","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"-131"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-131","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"Comment":"个股因子列表","CommentCollapsed":false},{"Id":"-154","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2015-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2018-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"market","Value":"CN_STOCK_A","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_list","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_count","Value":0,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"rolling_conf","NodeId":"-154"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-154","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":6,"Comment":"","CommentCollapsed":true},{"Id":"-248","ModuleId":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","ModuleParameters":[{"Name":"date_col","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_col","Value":"instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"remove_extra_columns","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-248"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-248"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-248","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":11,"Comment":"","CommentCollapsed":true},{"Id":"-271","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nclose/shift(close,5)-1\namount+1\nta_sma(close,5)\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"-271"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-271","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":15,"Comment":"指数因子列表","CommentCollapsed":false},{"Id":"-87","ModuleId":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_start_days","Value":90,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-87"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-87"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-87","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"Comment":"","CommentCollapsed":true},{"Id":"-93","ModuleId":"BigQuantSpace.advanced_auto_labeler.advanced_auto_labeler-v2","ModuleParameters":[{"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","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"benchmark","Value":"000300.SHA","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na_label","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"cast_label_int","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-93"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-93","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":10,"Comment":"","CommentCollapsed":true},{"Id":"-119","ModuleId":"BigQuantSpace.index_feature_extract.index_feature_extract-v2","ModuleParameters":[{"Name":"before_days","Value":100,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"index","Value":"000300.HIX","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-119"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-119"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-119","OutputType":null},{"Name":"data_2","NodeId":"-119","OutputType":null},{"Name":"data_3","NodeId":"-119","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":14,"Comment":"","CommentCollapsed":true},{"Id":"-123","ModuleId":"BigQuantSpace.join.join-v3","ModuleParameters":[{"Name":"on","Value":"date,instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"how","Value":"inner","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"sort","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data1","NodeId":"-123"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-123"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-123","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":12,"Comment":"","CommentCollapsed":true},{"Id":"-68","ModuleId":"BigQuantSpace.join.join-v3","ModuleParameters":[{"Name":"on","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"how","Value":"inner","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"sort","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data1","NodeId":"-68"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-68"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-68","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"Comment":"","CommentCollapsed":true},{"Id":"-86","ModuleId":"BigQuantSpace.index_feature_extract.index_feature_extract-v2","ModuleParameters":[{"Name":"before_days","Value":100,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"index","Value":"000300.HIX","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-86"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-86"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-86","OutputType":null},{"Name":"data_2","NodeId":"-86","OutputType":null},{"Name":"data_3","NodeId":"-86","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"Comment":"","CommentCollapsed":true},{"Id":"-92","ModuleId":"BigQuantSpace.features_add.features_add-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-92"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-92"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-92","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":7,"Comment":"","CommentCollapsed":true},{"Id":"-101","ModuleId":"BigQuantSpace.stock_ranker.stock_ranker-v2","ModuleParameters":[{"Name":"learning_algorithm","Value":"排序","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"number_of_leaves","Value":30,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"minimum_docs_per_leaf","Value":1000,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"number_of_trees","Value":20,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"learning_rate","Value":0.1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_bins","Value":1023,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"feature_fraction","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"slim_data","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"training_ds","NodeId":"-101"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-101"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"base_model","NodeId":"-101"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"test_ds","NodeId":"-101"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_model","NodeId":"-101"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"predict_ds","NodeId":"-101"}],"OutputPortsInternal":[{"Name":"model","NodeId":"-101","OutputType":null},{"Name":"predictions","NodeId":"-101","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":9,"Comment":"","CommentCollapsed":true},{"Id":"-112","ModuleId":"BigQuantSpace.join.join-v3","ModuleParameters":[{"Name":"on","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"how","Value":"inner","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"sort","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data1","NodeId":"-112"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-112"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-112","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"Comment":"","CommentCollapsed":true},{"Id":"-124","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2019-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2019-06-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"market","Value":"CN_STOCK_A","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_list","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_count","Value":0,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"rolling_conf","NodeId":"-124"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-124","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":16,"Comment":"","CommentCollapsed":true},{"Id":"-133","ModuleId":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_start_days","Value":90,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-133"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-133"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-133","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":17,"Comment":"","CommentCollapsed":true},{"Id":"-140","ModuleId":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","ModuleParameters":[{"Name":"date_col","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_col","Value":"instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"remove_extra_columns","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-140"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-140"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-140","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":18,"Comment":"","CommentCollapsed":true},{"Id":"-519","ModuleId":"BigQuantSpace.trade.trade-v4","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":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","ValueType":"Literal","LinkedGlobalParameter":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","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"prepare","Value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n pass\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_trading_start","Value":"# 回测引擎:每个单位时间开始前调用一次,即每日开盘前调用一次。\ndef bigquant_run(context, data):\n pass\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"volume_limit","Value":0.025,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"order_price_field_buy","Value":"open","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"order_price_field_sell","Value":"close","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"capital_base","Value":1000000,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"auto_cancel_non_tradable_orders","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"data_frequency","Value":"daily","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"price_type","Value":"后复权","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"product_type","Value":"股票","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"plot_charts","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"backtest_only","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"benchmark","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-519"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"options_data","NodeId":"-519"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"history_ds","NodeId":"-519"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"benchmark_ds","NodeId":"-519"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"trading_calendar","NodeId":"-519"}],"OutputPortsInternal":[{"Name":"raw_perf","NodeId":"-519","OutputType":null}],"UsePreviousResults":false,"moduleIdForCode":8,"Comment":"","CommentCollapsed":true}],"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions><NodePosition Node='-131' Position='-533.82177734375,-98.25742721557617,200,200'/><NodePosition Node='-154' Position='-1045.3366088867188,-83.37623596191406,200,200'/><NodePosition Node='-248' Position='-683,140,200,200'/><NodePosition Node='-271' Position='-533.8811645507812,-249.5841522216797,200,200'/><NodePosition Node='-87' Position='-669,53,200,200'/><NodePosition Node='-93' Position='-973,123,200,200'/><NodePosition Node='-119' Position='190,131,200,200'/><NodePosition Node='-123' Position='-862,242,200,200'/><NodePosition Node='-68' Position='-1078,320,200,200'/><NodePosition Node='-86' Position='-1277,119,200,200'/><NodePosition Node='-92' Position='-533,243,200,200'/><NodePosition Node='-101' Position='-697,498,200,200'/><NodePosition Node='-112' Position='-71,267,200,200'/><NodePosition Node='-124' Position='-69,-54,200,200'/><NodePosition Node='-133' Position='-154,78,200,200'/><NodePosition Node='-140' Position='-144,166,200,200'/><NodePosition Node='-519' Position='-547.4356079101562,624.1484985351562,200,200'/></NodePositions><NodeGroups /></DataV1>"},"IsDraft":true,"ParentExperimentId":null,"WebService":{"IsWebServiceExperiment":false,"Inputs":[],"Outputs":[],"Parameters":[{"Name":"交易日期","Value":"","ParameterDefinition":{"Name":"交易日期","FriendlyName":"交易日期","DefaultValue":"","ParameterType":"String","HasDefaultValue":true,"IsOptional":true,"ParameterRules":[],"HasRules":false,"MarkupType":0,"CredentialDescriptor":null}}],"WebServiceGroupId":null,"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions></NodePositions><NodeGroups /></DataV1>"},"DisableNodesUpdate":false,"Category":"user","Tags":[],"IsPartialRun":true}
[2021-07-24 10:53:14.330229] INFO: moduleinvoker: input_features.v1 开始运行..
[2021-07-24 10:53:14.429705] INFO: moduleinvoker: input_features.v1 运行完成[0.099486s].
[2021-07-24 10:53:14.437988] INFO: moduleinvoker: instruments.v2 开始运行..
[2021-07-24 10:53:14.469010] INFO: moduleinvoker: 命中缓存
[2021-07-24 10:53:14.471415] INFO: moduleinvoker: instruments.v2 运行完成[0.033425s].
[2021-07-24 10:53:14.751582] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2021-07-24 10:53:16.946740] INFO: 基础特征抽取: 年份 2014, 特征行数=141569
[2021-07-24 10:53:20.951171] INFO: 基础特征抽取: 年份 2015, 特征行数=569698
[2021-07-24 10:53:25.364008] INFO: 基础特征抽取: 年份 2016, 特征行数=641546
[2021-07-24 10:53:30.656423] INFO: 基础特征抽取: 年份 2017, 特征行数=743233
[2021-07-24 10:53:32.449705] INFO: 基础特征抽取: 年份 2018, 特征行数=0
[2021-07-24 10:53:32.893576] INFO: 基础特征抽取: 总行数: 2096046
[2021-07-24 10:53:32.899593] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[18.14804s].
[2021-07-24 10:53:32.936173] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-07-24 10:53:51.236683] INFO: derived_feature_extractor: 提取完成 avg_turn_9/2, 0.005s
[2021-07-24 10:53:52.575678] INFO: derived_feature_extractor: /y_2014, 141569
[2021-07-24 10:53:57.643989] INFO: derived_feature_extractor: /y_2015, 569698
[2021-07-24 10:54:03.853774] INFO: derived_feature_extractor: /y_2016, 641546
[2021-07-24 10:54:11.437845] INFO: derived_feature_extractor: /y_2017, 743233
[2021-07-24 10:54:13.240264] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[40.304079s].
[2021-07-24 10:54:13.247436] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2021-07-24 10:54:25.666455] INFO: 自动标注(股票): 加载历史数据: 1954477 行
[2021-07-24 10:54:25.668117] INFO: 自动标注(股票): 开始标注 ..
[2021-07-24 10:54:38.952312] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[25.704889s].
[2021-07-24 10:54:38.957670] INFO: moduleinvoker: join.v3 开始运行..
[2021-07-24 10:54:55.136633] INFO: join: /y_2014, 行数=0/141225, 耗时=2.596513s
[2021-07-24 10:55:01.344256] INFO: join: /y_2015, 行数=560061/567696, 耗时=6.203911s
[2021-07-24 10:55:08.033122] INFO: join: /y_2016, 行数=637303/639514, 耗时=6.673189s
[2021-07-24 10:55:16.034843] INFO: join: /y_2017, 行数=720315/739260, 耗时=7.978903s
[2021-07-24 10:55:16.357745] INFO: join: 最终行数: 1917679
[2021-07-24 10:55:16.461445] INFO: moduleinvoker: join.v3 运行完成[37.503763s].
[2021-07-24 10:55:16.466485] INFO: moduleinvoker: input_features.v1 开始运行..
[2021-07-24 10:55:16.557411] INFO: moduleinvoker: input_features.v1 运行完成[0.090902s].
[2021-07-24 10:55:16.642809] INFO: moduleinvoker: index_feature_extract.v2 开始运行..
[2021-07-24 10:55:19.068082] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-07-24 10:55:19.152459] INFO: derived_feature_extractor: 提取完成 close/shift(close,5)-1, 0.003s
[2021-07-24 10:55:19.155178] INFO: derived_feature_extractor: 提取完成 amount+1, 0.001s
[2021-07-24 10:55:19.161509] INFO: derived_feature_extractor: 提取完成 ta_sma(close,5), 0.005s
[2021-07-24 10:55:19.262997] INFO: derived_feature_extractor: /data, 799
[2021-07-24 10:55:19.371904] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.303811s].
[2021-07-24 10:55:19.633440] INFO: moduleinvoker: index_feature_extract.v2 运行完成[2.99063s].
[2021-07-24 10:55:19.637401] INFO: moduleinvoker: join.v3 开始运行..
[2021-07-24 10:55:19.762667] INFO: join: /y_2014, 行数=0/0, 耗时=0.082779s
[2021-07-24 10:55:25.432053] INFO: join: /y_2015, 行数=560061/560061, 耗时=5.66756s
[2021-07-24 10:55:33.657549] INFO: join: /y_2016, 行数=637303/637303, 耗时=8.109808s
[2021-07-24 10:55:40.344861] INFO: join: /y_2017, 行数=720315/720315, 耗时=6.583569s
[2021-07-24 10:55:40.813765] INFO: join: 最终行数: 1917679
[2021-07-24 10:55:40.840241] INFO: moduleinvoker: join.v3 运行完成[21.202832s].
[2021-07-24 10:55:41.053728] INFO: moduleinvoker: features_add.v1 开始运行..
[2021-07-24 10:55:41.132143] INFO: moduleinvoker: features_add.v1 运行完成[0.078418s].
[2021-07-24 10:55:41.135253] INFO: moduleinvoker: instruments.v2 开始运行..
[2021-07-24 10:55:41.141412] INFO: moduleinvoker: 命中缓存
[2021-07-24 10:55:41.142873] INFO: moduleinvoker: instruments.v2 运行完成[0.007628s].
[2021-07-24 10:55:41.145977] INFO: moduleinvoker: index_feature_extract.v2 开始运行..
[2021-07-24 10:55:42.334433] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-07-24 10:55:42.439661] INFO: derived_feature_extractor: 提取完成 close/shift(close,5)-1, 0.004s
[2021-07-24 10:55:42.442742] INFO: derived_feature_extractor: 提取完成 amount+1, 0.001s
[2021-07-24 10:55:42.451049] INFO: derived_feature_extractor: 提取完成 ta_sma(close,5), 0.006s
[2021-07-24 10:55:42.543113] INFO: derived_feature_extractor: /data, 163
[2021-07-24 10:55:42.596035] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.261603s].
[2021-07-24 10:55:42.866473] INFO: moduleinvoker: index_feature_extract.v2 运行完成[1.72048s].
[2021-07-24 10:55:42.872913] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2021-07-24 10:55:44.762415] INFO: 基础特征抽取: 年份 2018, 特征行数=210561
[2021-07-24 10:55:47.434716] INFO: 基础特征抽取: 年份 2019, 特征行数=353689
[2021-07-24 10:55:47.743870] INFO: 基础特征抽取: 总行数: 564250
[2021-07-24 10:55:47.772804] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[4.899889s].
[2021-07-24 10:55:47.775842] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-07-24 10:55:51.671802] INFO: derived_feature_extractor: 提取完成 avg_turn_9/2, 0.007s
[2021-07-24 10:55:53.142010] INFO: derived_feature_extractor: /y_2018, 210561
[2021-07-24 10:55:55.754942] INFO: derived_feature_extractor: /y_2019, 353689
[2021-07-24 10:55:56.451493] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[8.67564s].
[2021-07-24 10:55:56.455174] INFO: moduleinvoker: join.v3 开始运行..
[2021-07-24 10:55:58.170894] INFO: join: /y_2018, 行数=210388/210388, 耗时=1.688626s
[2021-07-24 10:56:01.272377] INFO: join: /y_2019, 行数=353173/353173, 耗时=3.02312s
[2021-07-24 10:56:01.532753] INFO: join: 最终行数: 563561
[2021-07-24 10:56:01.539729] INFO: moduleinvoker: join.v3 运行完成[5.084547s].
[2021-07-24 10:56:01.683143] INFO: moduleinvoker: stock_ranker.v2 开始运行..
[2021-07-24 10:56:01.749751] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2021-07-24 10:56:04.955200] INFO: StockRanker: 特征预处理 ..
[2021-07-24 10:56:06.491285] INFO: StockRanker: prepare data: training ..
[2021-07-24 10:56:50.748677] INFO: StockRanker训练: ae0bfaba 准备训练: 1917679 行数
[2021-07-24 10:56:50.750325] INFO: StockRanker训练: AI模型训练,将在1917679*5=958.84万数据上对模型训练进行20轮迭代训练。预计将需要4~7分钟。请耐心等待。
[2021-07-24 10:57:01.808940] INFO: StockRanker训练: 正在训练 ..
[2021-07-24 10:57:01.917882] INFO: StockRanker训练: 任务状态: Pending
[2021-07-24 10:57:11.982598] INFO: StockRanker训练: 任务状态: Running
[2021-07-24 10:57:22.038574] INFO: StockRanker训练: 00:00:10.7041316, finished iteration 1
[2021-07-24 10:57:32.084626] INFO: StockRanker训练: 00:00:19.4387831, finished iteration 2
[2021-07-24 10:57:42.191545] INFO: StockRanker训练: 00:00:28.2748171, finished iteration 3
[2021-07-24 10:57:42.193482] INFO: StockRanker训练: 00:00:37.2167778, finished iteration 4
[2021-07-24 10:57:52.256989] INFO: StockRanker训练: 00:00:46.1367153, finished iteration 5
[2021-07-24 10:58:02.295042] INFO: StockRanker训练: 00:00:55.0490116, finished iteration 6
[2021-07-24 10:58:12.345980] INFO: StockRanker训练: 00:01:03.9955782, finished iteration 7
[2021-07-24 10:58:22.389016] INFO: StockRanker训练: 00:01:12.9357211, finished iteration 8
[2021-07-24 10:58:32.432641] INFO: StockRanker训练: 00:01:22.0118322, finished iteration 9
[2021-07-24 10:58:42.473235] INFO: StockRanker训练: 00:01:32.5941830, finished iteration 10
[2021-07-24 10:58:52.520145] INFO: StockRanker训练: 00:01:43.3197190, finished iteration 11
[2021-07-24 10:59:02.568523] INFO: StockRanker训练: 00:01:54.0915555, finished iteration 12
[2021-07-24 10:59:12.611249] INFO: StockRanker训练: 00:02:04.7107458, finished iteration 13
[2021-07-24 10:59:22.669095] INFO: StockRanker训练: 00:02:15.4318368, finished iteration 14
[2021-07-24 10:59:32.710460] INFO: StockRanker训练: 00:02:26.1313917, finished iteration 15
[2021-07-24 10:59:42.767631] INFO: StockRanker训练: 00:02:36.7673941, finished iteration 16
[2021-07-24 10:59:52.809702] INFO: StockRanker训练: 00:02:47.4480993, finished iteration 17
[2021-07-24 11:00:12.907248] INFO: StockRanker训练: 00:02:58.3349167, finished iteration 18
[2021-07-24 11:00:22.970237] INFO: StockRanker训练: 00:03:09.2330610, finished iteration 19
[2021-07-24 11:00:33.011330] INFO: StockRanker训练: 00:03:20.0804348, finished iteration 20
[2021-07-24 11:00:43.067671] INFO: StockRanker训练: 任务状态: Succeeded
[2021-07-24 11:00:46.357215] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[284.607457s].
[2021-07-24 11:00:46.453206] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2021-07-24 11:00:49.342413] INFO: StockRanker预测: /y_2018 ..
[2021-07-24 11:00:52.762577] INFO: StockRanker预测: /y_2019 ..
[2021-07-24 11:00:59.352046] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[12.898823s].
[2021-07-24 11:01:01.867412] INFO: moduleinvoker: stock_ranker.v2 运行完成[300.18425s].
[2021-07-24 11:01:06.694214] INFO: moduleinvoker: backtest.v8 开始运行..
[2021-07-24 11:01:06.732823] INFO: backtest: biglearning backtest:V8.5.0
[2021-07-24 11:01:06.735128] INFO: backtest: product_type:stock by specified
[2021-07-24 11:01:07.850491] INFO: moduleinvoker: cached.v2 开始运行..
[2021-07-24 11:01:36.255190] INFO: backtest: 读取股票行情完成:1315194
[2021-07-24 11:01:45.450042] INFO: moduleinvoker: cached.v2 运行完成[37.59959s].
[2021-07-24 11:01:50.465842] INFO: algo: TradingAlgorithm V1.8.3
[2021-07-24 11:01:51.658808] INFO: algo: trading transform...
[2021-07-24 11:01:58.033135] INFO: Performance: Simulated 99 trading days out of 99.
[2021-07-24 11:01:58.034950] INFO: Performance: first open: 2019-01-02 09:30:00+00:00
[2021-07-24 11:01:58.036221] INFO: Performance: last close: 2019-05-31 15:00:00+00:00
[2021-07-24 11:02:12.133680] INFO: moduleinvoker: backtest.v8 运行完成[65.439482s].
[2021-07-24 11:02:12.135815] INFO: moduleinvoker: trade.v4 运行完成[70.260873s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-b7b988addf824274b357cbf88f4c102f"}/bigcharts-data-end
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-f7ecbc399436493fbc7718a135b62f5a"}/bigcharts-data-end
- 收益率32.78%
- 年化收益率105.81%
- 基准收益率20.56%
- 阿尔法0.5
- 贝塔0.68
- 夏普比率2.73
- 胜率0.59
- 盈亏比1.48
- 收益波动率26.71%
- 信息比率0.07
- 最大回撤8.48%
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-49ede7b7c44c49d18e5e087f5b9d3f7e"}/bigcharts-data-end