{"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"-288:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-295:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-288:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-831:input_1","from_node_id":"-86:data"},{"to_node_id":"-295:input_data","from_node_id":"-288:data"},{"to_node_id":"-86:input_data","from_node_id":"-295:data"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\nreturn_5\nreturn_10\nreturn_20\navg_amount_0/avg_amount_5\navg_amount_5/avg_amount_20\nrank_avg_amount_0/rank_avg_amount_5\nrank_avg_amount_5/rank_avg_amount_10\nrank_return_0\nrank_return_5\nrank_return_10\nrank_return_0/rank_return_5\nrank_return_5/rank_return_10\npe_ttm_0\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2015-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2017-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"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":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"cacheable":true,"seq_num":9,"comment":"预测数据,用于回测和模拟","comment_collapsed":false},{"node_id":"-86","module_id":"BigQuantSpace.dropnan.dropnan-v1","parameters":[],"input_ports":[{"name":"input_data","node_id":"-86"}],"output_ports":[{"name":"data","node_id":"-86"}],"cacheable":true,"seq_num":14,"comment":"","comment_collapsed":true},{"node_id":"-288","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":"60","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-288"},{"name":"features","node_id":"-288"}],"output_ports":[{"name":"data","node_id":"-288"}],"cacheable":true,"seq_num":17,"comment":"","comment_collapsed":true},{"node_id":"-295","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":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-295"},{"name":"features","node_id":"-295"}],"output_ports":[{"name":"data","node_id":"-295"}],"cacheable":true,"seq_num":18,"comment":"","comment_collapsed":true},{"node_id":"-831","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 新建一个list\n score_lst = {}\n # 写一个循环,依次调用固化的模型来做预测\n for table_name in ['model_stockranker1','model_stockranker2','model_stockranker3','model_stockranker4']:\n data = pd.read_pickle('/home/bigquant/work/userlib/%s.csv'%table_name)\n model_ds = DataSource.write_pickle(data.iloc[0].values[0])\n # 调用预测函数\n m_pred = M.stock_ranker_predict.v5(\n model=model_ds, # 导入训练好的模型\n data=input_1, # 导入input_1作为要预测的数据集使用\n m_lazy_run=False\n )\n score = m_pred.predictions.read() # 读取预测的score\n score_lst[table_name] = score # 放入之前建好的list里面\n data_1 = DataSource.write_pickle(score_lst)\n return Outputs(data_1=data_1)","type":"Literal","bound_global_parameter":null},{"name":"post_run","value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","type":"Literal","bound_global_parameter":null},{"name":"input_ports","value":"","type":"Literal","bound_global_parameter":null},{"name":"params","value":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-831"},{"name":"input_2","node_id":"-831"},{"name":"input_3","node_id":"-831"}],"output_ports":[{"name":"data_1","node_id":"-831"},{"name":"data_2","node_id":"-831"},{"name":"data_3","node_id":"-831"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='765,21,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='775,130,200,200'/><node_position Node='-86' Position='772,537,200,200'/><node_position Node='-288' Position='775,272,200,200'/><node_position Node='-295' Position='777,407,200,200'/><node_position Node='-831' Position='772,671,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-02-25 21:00:38.486431] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-02-25 21:00:38.654820] INFO: moduleinvoker: 命中缓存
[2022-02-25 21:00:38.656736] INFO: moduleinvoker: input_features.v1 运行完成[0.170319s].
[2022-02-25 21:00:38.664120] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-02-25 21:00:38.680132] INFO: moduleinvoker: 命中缓存
[2022-02-25 21:00:38.682949] INFO: moduleinvoker: instruments.v2 运行完成[0.018815s].
[2022-02-25 21:00:38.700278] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-02-25 21:00:38.707881] INFO: moduleinvoker: 命中缓存
[2022-02-25 21:00:38.709573] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.009316s].
[2022-02-25 21:00:38.719981] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-02-25 21:00:38.738451] INFO: moduleinvoker: 命中缓存
[2022-02-25 21:00:38.741970] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.021961s].
[2022-02-25 21:00:38.756208] INFO: moduleinvoker: dropnan.v1 开始运行..
[2022-02-25 21:00:38.766785] INFO: moduleinvoker: 命中缓存
[2022-02-25 21:00:38.769733] INFO: moduleinvoker: dropnan.v1 运行完成[0.013543s].
[2022-02-25 21:00:38.787847] INFO: moduleinvoker: cached.v3 开始运行..
[2022-02-25 21:00:38.860363] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-25 21:00:39.171992] INFO: StockRanker预测: /y_2014 ..
[2022-02-25 21:00:39.718160] INFO: StockRanker预测: /y_2015 ..
[2022-02-25 21:00:41.116668] INFO: StockRanker预测: /y_2016 ..
[2022-02-25 21:00:44.393349] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[5.532981s].
[2022-02-25 21:00:44.825862] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-25 21:00:45.251020] INFO: StockRanker预测: /y_2014 ..
[2022-02-25 21:00:46.158681] INFO: StockRanker预测: /y_2015 ..
[2022-02-25 21:00:47.775028] INFO: StockRanker预测: /y_2016 ..
[2022-02-25 21:00:50.813393] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[5.987526s].
[2022-02-25 21:00:51.135719] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-25 21:00:51.661698] INFO: StockRanker预测: /y_2014 ..
[2022-02-25 21:00:52.725568] INFO: StockRanker预测: /y_2015 ..
[2022-02-25 21:00:54.249743] INFO: StockRanker预测: /y_2016 ..
[2022-02-25 21:00:57.239874] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[6.104149s].
[2022-02-25 21:00:57.694427] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-25 21:00:57.868639] INFO: StockRanker预测: /y_2014 ..
[2022-02-25 21:00:58.369348] INFO: StockRanker预测: /y_2015 ..
[2022-02-25 21:00:59.975622] INFO: StockRanker预测: /y_2016 ..
[2022-02-25 21:01:03.055585] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[5.361143s].
[2022-02-25 21:01:05.303446] INFO: moduleinvoker: cached.v3 运行完成[26.515609s].