{"description":"实验创建于2022/11/24","graph":{"edges":[{"to_node_id":"-49:input_data","from_node_id":"-1452:data"},{"to_node_id":"-3513:input_data","from_node_id":"-49:data"},{"to_node_id":"-3513:features","from_node_id":"-3200:data"}],"nodes":[{"node_id":"-1452","module_id":"BigQuantSpace.use_datasource.use_datasource-v2","parameters":[{"name":"datasource_id","value":"bar1d_index_CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2013-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-11-26","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"1","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-1452"},{"name":"features","node_id":"-1452"}],"output_ports":[{"name":"data","node_id":"-1452"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"-49","module_id":"BigQuantSpace.filter.filter-v3","parameters":[{"name":"expr","value":"instrument=='000001.HIX'","type":"Literal","bound_global_parameter":null},{"name":"output_left_data","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-49"}],"output_ports":[{"name":"data","node_id":"-49"},{"name":"left_data","node_id":"-49"}],"cacheable":true,"seq_num":7,"comment":"","comment_collapsed":true},{"node_id":"-3200","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"volume=volume\n#close 衍生特征\nclose\nma_10=ts_mean('close',10)\nma_20=ts_mean('close',20)\nma_50=ts_mean('close',50)\n#return 衍生特征\nreturn_1=close/ts_delay('close',1)\nreturn_5=close/ts_delay('close',5)\nreturn_10=close/ts_delay('close',10)\nreturn_20=close/ts_delay('close',20)\nr1r5=return_1/return_5\nr5r10=return_5/return_10\nr10r20=return_10/return_20\n# Beta\nbeta_10=beta(10)\nbeta_20=beta(20)\nbeta_50=beta(50)","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-3200"}],"output_ports":[{"name":"data","node_id":"-3200"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-3513","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":"True","type":"Literal","bound_global_parameter":null},{"name":"remove_extra_columns","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"def ts_delay(df,f,d):\n return df[f].shift(d)\ndef ts_std(df,f,d):\n return df[f].rolling(d).std()\ndef ts_mean(df,f,d):\n return df[f].rolling(d).mean()\ndef beta(df,d):\n benchmark = ['000300.SHA'] # 以沪深300为基准计算beta值\n benchmark_df=D.history_data(benchmark,fields=['close'],start_date='2015-01-01',end_date='2020-01-01')\n df[\"close_pct\"]=df['close'].pct_change()\n benchmark_df[\"close_pct\"]=benchmark_df['close'].pct_change()\n return (df['close_pct'].rolling(d).cov(benchmark_df['close_pct']))/benchmark_df['close_pct'].rolling(d).var()\nbigquant_run = {\n 'beta':beta,\n 'ts_delay':ts_delay,\n 'ts_mean':ts_mean,\n 'ts_std':ts_std,\n}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-3513"},{"name":"features","node_id":"-3513"}],"output_ports":[{"name":"data","node_id":"-3513"}],"cacheable":true,"seq_num":9,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-1452' Position='283,-154,200,200'/><node_position Node='-49' Position='292,-13,200,200'/><node_position Node='-3200' Position='-45,-152,200,200'/><node_position Node='-3513' Position='290,77,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-11-26 17:15:11.704926] INFO: moduleinvoker: use_datasource.v2 开始运行..
[2022-11-26 17:15:13.354408] INFO: moduleinvoker: use_datasource.v2 运行完成[1.649582s].
[2022-11-26 17:15:13.365591] INFO: moduleinvoker: filter.v3 开始运行..
[2022-11-26 17:15:13.379957] INFO: filter: 使用表达式 instrument=='000001.HIX' 过滤
[2022-11-26 17:15:15.613512] INFO: filter: 过滤 /data, 2406/0/1186230
[2022-11-26 17:15:15.647816] INFO: moduleinvoker: filter.v3 运行完成[2.282215s].
[2022-11-26 17:15:15.655601] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-11-26 17:15:15.666754] INFO: moduleinvoker: 命中缓存
[2022-11-26 17:15:15.668650] INFO: moduleinvoker: input_features.v1 运行完成[0.013065s].
[2022-11-26 17:15:15.681895] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-11-26 17:15:15.768401] INFO: derived_feature_extractor: 提取完成 volume=volume, 0.001s
[2022-11-26 17:15:15.772837] INFO: derived_feature_extractor: 提取完成 ma_10=ts_mean('close',10), 0.002s
[2022-11-26 17:15:15.776726] INFO: derived_feature_extractor: 提取完成 ma_20=ts_mean('close',20), 0.002s
[2022-11-26 17:15:15.780426] INFO: derived_feature_extractor: 提取完成 ma_50=ts_mean('close',50), 0.002s
[2022-11-26 17:15:15.785057] INFO: derived_feature_extractor: 提取完成 return_1=close/ts_delay('close',1), 0.003s
[2022-11-26 17:15:15.789314] INFO: derived_feature_extractor: 提取完成 return_5=close/ts_delay('close',5), 0.002s
[2022-11-26 17:15:15.794093] INFO: derived_feature_extractor: 提取完成 return_10=close/ts_delay('close',10), 0.002s
[2022-11-26 17:15:15.798923] INFO: derived_feature_extractor: 提取完成 return_20=close/ts_delay('close',20), 0.002s
[2022-11-26 17:15:15.803068] INFO: derived_feature_extractor: 提取完成 r1r5=return_1/return_5, 0.002s
[2022-11-26 17:15:15.807656] INFO: derived_feature_extractor: 提取完成 r5r10=return_5/return_10, 0.002s
[2022-11-26 17:15:15.812879] INFO: derived_feature_extractor: 提取完成 r10r20=return_10/return_20, 0.003s
[2022-11-26 17:15:16.094327] INFO: derived_feature_extractor: 提取完成 beta_10=beta(10), 0.279s
[2022-11-26 17:15:16.307249] INFO: derived_feature_extractor: 提取完成 beta_20=beta(20), 0.211s
[2022-11-26 17:15:16.540065] INFO: derived_feature_extractor: 提取完成 beta_50=beta(50), 0.231s
[2022-11-26 17:15:16.594343] INFO: derived_feature_extractor: /data, 2406
[2022-11-26 17:15:16.673730] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.99183s].