{"description":"实验创建于2022/7/29","graph":{"edges":[{"to_node_id":"-124:instruments","from_node_id":"-111:data"},{"to_node_id":"-124:features","from_node_id":"-119:data"},{"to_node_id":"-3256:features","from_node_id":"-119:data"},{"to_node_id":"-3256:input_data","from_node_id":"-124:data"}],"nodes":[{"node_id":"-111","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2018-12-02","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2019-02-01","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-111"}],"output_ports":[{"name":"data","node_id":"-111"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-119","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"max_shift_date=ts_argmax(high_0, 20) #20日高点那天\namount_0\n\nhigh_amount=cal_high_amount(amount_0)#计算高点那天的成交量\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-119"}],"output_ports":[{"name":"data","node_id":"-119"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-124","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-124"},{"name":"features","node_id":"-124"}],"output_ports":[{"name":"data","node_id":"-124"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-3256","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":"False","type":"Literal","bound_global_parameter":null},{"name":"remove_extra_columns","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"#计算高点那天的成交量\ndef func(_x):\n days = 20\n x = _x.copy()\n x.sort_values(\"date\", inplace=True)\n x.reset_index(drop=True, inplace=True)\n x[\"index2\"] = x.index - (days - x.max_shift_date) + 1\n x = x.fillna(0)\n x[\"max_date\"] = x.iloc[x.index2.values,:][\"date\"].values\n x[\"high_amount\"] = x.iloc[x.index2.values,:][\"amount_0\"].values\n\n return x\n\ndef cal_high_amount(df,amount_0): \n result = df.groupby(\"instrument\").apply(func).reset_index(drop=True)\n #合并原df,保证顺序一致\n result = pd.merge(left=df,right=result[['date','instrument','high_amount']],on=['date','instrument'],how='left')\n return result['high_amount']\n\nbigquant_run = {\n 'cal_high_amount': cal_high_amount\n}\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-3256"},{"name":"features","node_id":"-3256"}],"output_ports":[{"name":"data","node_id":"-3256"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-111' Position='803.3778686523438,168.36144161224365,200,200'/><node_position Node='-119' Position='1124.5213012695312,178.84664916992188,200,200'/><node_position Node='-124' Position='1000.0908813476562,283.85652923583984,200,200'/><node_position Node='-3256' Position='1129.8040161132812,395.84667205810547,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-08-03 10:58:40.176042] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-08-03 10:58:40.184049] INFO: moduleinvoker: 命中缓存
[2022-08-03 10:58:40.186640] INFO: moduleinvoker: instruments.v2 运行完成[0.010609s].
[2022-08-03 10:58:40.193053] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-08-03 10:58:40.293526] INFO: moduleinvoker: input_features.v1 运行完成[0.100337s].
[2022-08-03 10:58:40.384293] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-08-03 10:58:40.392353] INFO: moduleinvoker: 命中缓存
[2022-08-03 10:58:40.395568] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.011282s].
[2022-08-03 10:58:40.486815] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-08-03 10:58:46.077974] INFO: derived_feature_extractor: 提取完成 max_shift_date=ts_argmax(high_0, 20) #20日高点那天, 2.602s
[2022-08-03 10:59:25.350181] INFO: derived_feature_extractor: 提取完成 high_amount=cal_high_amount(amount_0)#计算高点那天的成交量, 39.269s
[2022-08-03 10:59:25.672473] INFO: derived_feature_extractor: /y_2018, 70881
[2022-08-03 10:59:26.047275] INFO: derived_feature_extractor: /y_2019, 81866
[2022-08-03 10:59:26.308929] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[45.822089s].