{"Description":"实验创建于6/25/2021","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-622:instruments","SourceOutputPortId":"-598:data"},{"DestinationInputPortId":"-607:instruments","SourceOutputPortId":"-598:data"},{"DestinationInputPortId":"-614:input_data","SourceOutputPortId":"-607:data"},{"DestinationInputPortId":"-811:data2","SourceOutputPortId":"-614:data"},{"DestinationInputPortId":"-811:data1","SourceOutputPortId":"-622:data"},{"DestinationInputPortId":"-1245:input_data","SourceOutputPortId":"-811:data"},{"DestinationInputPortId":"-797:training_ds","SourceOutputPortId":"-1245:data"},{"DestinationInputPortId":"-607:features","SourceOutputPortId":"-1746:data"},{"DestinationInputPortId":"-797:features","SourceOutputPortId":"-1746:data"},{"DestinationInputPortId":"-614:features","SourceOutputPortId":"-1746:data"}],"ModuleNodes":[{"Id":"-598","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"20210101","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"20210601","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":"-598"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-598","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"Comment":"","CommentCollapsed":true},{"Id":"-607","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":"-607"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-607"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-607","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"Comment":"","CommentCollapsed":true},{"Id":"-614","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":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"remove_extra_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"import talib\ndef cal_macd1(df_total,close):\n def get_macd(df):\n close=[float(x) for x in df['close_0']]\n df['MACD'],_,_=talib.MACD(np.array(close),fastperiod=6,slowperiod=12,signalperiod=9)\n return df\n \n df1=df_total.groupby([\"instrument\"]).apply(get_macd)\n merge_df = pd.merge(df_total, df1[['date',\"instrument\",'MACD']], on=['date','instrument'], how='left')\n return merge_df['MACD']\n\ndef cal_macd2(df_total,close):\n def get_macd(df):\n close=[float(x) for x in df['close_0']]\n _,df['MACD2'],_=talib.MACD(np.array(close),fastperiod=6,slowperiod=12,signalperiod=9)\n return df\n \n df1=df_total.groupby([\"instrument\"]).apply(get_macd)\n merge_df = pd.merge(df_total, df1[['date',\"instrument\",'MACD2']], on=['date','instrument'], how='left')\n return merge_df['MACD2']\n\ndef cal_macd3(df_total,close):\n def get_macd(df):\n close=[float(x) for x in df['close_0']]\n _,_,df['MACD3']=talib.MACD(np.array(close),fastperiod=6,slowperiod=12,signalperiod=9)\n return df\n \n df1=df_total.groupby([\"instrument\"]).apply(get_macd)\n merge_df = pd.merge(df_total, df1[['date',\"instrument\",'MACD3']], on=['date','instrument'], how='left')\n return merge_df['MACD3']\n\nbigquant_run = {\n 'cal_macd1':cal_macd1,\n 'cal_macd2':cal_macd2,\n 'cal_macd3':cal_macd3\n}\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-614"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-614"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-614","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"Comment":"","CommentCollapsed":true},{"Id":"-622","ModuleId":"BigQuantSpace.advanced_auto_labeler.advanced_auto_labeler-v2","ModuleParameters":[{"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","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":"-622"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-622","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"Comment":"","CommentCollapsed":true},{"Id":"-797","ModuleId":"BigQuantSpace.stock_ranker_train.stock_ranker_train-v6","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":"2","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"learning_rate","Value":"0.5","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_bins","Value":1023,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"feature_fraction","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"data_row_fraction","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"ndcg_discount_base","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"m_lazy_run","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"training_ds","NodeId":"-797"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-797"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"test_ds","NodeId":"-797"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"base_model","NodeId":"-797"}],"OutputPortsInternal":[{"Name":"model","NodeId":"-797","OutputType":null},{"Name":"feature_gains","NodeId":"-797","OutputType":null},{"Name":"m_lazy_run","NodeId":"-797","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"Comment":"","CommentCollapsed":true},{"Id":"-811","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":"-811"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-811"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-811","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":6,"Comment":"","CommentCollapsed":true},{"Id":"-1245","ModuleId":"BigQuantSpace.dropnan.dropnan-v2","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-1245"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-1245"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-1245","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":8,"Comment":"","CommentCollapsed":true},{"Id":"-1746","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\n\nreturn_5\nmacd1=cal_macd1(close_0)\nmacd2=cal_macd2(close_0)\nmacd3=cal_macd3(close_0)\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"-1746"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-1746","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":7,"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='-598' Position='513,-299,200,200'/><NodePosition Node='-607' Position='861.7161865234375,-179.45822143554688,200,200'/><NodePosition Node='-614' Position='895,18,200,200'/><NodePosition Node='-622' Position='555,8,200,200'/><NodePosition Node='-797' Position='871,491,200,200'/><NodePosition Node='-811' Position='689,170,200,200'/><NodePosition Node='-1245' Position='747,286,200,200'/><NodePosition Node='-1746' Position='1127.58642578125,-328.926513671875,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-06-25 18:09:45.933174] INFO: moduleinvoker: instruments.v2 开始运行..
[2021-06-25 18:09:46.053964] INFO: moduleinvoker: instruments.v2 运行完成[0.120778s].
[2021-06-25 18:09:46.057034] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2021-06-25 18:09:46.740347] INFO: 自动标注(股票): 加载历史数据: 412069 行
[2021-06-25 18:09:46.743168] INFO: 自动标注(股票): 开始标注 ..
[2021-06-25 18:09:48.163598] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[2.106548s].
[2021-06-25 18:09:48.166019] INFO: moduleinvoker: input_features.v1 开始运行..
[2021-06-25 18:09:48.224922] INFO: moduleinvoker: input_features.v1 运行完成[0.058886s].
[2021-06-25 18:09:48.231562] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2021-06-25 18:09:48.979303] INFO: 基础特征抽取: 年份 2020, 特征行数=243745
[2021-06-25 18:09:49.901671] INFO: 基础特征抽取: 年份 2021, 特征行数=412069
[2021-06-25 18:09:50.017989] INFO: 基础特征抽取: 总行数: 655814
[2021-06-25 18:09:50.047610] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[1.816041s].
[2021-06-25 18:09:50.053709] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-06-25 18:09:57.962609] INFO: derived_feature_extractor: 提取完成 macd1=cal_macd1(close_0), 5.427s
[2021-06-25 18:10:04.824032] INFO: derived_feature_extractor: 提取完成 macd2=cal_macd2(close_0), 6.860s
[2021-06-25 18:10:11.780290] INFO: derived_feature_extractor: 提取完成 macd3=cal_macd3(close_0), 6.955s
[2021-06-25 18:10:12.686074] INFO: derived_feature_extractor: /y_2020, 243745
[2021-06-25 18:10:14.305429] INFO: derived_feature_extractor: /y_2021, 412069
[2021-06-25 18:10:14.646236] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[24.592517s].
[2021-06-25 18:10:14.649913] INFO: moduleinvoker: join.v3 开始运行..
[2021-06-25 18:10:17.209486] INFO: join: /y_2020, 行数=0/243745, 耗时=1.092126s
[2021-06-25 18:10:19.308726] INFO: join: /y_2021, 行数=389101/412069, 耗时=2.092336s
[2021-06-25 18:10:19.364966] INFO: join: 最终行数: 389101
[2021-06-25 18:10:19.391997] INFO: moduleinvoker: join.v3 运行完成[4.742071s].
[2021-06-25 18:10:19.397046] INFO: moduleinvoker: dropnan.v2 开始运行..
[2021-06-25 18:10:19.437363] INFO: dropnan: /y_2020, 0/0
[2021-06-25 18:10:19.884576] INFO: dropnan: /y_2021, 385748/389101
[2021-06-25 18:10:19.961262] INFO: dropnan: 行数: 385748/389101
[2021-06-25 18:10:20.008125] INFO: moduleinvoker: dropnan.v2 运行完成[0.611024s].
[2021-06-25 18:10:20.013332] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2021-06-25 18:10:20.338482] INFO: StockRanker: 特征预处理 ..
[2021-06-25 18:10:20.561625] INFO: StockRanker: prepare data: training ..
[2021-06-25 18:10:20.765744] INFO: StockRanker: sort ..
[2021-06-25 18:10:25.749473] INFO: StockRanker训练: 8c075804 准备训练: 385748 行数
[2021-06-25 18:10:25.751156] INFO: StockRanker训练: AI模型训练,将在385748*4=154.30万数据上对模型训练进行2轮迭代训练。预计将需要1~2分钟。请耐心等待。
[2021-06-25 18:10:26.135334] INFO: StockRanker训练: 正在训练 ..
[2021-06-25 18:10:26.225172] INFO: StockRanker训练: 任务状态: Pending
[2021-06-25 18:10:36.270087] INFO: StockRanker训练: 任务状态: Running
[2021-06-25 18:10:46.318863] INFO: StockRanker训练: 00:00:08.3402900, finished iteration 1
[2021-06-25 18:10:46.320519] INFO: StockRanker训练: 00:00:15.8868626, finished iteration 2
[2021-06-25 18:10:46.321733] INFO: StockRanker训练: 任务状态: Succeeded
[2021-06-25 18:10:46.546391] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[26.533058s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-e7300b45666a49c48855c8b376b6a34e"}/bigcharts-data-end