{"description":"实验创建于2017/11/15","graph":{"edges":[{"to_node_id":"-692:input_data","from_node_id":"-316:data"},{"to_node_id":"-1455:features_ds","from_node_id":"-2295:data"},{"to_node_id":"-16485:features","from_node_id":"-2295:data"},{"to_node_id":"-25695:features","from_node_id":"-2295:data"},{"to_node_id":"-16481:input_data","from_node_id":"-2290:data"},{"to_node_id":"-289:instruments","from_node_id":"-620:data"},{"to_node_id":"-300:instruments","from_node_id":"-620:data"},{"to_node_id":"-78633:input_data","from_node_id":"-692:data"},{"to_node_id":"-2290:data1","from_node_id":"-289:data"},{"to_node_id":"-307:input_data","from_node_id":"-300:data"},{"to_node_id":"-33712:input_data","from_node_id":"-307:data"},{"to_node_id":"-316:instruments","from_node_id":"-322:data"},{"to_node_id":"-7398:instruments","from_node_id":"-322:data"},{"to_node_id":"-2290:data2","from_node_id":"-33712:data"},{"to_node_id":"-16485:input_data","from_node_id":"-78633:data"},{"to_node_id":"-300:features","from_node_id":"-1455:data"},{"to_node_id":"-307:features","from_node_id":"-1455:data"},{"to_node_id":"-316:features","from_node_id":"-1455:data"},{"to_node_id":"-692:features","from_node_id":"-1455:data"},{"to_node_id":"-25695:training_ds","from_node_id":"-16481:data"},{"to_node_id":"-25695:test_ds","from_node_id":"-16481:data"},{"to_node_id":"-25695:predict_ds","from_node_id":"-16485:data"},{"to_node_id":"-7398:options_data","from_node_id":"-25695:predictions"}],"nodes":[{"node_id":"-316","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":"365","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-316"},{"name":"features","node_id":"-316"}],"output_ports":[{"name":"data","node_id":"-316"}],"cacheable":true,"seq_num":16,"comment":"","comment_collapsed":true},{"node_id":"-2295","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"return_0\nturn_0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-2295"}],"output_ports":[{"name":"data","node_id":"-2295"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-2290","module_id":"BigQuantSpace.join.join-v3","parameters":[{"name":"on","value":"date,instrument","type":"Literal","bound_global_parameter":null},{"name":"how","value":"inner","type":"Literal","bound_global_parameter":null},{"name":"sort","value":"True","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"data1","node_id":"-2290"},{"name":"data2","node_id":"-2290"}],"output_ports":[{"name":"data","node_id":"-2290"}],"cacheable":true,"seq_num":17,"comment":"标注特征连接","comment_collapsed":true},{"node_id":"-620","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2020-12-24","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-05-31","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":"-620"}],"output_ports":[{"name":"data","node_id":"-620"}],"cacheable":true,"seq_num":24,"comment":"","comment_collapsed":true},{"node_id":"-692","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":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-692"},{"name":"features","node_id":"-692"}],"output_ports":[{"name":"data","node_id":"-692"}],"cacheable":true,"seq_num":26,"comment":"","comment_collapsed":true},{"node_id":"-289","module_id":"BigQuantSpace.advanced_auto_labeler.advanced_auto_labeler-v2","parameters":[{"name":"label_expr","value":"# #号开始的表示注释\n# 0. 每行一个,顺序执行,从第二个开始,可以使用label字段\n# 1. 可用数据字段见 https://bigquant.com/docs/data_history_data.html\n# 添加benchmark_前缀,可使用对应的benchmark数据\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/big_expr.html>`_\n\n# 计算收益:2日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)\nshift(close, -2) / shift(open, -1)-1\n\n# 极值处理:用1%和99%分位的值做clip\nclip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))\n\n\n# 将分数映射到分类,这里使用30个分类\nall_wbins(label, 20)\n\n\n# 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)\nwhere(shift(high, -1) == shift(low, -1), NaN, label)\n\n","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.SHA","type":"Literal","bound_global_parameter":null},{"name":"drop_na_label","value":"True","type":"Literal","bound_global_parameter":null},{"name":"cast_label_int","value":"False","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-289"}],"output_ports":[{"name":"data","node_id":"-289"}],"cacheable":true,"seq_num":21,"comment":"","comment_collapsed":true},{"node_id":"-300","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":"365","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-300"},{"name":"features","node_id":"-300"}],"output_ports":[{"name":"data","node_id":"-300"}],"cacheable":true,"seq_num":22,"comment":"","comment_collapsed":true},{"node_id":"-307","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":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-307"},{"name":"features","node_id":"-307"}],"output_ports":[{"name":"data","node_id":"-307"}],"cacheable":true,"seq_num":23,"comment":"","comment_collapsed":true},{"node_id":"-322","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-06-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-12-31","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":"-322"}],"output_ports":[{"name":"data","node_id":"-322"}],"cacheable":true,"seq_num":28,"comment":"","comment_collapsed":true},{"node_id":"-33712","module_id":"BigQuantSpace.chinaa_stock_filter.chinaa_stock_filter-v1","parameters":[{"name":"index_constituent_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%8150%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%8150%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B2%AA%E6%B7%B1300%22%2C%22displayValue%22%3A%22%E6%B2%AA%E6%B7%B1300%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81500%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81500%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81800%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81800%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%81180%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%81180%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81100%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81100%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B7%B1%E8%AF%81100%22%2C%22displayValue%22%3A%22%E6%B7%B1%E8%AF%81100%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"board_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E6%B7%B1%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22displayValue%22%3A%22%E6%B7%B1%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%88%9B%E4%B8%9A%E6%9D%BF%22%2C%22displayValue%22%3A%22%E5%88%9B%E4%B8%9A%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E7%A7%91%E5%88%9B%E6%9D%BF%22%2C%22displayValue%22%3A%22%E7%A7%91%E5%88%9B%E6%9D%BF%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"industry_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%BA%A4%E9%80%9A%E8%BF%90%E8%BE%93%22%2C%22displayValue%22%3A%22%E4%BA%A4%E9%80%9A%E8%BF%90%E8%BE%93%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%BC%91%E9%97%B2%E6%9C%8D%E5%8A%A1%22%2C%22displayValue%22%3A%22%E4%BC%91%E9%97%B2%E6%9C%8D%E5%8A%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%BC%A0%E5%AA%92%2F%E4%BF%A1%E6%81%AF%E6%9C%8D%E5%8A%A1%22%2C%22displayValue%22%3A%22%E4%BC%A0%E5%AA%92%2F%E4%BF%A1%E6%81%AF%E6%9C%8D%E5%8A%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%85%AC%E7%94%A8%E4%BA%8B%E4%B8%9A%22%2C%22displayValue%22%3A%22%E5%85%AC%E7%94%A8%E4%BA%8B%E4%B8%9A%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%86%9C%E6%9E%97%E7%89%A7%E6%B8%94%22%2C%22displayValue%22%3A%22%E5%86%9C%E6%9E%97%E7%89%A7%E6%B8%94%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%8C%96%E5%B7%A5%22%2C%22displayValue%22%3A%22%E5%8C%96%E5%B7%A5%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%8C%BB%E8%8D%AF%E7%94%9F%E7%89%A9%22%2C%22displayValue%22%3A%22%E5%8C%BB%E8%8D%AF%E7%94%9F%E7%89%A9%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%95%86%E4%B8%9A%E8%B4%B8%E6%98%93%22%2C%22displayValue%22%3A%22%E5%95%86%E4%B8%9A%E8%B4%B8%E6%98%93%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%9B%BD%E9%98%B2%E5%86%9B%E5%B7%A5%22%2C%22displayValue%22%3A%22%E5%9B%BD%E9%98%B2%E5%86%9B%E5%B7%A5%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%AE%B6%E7%94%A8%E7%94%B5%E5%99%A8%22%2C%22displayValue%22%3A%22%E5%AE%B6%E7%94%A8%E7%94%B5%E5%99%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%BB%BA%E7%AD%91%E6%9D%90%E6%96%99%2F%E5%BB%BA%E7%AD%91%E5%BB%BA%E6%9D%90%22%2C%22displayValue%22%3A%22%E5%BB%BA%E7%AD%91%E6%9D%90%E6%96%99%2F%E5%BB%BA%E7%AD%91%E5%BB%BA%E6%9D%90%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%BB%BA%E7%AD%91%E8%A3%85%E9%A5%B0%22%2C%22displayValue%22%3A%22%E5%BB%BA%E7%AD%91%E8%A3%85%E9%A5%B0%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%88%BF%E5%9C%B0%E4%BA%A7%22%2C%22displayValue%22%3A%22%E6%88%BF%E5%9C%B0%E4%BA%A7%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9C%89%E8%89%B2%E9%87%91%E5%B1%9E%22%2C%22displayValue%22%3A%22%E6%9C%89%E8%89%B2%E9%87%91%E5%B1%9E%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9C%BA%E6%A2%B0%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E6%9C%BA%E6%A2%B0%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B1%BD%E8%BD%A6%2F%E4%BA%A4%E8%BF%90%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E6%B1%BD%E8%BD%A6%2F%E4%BA%A4%E8%BF%90%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%94%B5%E5%AD%90%22%2C%22displayValue%22%3A%22%E7%94%B5%E5%AD%90%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%94%B5%E6%B0%94%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E7%94%B5%E6%B0%94%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%BA%BA%E7%BB%87%E6%9C%8D%E8%A3%85%22%2C%22displayValue%22%3A%22%E7%BA%BA%E7%BB%87%E6%9C%8D%E8%A3%85%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%BB%BC%E5%90%88%22%2C%22displayValue%22%3A%22%E7%BB%BC%E5%90%88%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E8%AE%A1%E7%AE%97%E6%9C%BA%22%2C%22displayValue%22%3A%22%E8%AE%A1%E7%AE%97%E6%9C%BA%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E8%BD%BB%E5%B7%A5%E5%88%B6%E9%80%A0%22%2C%22displayValue%22%3A%22%E8%BD%BB%E5%B7%A5%E5%88%B6%E9%80%A0%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%80%9A%E4%BF%A1%22%2C%22displayValue%22%3A%22%E9%80%9A%E4%BF%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%87%87%E6%8E%98%22%2C%22displayValue%22%3A%22%E9%87%87%E6%8E%98%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%92%A2%E9%93%81%22%2C%22displayValue%22%3A%22%E9%92%A2%E9%93%81%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%93%B6%E8%A1%8C%22%2C%22displayValue%22%3A%22%E9%93%B6%E8%A1%8C%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%9D%9E%E9%93%B6%E9%87%91%E8%9E%8D%22%2C%22displayValue%22%3A%22%E9%9D%9E%E9%93%B6%E9%87%91%E8%9E%8D%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%A3%9F%E5%93%81%E9%A5%AE%E6%96%99%22%2C%22displayValue%22%3A%22%E9%A3%9F%E5%93%81%E9%A5%AE%E6%96%99%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"st_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%AD%A3%E5%B8%B8%22%2C%22displayValue%22%3A%22%E6%AD%A3%E5%B8%B8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22ST%22%2C%22displayValue%22%3A%22ST%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22*ST%22%2C%22displayValue%22%3A%22*ST%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9A%82%E5%81%9C%E4%B8%8A%E5%B8%82%22%2C%22displayValue%22%3A%22%E6%9A%82%E5%81%9C%E4%B8%8A%E5%B8%82%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"delist_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%80%80%E5%B8%82%22%2C%22displayValue%22%3A%22%E9%80%80%E5%B8%82%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%9D%9E%E9%80%80%E5%B8%82%22%2C%22displayValue%22%3A%22%E9%9D%9E%E9%80%80%E5%B8%82%22%2C%22selected%22%3Atrue%7D%5D%7D","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":"-33712"}],"output_ports":[{"name":"data","node_id":"-33712"},{"name":"left_data","node_id":"-33712"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-78633","module_id":"BigQuantSpace.chinaa_stock_filter.chinaa_stock_filter-v1","parameters":[{"name":"index_constituent_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%8150%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%8150%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B2%AA%E6%B7%B1300%22%2C%22displayValue%22%3A%22%E6%B2%AA%E6%B7%B1300%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81500%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81500%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81800%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81800%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%81180%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%81180%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%AD%E8%AF%81100%22%2C%22displayValue%22%3A%22%E4%B8%AD%E8%AF%81100%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B7%B1%E8%AF%81100%22%2C%22displayValue%22%3A%22%E6%B7%B1%E8%AF%81100%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"board_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%B8%8A%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22displayValue%22%3A%22%E4%B8%8A%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E6%B7%B1%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22displayValue%22%3A%22%E6%B7%B1%E8%AF%81%E4%B8%BB%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%88%9B%E4%B8%9A%E6%9D%BF%22%2C%22displayValue%22%3A%22%E5%88%9B%E4%B8%9A%E6%9D%BF%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E7%A7%91%E5%88%9B%E6%9D%BF%22%2C%22displayValue%22%3A%22%E7%A7%91%E5%88%9B%E6%9D%BF%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"industry_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%BA%A4%E9%80%9A%E8%BF%90%E8%BE%93%22%2C%22displayValue%22%3A%22%E4%BA%A4%E9%80%9A%E8%BF%90%E8%BE%93%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%BC%91%E9%97%B2%E6%9C%8D%E5%8A%A1%22%2C%22displayValue%22%3A%22%E4%BC%91%E9%97%B2%E6%9C%8D%E5%8A%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E4%BC%A0%E5%AA%92%2F%E4%BF%A1%E6%81%AF%E6%9C%8D%E5%8A%A1%22%2C%22displayValue%22%3A%22%E4%BC%A0%E5%AA%92%2F%E4%BF%A1%E6%81%AF%E6%9C%8D%E5%8A%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%85%AC%E7%94%A8%E4%BA%8B%E4%B8%9A%22%2C%22displayValue%22%3A%22%E5%85%AC%E7%94%A8%E4%BA%8B%E4%B8%9A%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%86%9C%E6%9E%97%E7%89%A7%E6%B8%94%22%2C%22displayValue%22%3A%22%E5%86%9C%E6%9E%97%E7%89%A7%E6%B8%94%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%8C%96%E5%B7%A5%22%2C%22displayValue%22%3A%22%E5%8C%96%E5%B7%A5%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%8C%BB%E8%8D%AF%E7%94%9F%E7%89%A9%22%2C%22displayValue%22%3A%22%E5%8C%BB%E8%8D%AF%E7%94%9F%E7%89%A9%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%95%86%E4%B8%9A%E8%B4%B8%E6%98%93%22%2C%22displayValue%22%3A%22%E5%95%86%E4%B8%9A%E8%B4%B8%E6%98%93%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%9B%BD%E9%98%B2%E5%86%9B%E5%B7%A5%22%2C%22displayValue%22%3A%22%E5%9B%BD%E9%98%B2%E5%86%9B%E5%B7%A5%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%AE%B6%E7%94%A8%E7%94%B5%E5%99%A8%22%2C%22displayValue%22%3A%22%E5%AE%B6%E7%94%A8%E7%94%B5%E5%99%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%BB%BA%E7%AD%91%E6%9D%90%E6%96%99%2F%E5%BB%BA%E7%AD%91%E5%BB%BA%E6%9D%90%22%2C%22displayValue%22%3A%22%E5%BB%BA%E7%AD%91%E6%9D%90%E6%96%99%2F%E5%BB%BA%E7%AD%91%E5%BB%BA%E6%9D%90%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E5%BB%BA%E7%AD%91%E8%A3%85%E9%A5%B0%22%2C%22displayValue%22%3A%22%E5%BB%BA%E7%AD%91%E8%A3%85%E9%A5%B0%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%88%BF%E5%9C%B0%E4%BA%A7%22%2C%22displayValue%22%3A%22%E6%88%BF%E5%9C%B0%E4%BA%A7%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9C%89%E8%89%B2%E9%87%91%E5%B1%9E%22%2C%22displayValue%22%3A%22%E6%9C%89%E8%89%B2%E9%87%91%E5%B1%9E%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9C%BA%E6%A2%B0%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E6%9C%BA%E6%A2%B0%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%B1%BD%E8%BD%A6%2F%E4%BA%A4%E8%BF%90%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E6%B1%BD%E8%BD%A6%2F%E4%BA%A4%E8%BF%90%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%94%B5%E5%AD%90%22%2C%22displayValue%22%3A%22%E7%94%B5%E5%AD%90%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%94%B5%E6%B0%94%E8%AE%BE%E5%A4%87%22%2C%22displayValue%22%3A%22%E7%94%B5%E6%B0%94%E8%AE%BE%E5%A4%87%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%BA%BA%E7%BB%87%E6%9C%8D%E8%A3%85%22%2C%22displayValue%22%3A%22%E7%BA%BA%E7%BB%87%E6%9C%8D%E8%A3%85%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E7%BB%BC%E5%90%88%22%2C%22displayValue%22%3A%22%E7%BB%BC%E5%90%88%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E8%AE%A1%E7%AE%97%E6%9C%BA%22%2C%22displayValue%22%3A%22%E8%AE%A1%E7%AE%97%E6%9C%BA%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E8%BD%BB%E5%B7%A5%E5%88%B6%E9%80%A0%22%2C%22displayValue%22%3A%22%E8%BD%BB%E5%B7%A5%E5%88%B6%E9%80%A0%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%80%9A%E4%BF%A1%22%2C%22displayValue%22%3A%22%E9%80%9A%E4%BF%A1%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%87%87%E6%8E%98%22%2C%22displayValue%22%3A%22%E9%87%87%E6%8E%98%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%92%A2%E9%93%81%22%2C%22displayValue%22%3A%22%E9%92%A2%E9%93%81%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%93%B6%E8%A1%8C%22%2C%22displayValue%22%3A%22%E9%93%B6%E8%A1%8C%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%9D%9E%E9%93%B6%E9%87%91%E8%9E%8D%22%2C%22displayValue%22%3A%22%E9%9D%9E%E9%93%B6%E9%87%91%E8%9E%8D%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%A3%9F%E5%93%81%E9%A5%AE%E6%96%99%22%2C%22displayValue%22%3A%22%E9%A3%9F%E5%93%81%E9%A5%AE%E6%96%99%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"st_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%AD%A3%E5%B8%B8%22%2C%22displayValue%22%3A%22%E6%AD%A3%E5%B8%B8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22ST%22%2C%22displayValue%22%3A%22ST%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22*ST%22%2C%22displayValue%22%3A%22*ST%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E6%9A%82%E5%81%9C%E4%B8%8A%E5%B8%82%22%2C%22displayValue%22%3A%22%E6%9A%82%E5%81%9C%E4%B8%8A%E5%B8%82%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"delist_cond","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22displayValue%22%3A%22%E5%85%A8%E9%83%A8%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%80%80%E5%B8%82%22%2C%22displayValue%22%3A%22%E9%80%80%E5%B8%82%22%2C%22selected%22%3Afalse%7D%2C%7B%22value%22%3A%22%E9%9D%9E%E9%80%80%E5%B8%82%22%2C%22displayValue%22%3A%22%E9%9D%9E%E9%80%80%E5%B8%82%22%2C%22selected%22%3Atrue%7D%5D%7D","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":"-78633"}],"output_ports":[{"name":"data","node_id":"-78633"},{"name":"left_data","node_id":"-78633"}],"cacheable":true,"seq_num":25,"comment":"","comment_collapsed":true},{"node_id":"-1455","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-1455"}],"output_ports":[{"name":"data","node_id":"-1455"}],"cacheable":true,"seq_num":34,"comment":"","comment_collapsed":true},{"node_id":"-16481","module_id":"BigQuantSpace.dropnan.dropnan-v2","parameters":[],"input_ports":[{"name":"input_data","node_id":"-16481"},{"name":"features","node_id":"-16481"}],"output_ports":[{"name":"data","node_id":"-16481"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-16485","module_id":"BigQuantSpace.dropnan.dropnan-v2","parameters":[],"input_ports":[{"name":"input_data","node_id":"-16485"},{"name":"features","node_id":"-16485"}],"output_ports":[{"name":"data","node_id":"-16485"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-25695","module_id":"BigQuantSpace.stock_ranker.stock_ranker-v2","parameters":[{"name":"learning_algorithm","value":"排序","type":"Literal","bound_global_parameter":null},{"name":"number_of_leaves","value":"31","type":"Literal","bound_global_parameter":null},{"name":"minimum_docs_per_leaf","value":"631","type":"Literal","bound_global_parameter":null},{"name":"number_of_trees","value":"15","type":"Literal","bound_global_parameter":null},{"name":"learning_rate","value":0.1,"type":"Literal","bound_global_parameter":null},{"name":"max_bins","value":1023,"type":"Literal","bound_global_parameter":null},{"name":"feature_fraction","value":1,"type":"Literal","bound_global_parameter":null},{"name":"data_row_fraction","value":1,"type":"Literal","bound_global_parameter":null},{"name":"ndcg_discount_base","value":1,"type":"Literal","bound_global_parameter":null},{"name":"slim_data","value":"True","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"training_ds","node_id":"-25695"},{"name":"features","node_id":"-25695"},{"name":"base_model","node_id":"-25695"},{"name":"test_ds","node_id":"-25695"},{"name":"input_model","node_id":"-25695"},{"name":"predict_ds","node_id":"-25695"}],"output_ports":[{"name":"model","node_id":"-25695"},{"name":"predictions","node_id":"-25695"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"-7398","module_id":"BigQuantSpace.trade.trade-v4","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"initialize","value":"# 回测引擎:初始化函数,只执行一次\ndef bigquant_run(context):\n # 加载预测数据\n context.ranker_prediction = context.options['data'].read_df()\n\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.00016, sell_cost=0.00116, min_cost=5))\n # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)\n # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只\n stock_count = 1\n # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]\n context.stock_weights = [1]\n # 设置每只股票占用的最大资金比例\n context.max_cash_per_instrument = 0.8\n context.options['hold_days'] = 1","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n \n\n \n #获取当日日期\n today = data.current_dt.strftime('%Y-%m-%d')\n stock_hold_now = [equity.symbol for equity in context.portfolio.positions ]\n #大盘风控模块,读取风控数据 \n benchmark_risk=context.benchmark_risk[today]\n\n #当risk为1时,市场有风险,全部平仓,不再执行其它操作\n if benchmark_risk > 0:\n for instrument in stock_hold_now:\n context.order_target(symbol(instrument), 0)\n print(today,'大盘风控止损触发,全仓卖出')\n return\n \n # 按日期过滤得到今日的预测数据\n ranker_prediction = context.ranker_prediction[\n context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]\n\n # 1. 资金分配\n # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金\n # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)\n is_staging = context.trading_day_index < context.options['hold_days'] # 是否在建仓期间(前 hold_days 天)\n cash_avg = context.portfolio.portfolio_value / context.options['hold_days']\n cash_for_buy = min(context.portfolio.cash, (1 if is_staging else 1.5) * cash_avg)\n cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)\n positions = {e.symbol: p.amount * p.last_sale_price\n for e, p in context.perf_tracker.position_tracker.positions.items()}\n\n # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按机器学习算法预测的排序末位淘汰\n if not is_staging and cash_for_sell > 0:\n equities = {e.symbol: e for e, p in context.perf_tracker.position_tracker.positions.items()}\n instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(\n lambda x: x in equities and not context.has_unfinished_sell_order(equities[x]))])))\n # print('rank order for sell %s' % instruments)\n for instrument in instruments:\n \n \n context.order_target(context.symbol(instrument), 0)\n cash_for_sell -= positions[instrument]\n if cash_for_sell <= 0:\n break\n\n # 3. 生成买入订单:按机器学习算法预测的排序,买入前面的stock_count只股票\n buy_cash_weights = context.stock_weights\n buy_instruments = list(ranker_prediction.instrument[:len(buy_cash_weights)])\n max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument\n for i, instrument in enumerate(buy_instruments):\n cash = cash_for_buy * buy_cash_weights[i]\n if cash > max_cash_per_instrument - positions.get(instrument, 0):\n # 确保股票持仓量不会超过每次股票最大的占用资金量\n cash = max_cash_per_instrument - positions.get(instrument, 0)\n if cash > 0:\n price = data.current(context.symbol(instrument), 'price') # 最新价格\n stock_num = np.floor(cash/price/100)*100 # 向下取整\n context.order(context.symbol(instrument), stock_num) # 整百下单","type":"Literal","bound_global_parameter":null},{"name":"prepare","value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n #在数据准备函数中一次性计算每日的大盘风控条件相比于在handle中每日计算风控条件可以提高回测速度\n # 多取50天的数据便于计算均值(保证回测的第一天均值不为Nan值),其中context.start_date和context.end_date是回测指定的起始时间和终止时间\n start_date= (pd.to_datetime(context.start_date) - datetime.timedelta(days=50)).strftime('%Y-%m-%d') \n df=DataSource('bar1d_index_CN_STOCK_A').read(start_date=start_date,end_date=context.end_date,fields=['close'])\n\n #这里以上证指数000001.HIX为例\n benchmark_data=df[df.instrument=='399303.ZIX']\n #计算上证指数5日涨幅\n benchmark_data['ret5']=benchmark_data['close']/benchmark_data['close'].shift(5)-1\n #计算大盘风控条件,如果5日涨幅小于-4%则设置风险状态risk为1,否则为0\n benchmark_data['risk'] = np.where(benchmark_data['ret5']<-0.04,1,0)\n #修改日期格式为字符串(便于在handle中使用字符串日期索引来查看每日的风险状态)\n benchmark_data['date']=benchmark_data['date'].apply(lambda x:x.strftime('%Y-%m-%d'))\n #设置日期为索引\n benchmark_data.set_index('date',inplace=True)\n #把风控序列输出给全局变量context.benchmark_risk\n context.benchmark_risk=benchmark_data['risk']","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"","type":"Literal","bound_global_parameter":null},{"name":"volume_limit","value":"0","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_buy","value":"open","type":"Literal","bound_global_parameter":null},{"name":"order_price_field_sell","value":"close","type":"Literal","bound_global_parameter":null},{"name":"capital_base","value":"100000","type":"Literal","bound_global_parameter":null},{"name":"auto_cancel_non_tradable_orders","value":"True","type":"Literal","bound_global_parameter":null},{"name":"data_frequency","value":"daily","type":"Literal","bound_global_parameter":null},{"name":"price_type","value":"真实价格","type":"Literal","bound_global_parameter":null},{"name":"product_type","value":"股票","type":"Literal","bound_global_parameter":null},{"name":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"000300.SHA","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-7398"},{"name":"options_data","node_id":"-7398"},{"name":"history_ds","node_id":"-7398"},{"name":"benchmark_ds","node_id":"-7398"},{"name":"trading_calendar","node_id":"-7398"}],"output_ports":[{"name":"raw_perf","node_id":"-7398"}],"cacheable":false,"seq_num":1,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-316' Position='1245,-46,200,200'/><node_position Node='-2295' Position='1113,-300,200,200'/><node_position Node='-2290' Position='563,183,200,200'/><node_position Node='-620' Position='710,-167,200,200'/><node_position Node='-692' Position='1251,39,200,200'/><node_position Node='-289' Position='565,-61,200,200'/><node_position Node='-300' Position='888,-83,200,200'/><node_position Node='-307' Position='892,-10,200,200'/><node_position Node='-322' Position='1237,-135,200,200'/><node_position Node='-33712' Position='901,65,200,200'/><node_position Node='-78633' Position='1252,107,200,200'/><node_position Node='-1455' Position='1022,-214,200,200'/><node_position Node='-16481' Position='600,279,200,200'/><node_position Node='-16485' Position='1253,282,200,200'/><node_position Node='-25695' Position='805,435,200,200'/><node_position Node='-7398' Position='1048.54345703125,536.8603515625,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-02-06 10:19:38.891192] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-02-06 10:19:38.934119] INFO: moduleinvoker: input_features.v1 运行完成[0.042975s].
[2022-02-06 10:19:38.938421] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-02-06 10:19:38.965661] INFO: moduleinvoker: input_features.v1 运行完成[0.027224s].
[2022-02-06 10:19:38.974159] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-02-06 10:19:39.034980] INFO: moduleinvoker: instruments.v2 运行完成[0.060806s].
[2022-02-06 10:19:39.050647] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2022-02-06 10:19:39.815219] INFO: 自动标注(股票): 加载历史数据: 432414 行
[2022-02-06 10:19:39.816851] INFO: 自动标注(股票): 开始标注 ..
[2022-02-06 10:19:40.402490] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[1.351839s].
[2022-02-06 10:19:40.434483] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-02-06 10:19:41.766909] INFO: 基础特征抽取: 年份 2019, 特征行数=18640
[2022-02-06 10:19:43.512931] INFO: 基础特征抽取: 年份 2020, 特征行数=944770
[2022-02-06 10:19:45.217681] INFO: 基础特征抽取: 年份 2021, 特征行数=407757
[2022-02-06 10:19:45.269043] INFO: 基础特征抽取: 总行数: 1371167
[2022-02-06 10:19:45.275974] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[4.841511s].
[2022-02-06 10:19:45.287622] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-02-06 10:19:47.271699] INFO: derived_feature_extractor: /y_2019, 18640
[2022-02-06 10:19:48.547913] INFO: derived_feature_extractor: /y_2020, 944770
[2022-02-06 10:19:49.385335] INFO: derived_feature_extractor: /y_2021, 407757
[2022-02-06 10:19:49.542430] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[4.25479s].
[2022-02-06 10:19:49.555102] INFO: moduleinvoker: chinaa_stock_filter.v1 开始运行..
[2022-02-06 10:19:49.848210] INFO: A股股票过滤: 过滤 /y_2019, 17654/0/18633
[2022-02-06 10:19:52.265540] INFO: A股股票过滤: 过滤 /y_2020, 869525/0/944374
[2022-02-06 10:19:53.413418] INFO: A股股票过滤: 过滤 /y_2021, 364571/0/407561
[2022-02-06 10:19:53.417318] INFO: A股股票过滤: 过滤完成, 1251750 + 0
[2022-02-06 10:19:53.446877] INFO: moduleinvoker: chinaa_stock_filter.v1 运行完成[3.891761s].
[2022-02-06 10:19:53.466636] INFO: moduleinvoker: join.v3 开始运行..
[2022-02-06 10:19:54.329933] INFO: join: /y_2019, 行数=0/17654, 耗时=0.20568s
[2022-02-06 10:19:56.043600] INFO: join: /y_2020, 行数=22114/869525, 耗时=1.712032s
[2022-02-06 10:19:56.902789] INFO: join: /y_2021, 行数=356168/364571, 耗时=0.855496s
[2022-02-06 10:19:56.953318] INFO: join: 最终行数: 378282
[2022-02-06 10:19:56.961600] INFO: moduleinvoker: join.v3 运行完成[3.494974s].
[2022-02-06 10:19:56.972723] INFO: moduleinvoker: dropnan.v2 开始运行..
[2022-02-06 10:19:57.040239] INFO: dropnan: /y_2019, 0/0
[2022-02-06 10:19:57.096143] INFO: dropnan: /y_2020, 22114/22114
[2022-02-06 10:19:57.326351] INFO: dropnan: /y_2021, 356168/356168
[2022-02-06 10:19:57.374522] INFO: dropnan: 行数: 378282/378282
[2022-02-06 10:19:57.384478] INFO: moduleinvoker: dropnan.v2 运行完成[0.411745s].
[2022-02-06 10:19:57.389338] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-02-06 10:19:57.399892] INFO: moduleinvoker: 命中缓存
[2022-02-06 10:19:57.401195] INFO: moduleinvoker: instruments.v2 运行完成[0.011857s].
[2022-02-06 10:19:57.414344] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-02-06 10:19:59.029294] INFO: 基础特征抽取: 年份 2020, 特征行数=577725
[2022-02-06 10:20:01.527395] INFO: 基础特征抽取: 年份 2021, 特征行数=1061217
[2022-02-06 10:20:01.610609] INFO: 基础特征抽取: 总行数: 1638942
[2022-02-06 10:20:01.617563] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[4.203228s].
[2022-02-06 10:20:01.623985] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-02-06 10:20:04.628760] INFO: derived_feature_extractor: /y_2020, 577725
[2022-02-06 10:20:06.154615] INFO: derived_feature_extractor: /y_2021, 1061217
[2022-02-06 10:20:06.430015] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[4.80601s].
[2022-02-06 10:20:06.437854] INFO: moduleinvoker: chinaa_stock_filter.v1 开始运行..
[2022-02-06 10:20:07.938312] INFO: A股股票过滤: 过滤 /y_2020, 525566/0/577422
[2022-02-06 10:20:10.725855] INFO: A股股票过滤: 过滤 /y_2021, 940121/0/1060655
[2022-02-06 10:20:10.728873] INFO: A股股票过滤: 过滤完成, 1465687 + 0
[2022-02-06 10:20:10.751592] INFO: moduleinvoker: chinaa_stock_filter.v1 运行完成[4.313725s].
[2022-02-06 10:20:10.759471] INFO: moduleinvoker: dropnan.v2 开始运行..
[2022-02-06 10:20:10.943417] INFO: dropnan: /y_2020, 525566/525566
[2022-02-06 10:20:11.185368] INFO: dropnan: /y_2021, 940121/940121
[2022-02-06 10:20:11.235025] INFO: dropnan: 行数: 1465687/1465687
[2022-02-06 10:20:11.244984] INFO: moduleinvoker: dropnan.v2 运行完成[0.485508s].
[2022-02-06 10:20:11.263927] INFO: moduleinvoker: stock_ranker.v2 开始运行..
[2022-02-06 10:20:11.284557] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2022-02-06 10:20:11.826991] INFO: StockRanker: 特征预处理 ..
[2022-02-06 10:20:11.935416] INFO: StockRanker: prepare data: training ..
[2022-02-06 10:20:15.217127] INFO: StockRanker: prepare data: test ..
[2022-02-06 10:20:18.347986] INFO: StockRanker训练: 4fa2d6c4 准备训练: 378282 行数, test: 378282 rows
[2022-02-06 10:20:18.349444] INFO: StockRanker训练: AI模型训练,将在378282*2=75.66万数据上对模型训练进行15轮迭代训练。预计将需要1~2分钟。请耐心等待。
[2022-02-06 10:20:18.535875] INFO: StockRanker训练: 正在训练 ..
[2022-02-06 10:20:18.579845] INFO: StockRanker训练: 任务状态: Pending
[2022-02-06 10:20:28.619088] INFO: StockRanker训练: 任务状态: Running
[2022-02-06 10:21:38.917601] INFO: StockRanker训练: 00:01:10.8388045, finished iteration 1
[2022-02-06 10:21:48.959453] INFO: StockRanker训练: 00:01:20.5444563, finished iteration 2
[2022-02-06 10:21:59.008699] INFO: StockRanker训练: 00:01:30.7522815, finished iteration 3
[2022-02-06 10:22:09.048129] INFO: StockRanker训练: 00:01:41.0514876, finished iteration 4
[2022-02-06 10:22:19.098253] INFO: StockRanker训练: 00:01:51.0967391, finished iteration 5
[2022-02-06 10:22:29.137158] INFO: StockRanker训练: 00:02:01.4733178, finished iteration 6
[2022-02-06 10:22:39.170010] INFO: StockRanker训练: 00:02:11.9931378, finished iteration 7
[2022-02-06 10:22:49.209565] INFO: StockRanker训练: 00:02:22.9033022, finished iteration 8
[2022-02-06 10:22:59.255300] INFO: StockRanker训练: 00:02:35.0600449, finished iteration 9
[2022-02-06 10:23:19.335874] INFO: StockRanker训练: 00:02:47.9507876, finished iteration 10
[2022-02-06 10:23:29.377741] INFO: StockRanker训练: 00:03:00.2821014, finished iteration 11
[2022-02-06 10:23:39.419141] INFO: StockRanker训练: 00:03:13.4332842, finished iteration 12
[2022-02-06 10:23:49.457842] INFO: StockRanker训练: 00:03:26.3190288, finished iteration 13
[2022-02-06 10:24:09.542298] INFO: StockRanker训练: 00:03:38.6110875, finished iteration 14
[2022-02-06 10:24:19.581351] INFO: StockRanker训练: 00:03:51.0928029, finished iteration 15
[2022-02-06 10:24:19.582805] INFO: StockRanker训练: 任务状态: Succeeded
[2022-02-06 10:24:19.789327] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[248.504768s].
[2022-02-06 10:24:19.802210] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-02-06 10:24:20.069935] INFO: StockRanker预测: /y_2020 ..
[2022-02-06 10:24:20.517943] INFO: StockRanker预测: /y_2021 ..
[2022-02-06 10:24:23.100646] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[3.298411s].
[2022-02-06 10:24:23.178701] INFO: moduleinvoker: stock_ranker.v2 运行完成[251.914768s].
[2022-02-06 10:24:24.856363] INFO: moduleinvoker: backtest.v8 开始运行..
[2022-02-06 10:24:24.862049] INFO: backtest: biglearning backtest:V8.6.1
[2022-02-06 10:24:24.904777] INFO: backtest: product_type:stock by specified
[2022-02-06 10:24:24.966548] INFO: moduleinvoker: cached.v2 开始运行..
[2022-02-06 10:24:28.711542] INFO: backtest: 读取股票行情完成:1760855
[2022-02-06 10:24:31.282952] INFO: moduleinvoker: cached.v2 运行完成[6.316405s].
[2022-02-06 10:24:32.765249] INFO: algo: TradingAlgorithm V1.8.6
[2022-02-06 10:24:33.387879] INFO: algo: trading transform...
[2022-02-06 10:24:33.825754] ERROR: moduleinvoker: module name: backtest, module version: v8, trackeback: KeyError: 1622505600000000000
During handling of the above exception, another exception occurred:
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError: '2021-06-01'
[2022-02-06 10:24:33.844062] ERROR: moduleinvoker: module name: trade, module version: v4, trackeback: KeyError: 1622505600000000000
During handling of the above exception, another exception occurred:
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError: '2021-06-01'
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-c6ca77a6809342869a2ce768b8359832"}/bigcharts-data-end
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-4005cc9f0de04bbba21a01e7e8a6a769"}/bigcharts-data-end
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
KeyError: 1622505600000000000
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
KeyError: Timestamp('2021-06-01 00:00:00')
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
<ipython-input-1-d27544f93c17> in <module>
244 )
245
--> 246 m1 = M.trade.v4(
247 instruments=m28.data,
248 options_data=m6.predictions,
<ipython-input-1-d27544f93c17> in m1_handle_data_bigquant_run(context, data)
27 stock_hold_now = [equity.symbol for equity in context.portfolio.positions ]
28 #大盘风控模块,读取风控数据
---> 29 benchmark_risk=context.benchmark_risk[today]
30
31 #当risk为1时,市场有风险,全部平仓,不再执行其它操作
KeyError: '2021-06-01'