{"Description":"实验创建于2017/8/26","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-215:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"DestinationInputPortId":"-215:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-222:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-222:input_data","SourceOutputPortId":"-215:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2014-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2015-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":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","OutputType":null}],"UsePreviousResults":false,"moduleIdForCode":1,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\nopen = open_0 # 表示个股开盘价\nclose = close_0 # 个股收盘价\nbenchmark_open = cal_bm_open() # 基准指数开盘价\nbenchmark_close = cal_bm_close() # 基准指数收盘价\naddx(close_0,open_0) # 自定义一个表达式\n\n# 构建我们希望得到的衍生因子\nsum(where((close/open-benchmark_close/benchmark_open)<0 , (close/open-benchmark_close/benchmark_open)**2, 0), 60)\n\n\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-215","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":"-215"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-215"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-215","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":15,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-222","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":"def cal_bm_open(df):\n bm_df = DataSource('bar1d_index_CN_STOCK_A').read(instruments=['000300.HIX'])\n bm_df.rename(columns={'open':'benchmark_open'}, inplace=True)\n merge_df = pd.merge(df, bm_df[['date','benchmark_open']], on='date', how='left')\n return merge_df['benchmark_open']\n\ndef cal_bm_close(df):\n bm_df = DataSource('bar1d_index_CN_STOCK_A').read(instruments=['000300.HIX'])\n bm_df.rename(columns={'close':'benchmark_close'}, inplace=True)\n merge_df = pd.merge(df, bm_df[['date','benchmark_close']], on='date', how='left')\n return merge_df['benchmark_close']\n\ndef addx(df, x1, x2):\n return x1+x2\n\nbigquant_run = {\n 'cal_bm_open': cal_bm_open,\n 'cal_bm_close': cal_bm_close,\n 'addx':addx\n}\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-222"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-222"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-222","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":16,"IsPartOfPartialRun":null,"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='287d2cb0-f53c-4101-bdf8-104b137c8601-8' Position='127.41879272460938,-10.02908706665039,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='614.553955078125,7.594470977783203,200,200'/><NodePosition Node='-215' Position='259.21026611328125,156.95555114746094,200,200'/><NodePosition Node='-222' Position='272.76239013671875,258.5076904296875,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":false}
[2021-06-18 15:50:06.694811] INFO: moduleinvoker: instruments.v2 开始运行..
[2021-06-18 15:50:06.803803] INFO: moduleinvoker: instruments.v2 运行完成[0.108994s].
[2021-06-18 15:50:06.806462] INFO: moduleinvoker: input_features.v1 开始运行..
[2021-06-18 15:50:06.860494] INFO: moduleinvoker: input_features.v1 运行完成[0.054018s].
[2021-06-18 15:50:06.869862] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2021-06-18 15:50:07.204686] INFO: 基础特征抽取: 年份 2013, 特征行数=1146
[2021-06-18 15:50:07.561335] INFO: 基础特征抽取: 年份 2014, 特征行数=4358
[2021-06-18 15:50:07.799363] INFO: 基础特征抽取: 年份 2015, 特征行数=0
[2021-06-18 15:50:07.858162] INFO: 基础特征抽取: 总行数: 5504
[2021-06-18 15:50:07.863787] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.993914s].
[2021-06-18 15:50:07.873120] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2021-06-18 15:50:07.977920] INFO: derived_feature_extractor: 提取完成 open = open_0, 0.001s
[2021-06-18 15:50:07.980393] INFO: derived_feature_extractor: 提取完成 close = close_0, 0.001s
[2021-06-18 15:50:11.629835] INFO: derived_feature_extractor: 提取完成 benchmark_open = cal_bm_open(), 3.648s
[2021-06-18 15:50:13.584372] INFO: derived_feature_extractor: 提取完成 benchmark_close = cal_bm_close(), 1.953s
[2021-06-18 15:50:13.588201] INFO: derived_feature_extractor: 提取完成 addx(close_0,open_0), 0.002s
[2021-06-18 15:50:13.605671] INFO: derived_feature_extractor: 提取完成 sum( where( (close/open-benchmark_close/benchmark_open) <0 , (close/open-benchmark_close/benchmark_open)**2, 0) , 60), 0.016s
[2021-06-18 15:50:13.664711] INFO: derived_feature_extractor: /y_2013, 1146
[2021-06-18 15:50:13.744273] INFO: derived_feature_extractor: /y_2014, 4358
[2021-06-18 15:50:13.841562] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[5.968465s].