{"Description":"实验创建于2017/8/26","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-580:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"DestinationInputPortId":"-587:input_data","SourceOutputPortId":"-580:data"},{"DestinationInputPortId":"-643:input_1","SourceOutputPortId":"-580:data"},{"DestinationInputPortId":"-659:data2","SourceOutputPortId":"-587:data"},{"DestinationInputPortId":"-580:features","SourceOutputPortId":"-635:data"},{"DestinationInputPortId":"-587:features","SourceOutputPortId":"-635:data"},{"DestinationInputPortId":"-659:data1","SourceOutputPortId":"-643:data_1"},{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:input_data","SourceOutputPortId":"-659:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2010-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":true,"moduleIdForCode":1,"Comment":"","CommentCollapsed":true},{"Id":"-580","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":0,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-580"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-580"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-580","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":15,"Comment":"","CommentCollapsed":true},{"Id":"-587","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":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-587"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-587"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-587","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":16,"Comment":"","CommentCollapsed":true},{"Id":"-635","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nclose_0\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"-635"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-635","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":20,"Comment":"","CommentCollapsed":true},{"Id":"-643","ModuleId":"BigQuantSpace.cached.cached-v3","ModuleParameters":[{"Name":"run","Value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n input_df = input_1.read_df().reset_index(drop='True')\n import talib\n def cal_macd(df):\n # 取出close_0列的数据转化为float\n close = [float(x) for x in df['close_0']]\n # 调用talib计算MACD指标\n df['MACD'],df['MACDsignal'],df['MACDhist'] = talib.MACD(np.array(close),\n fastperiod=6, slowperiod=12, signalperiod=9)\n return df[['date','instrument','MACD','MACDsignal','MACDhist']]\n \n result = input_df.groupby('instrument').apply(cal_macd)\n \n data_1 = DataSource.write_df(result)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"post_run","Value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"input_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"params","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"output_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-643"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-643"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_3","NodeId":"-643"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-643","OutputType":null},{"Name":"data_2","NodeId":"-643","OutputType":null},{"Name":"data_3","NodeId":"-643","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":21,"Comment":"使用TALIB计算MACD","CommentCollapsed":false},{"Id":"-659","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":"-659"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-659"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-659","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":22,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84","ModuleId":"BigQuantSpace.dropnan.dropnan-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-84"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-84","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":13,"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='226.37481689453125,52.261558532714844,200,200'/><NodePosition Node='-580' Position='377.7903747558594,151.25201416015625,200,200'/><NodePosition Node='-587' Position='540.322509765625,270.78599548339844,200,200'/><NodePosition Node='-635' Position='571.5236206054688,55.174461364746094,200,200'/><NodePosition Node='-643' Position='218.75726318359375,247.35305786132812,200,200'/><NodePosition Node='-659' Position='386.6422424316406,368.4423828125,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-84' Position='399.6933288574219,447.2556457519531,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}
[2019-01-31 17:45:07.663917] INFO: bigquant: instruments.v2 开始运行..
[2019-01-31 17:45:07.669900] INFO: bigquant: 命中缓存
[2019-01-31 17:45:07.670841] INFO: bigquant: instruments.v2 运行完成[0.006965s].
[2019-01-31 17:45:07.673695] INFO: bigquant: input_features.v1 开始运行..
[2019-01-31 17:45:07.681969] INFO: bigquant: 命中缓存
[2019-01-31 17:45:07.683245] INFO: bigquant: input_features.v1 运行完成[0.009545s].
[2019-01-31 17:45:07.689325] INFO: bigquant: general_feature_extractor.v7 开始运行..
[2019-01-31 17:45:07.696939] INFO: bigquant: 命中缓存
[2019-01-31 17:45:07.697871] INFO: bigquant: general_feature_extractor.v7 运行完成[0.008527s].
[2019-01-31 17:45:07.704312] INFO: bigquant: cached.v3 开始运行..
[2019-01-31 17:45:18.872392] INFO: bigquant: cached.v3 运行完成[11.168057s].
[2019-01-31 17:45:18.875762] INFO: bigquant: derived_feature_extractor.v3 开始运行..
[2019-01-31 17:45:20.465143] INFO: derived_feature_extractor: /y_2010, 431567
[2019-01-31 17:45:20.768943] INFO: derived_feature_extractor: /y_2011, 511455
[2019-01-31 17:45:21.135752] INFO: derived_feature_extractor: /y_2012, 565675
[2019-01-31 17:45:21.655776] INFO: derived_feature_extractor: /y_2013, 564168
[2019-01-31 17:45:22.072901] INFO: derived_feature_extractor: /y_2014, 569948
[2019-01-31 17:45:22.378375] INFO: bigquant: derived_feature_extractor.v3 运行完成[3.502607s].
[2019-01-31 17:45:22.381415] INFO: bigquant: join.v3 开始运行..
[2019-01-31 17:45:24.299289] INFO: join: /y_2010, 行数=431567/431567, 耗时=1.122331s
[2019-01-31 17:45:25.419830] INFO: join: /y_2011, 行数=511455/511455, 耗时=1.10641s
[2019-01-31 17:45:26.594084] INFO: join: /y_2012, 行数=565675/565675, 耗时=1.158063s
[2019-01-31 17:45:27.796419] INFO: join: /y_2013, 行数=564168/564168, 耗时=1.184346s
[2019-01-31 17:45:29.170091] INFO: join: /y_2014, 行数=569948/569948, 耗时=1.355755s
[2019-01-31 17:45:29.293802] INFO: join: 最终行数: 2642813
[2019-01-31 17:45:29.295900] INFO: bigquant: join.v3 运行完成[6.914494s].
[2019-01-31 17:45:29.298477] INFO: bigquant: dropnan.v1 开始运行..
[2019-01-31 17:45:29.713939] INFO: dropnan: /y_2010, 393502/431567
[2019-01-31 17:45:30.162625] INFO: dropnan: /y_2011, 505840/511455
[2019-01-31 17:45:30.659738] INFO: dropnan: /y_2012, 562476/565675
[2019-01-31 17:45:31.145791] INFO: dropnan: /y_2013, 563950/564168
[2019-01-31 17:45:31.652441] INFO: dropnan: /y_2014, 567723/569948
[2019-01-31 17:45:31.674068] INFO: dropnan: 行数: 2593491/2642813
[2019-01-31 17:45:31.693321] INFO: bigquant: dropnan.v1 运行完成[2.394807s].