{"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"to_node_id":"-274:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-274:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-281:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"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":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:model","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:model"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:input_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data"},{"to_node_id":"-315:options_data","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"to_node_id":"-288:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"-315:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:training_ds","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:data","from_node_id":"-86:data"},{"to_node_id":"-281:input_data","from_node_id":"-274:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"-281: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-8","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-02-01","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"000021.SZA\n002460.SZA\n000027.SZA\n000050.SZA\n000333.SZA\n000338.SZA\n000521.SZA\n000538.SZA\n000615.SZA\n000625.SZA\n000626.SZA\n000651.SZA\n000661.SZA\n000713.SZA\n000733.SZA\n000768.SZA\n000798.SZA\n000858.SZA\n000928.SZA\n000963.SZA\n000995.SZA\n002007.SZA\n002055.SZA\n002074.SZA\n002092.SZA\n002125.SZA\n002151.SZA\n002156.SZA\n002162.SZA\n002163.SZA\n002179.SZA\n002184.SZA\n002185.SZA\n002190.SZA\n002192.SZA\n002221.SZA\n002237.SZA\n002240.SZA\n002245.SZA\n002271.SZA\n002340.SZA\n002352.SZA\n002371.SZA\n002386.SZA\n002389.SZA\n002407.SZA\n002415.SZA\n002430.SZA\n002466.SZA\n002497.SZA\n002529.SZA\n002557.SZA\n002594.SZA\n002601.SZA\n002607.SZA\n002625.SZA\n002668.SZA\n002709.SZA\n002756.SZA\n002799.SZA\n002812.SZA\n002813.SZA\n002821.SZA\n002906.SZA\n002920.SZA\n300003.SZA\n300014.SZA\n300015.SZA\n300034.SZA\n300037.SZA\n300059.SZA\n300122.SZA\n300124.SZA\n300142.SZA\n300244.SZA\n300251.SZA\n300274.SZA\n300316.SZA\n300339.SZA\n300340.SZA\n300347.SZA\n300357.SZA\n300433.SZA\n300450.SZA\n300477.SZA\n300496.SZA\n300529.SZA\n300558.SZA\n300567.SZA\n300576.SZA\n300581.SZA\n300595.SZA\n300601.SZA\n300604.SZA\n300623.SZA\n300648.SZA\n300661.SZA\n300685.SZA\n300690.SZA\n300699.SZA\n300719.SZA\n300722.SZA\n300726.SZA\n300750.SZA\n300759.SZA\n300760.SZA\n300763.SZA\n300769.SZA\n600016.SHA\n600031.SHA\n600089.SHA\n600110.SHA\n600183.SHA\n600196.SHA\n600198.SHA\n600237.SHA\n600256.SHA\n600276.SHA\n600295.SHA\n600305.SHA\n600309.SHA\n600316.SHA\n600325.SHA\n600392.SHA\n600398.SHA\n600418.SHA\n600438.SHA\n600460.SHA\n600499.SHA\n600516.SHA\n600570.SHA\n600584.SHA\n600585.SHA\n600596.SHA\n600660.SHA\n600685.SHA\n600690.SHA\n600699.SHA\n600703.SHA\n600733.SHA\n600745.SHA\n600760.SHA\n600763.SHA\n600805.SHA\n600809.SHA\n600862.SHA\n600864.SHA\n600882.SHA\n600886.SHA\n600887.SHA\n600893.SHA\n600977.SHA\n600988.SHA\n601012.SHA\n601100.SHA\n601611.SHA\n601633.SHA\n601865.SHA\n601866.SHA\n601869.SHA\n601888.SHA\n601899.SHA\n601901.SHA\n601919.SHA\n603005.SHA\n603019.SHA\n603025.SHA\n603027.SHA\n603185.SHA\n603197.SHA\n603259.SHA\n603260.SHA\n603267.SHA\n603501.SHA\n603517.SHA\n603605.SHA\n603650.SHA\n603678.SHA\n603707.SHA\n603799.SHA\n603806.SHA\n603882.SHA","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-8"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15","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# 计算收益:5日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)\nshift(close, -5) / shift(open, -1)\n\n# 极值处理:用1%和99%分位的值做clip\nclip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))\n\n# 将分数映射到分类,这里使用20个分类\nall_wbins(label, 20)\n\n# 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)\nwhere(shift(high, -1) == shift(low, -1), NaN, label)\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":"True","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\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-43","module_id":"BigQuantSpace.stock_ranker_train.stock_ranker_train-v5","parameters":[{"name":"learning_algorithm","value":"排序","type":"Literal","bound_global_parameter":null},{"name":"number_of_leaves","value":"3","type":"Literal","bound_global_parameter":null},{"name":"minimum_docs_per_leaf","value":"100","type":"Literal","bound_global_parameter":null},{"name":"number_of_trees","value":"5","type":"Literal","bound_global_parameter":null},{"name":"learning_rate","value":"0.5","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":"m_lazy_run","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"training_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"features","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"test_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"base_model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"}],"output_ports":[{"name":"model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"feature_gains","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"},{"name":"m_lazy_run","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53","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":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"data1","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"},{"name":"data2","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"}],"cacheable":true,"seq_num":7,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60","module_id":"BigQuantSpace.stock_ranker_predict.stock_ranker_predict-v5","parameters":[{"name":"m_lazy_run","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"model","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"},{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"}],"output_ports":[{"name":"predictions","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"},{"name":"m_lazy_run","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-02-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2021-02-10","type":"Literal","bound_global_parameter":"交易日期"},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"000021.SZA\n002460.SZA\n000027.SZA\n000050.SZA\n000333.SZA\n000338.SZA\n000521.SZA\n000538.SZA\n000615.SZA\n000625.SZA\n000626.SZA\n000651.SZA\n000661.SZA\n000713.SZA\n000733.SZA\n000768.SZA\n000798.SZA\n000858.SZA\n000928.SZA\n000963.SZA\n000995.SZA\n002007.SZA\n002055.SZA\n002074.SZA\n002092.SZA\n002125.SZA\n002151.SZA\n002156.SZA\n002162.SZA\n002163.SZA\n002179.SZA\n002184.SZA\n002185.SZA\n002190.SZA\n002192.SZA\n002221.SZA\n002237.SZA\n002240.SZA\n002245.SZA\n002271.SZA\n002340.SZA\n002352.SZA\n002371.SZA\n002386.SZA\n002389.SZA\n002407.SZA\n002415.SZA\n002430.SZA\n002466.SZA\n002497.SZA\n002529.SZA\n002557.SZA\n002594.SZA\n002601.SZA\n002607.SZA\n002625.SZA\n002668.SZA\n002709.SZA\n002756.SZA\n002799.SZA\n002812.SZA\n002813.SZA\n002821.SZA\n002906.SZA\n002920.SZA\n300003.SZA\n300014.SZA\n300015.SZA\n300034.SZA\n300037.SZA\n300059.SZA\n300122.SZA\n300124.SZA\n300142.SZA\n300244.SZA\n300251.SZA\n300274.SZA\n300316.SZA\n300339.SZA\n300340.SZA\n300347.SZA\n300357.SZA\n300433.SZA\n300450.SZA\n300477.SZA\n300496.SZA\n300529.SZA\n300558.SZA\n300567.SZA\n300576.SZA\n300581.SZA\n300595.SZA\n300601.SZA\n300604.SZA\n300623.SZA\n300648.SZA\n300661.SZA\n300685.SZA\n300690.SZA\n300699.SZA\n300719.SZA\n300722.SZA\n300726.SZA\n300750.SZA\n300759.SZA\n300760.SZA\n300763.SZA\n300769.SZA\n600016.SHA\n600031.SHA\n600089.SHA\n600110.SHA\n600183.SHA\n600196.SHA\n600198.SHA\n600237.SHA\n600256.SHA\n600276.SHA\n600295.SHA\n600305.SHA\n600309.SHA\n600316.SHA\n600325.SHA\n600392.SHA\n600398.SHA\n600418.SHA\n600438.SHA\n600460.SHA\n600499.SHA\n600516.SHA\n600570.SHA\n600584.SHA\n600585.SHA\n600596.SHA\n600660.SHA\n600685.SHA\n600690.SHA\n600699.SHA\n600703.SHA\n600733.SHA\n600745.SHA\n600760.SHA\n600763.SHA\n600805.SHA\n600809.SHA\n600862.SHA\n600864.SHA\n600882.SHA\n600886.SHA\n600887.SHA\n600893.SHA\n600977.SHA\n600988.SHA\n601012.SHA\n601100.SHA\n601611.SHA\n601633.SHA\n601865.SHA\n601866.SHA\n601869.SHA\n601888.SHA\n601899.SHA\n601901.SHA\n601919.SHA\n603005.SHA\n603019.SHA\n603025.SHA\n603027.SHA\n603185.SHA\n603197.SHA\n603259.SHA\n603260.SHA\n603267.SHA\n603501.SHA\n603517.SHA\n603605.SHA\n603650.SHA\n603678.SHA\n603707.SHA\n603799.SHA\n603806.SHA\n603882.SHA","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":"287d2cb0-f53c-4101-bdf8-104b137c8601-84","module_id":"BigQuantSpace.dropnan.dropnan-v1","parameters":[],"input_ports":[{"name":"input_data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-84"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"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":"-274","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":"-274"},{"name":"features","node_id":"-274"}],"output_ports":[{"name":"data","node_id":"-274"}],"cacheable":true,"seq_num":15,"comment":"","comment_collapsed":true},{"node_id":"-281","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":"-281"},{"name":"features","node_id":"-281"}],"output_ports":[{"name":"data","node_id":"-281"}],"cacheable":true,"seq_num":16,"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":"-315","module_id":"BigQuantSpace.hftrade.hftrade-v2","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 df = DataSource(\"bar1d_index_CN_STOCK_A\").read(instruments=\"000300.HIX\",start_date=\"2021-01-01\",end_date=\"2021-08-01\")\n df[\"ma\"] = df.close.rolling(5).mean()\n df[\"signal\"] = df.apply(lambda x:1 if x.close>x.ma else 0,axis=1)\n df[\"signal\"] = df[\"signal\"].shift(1)#取昨日的收盘信号\n df=df[[\"date\",\"signal\"]]\n #信号数据\n context.signal_df = df\n #每次股票占比\n context.order_pct = 0.1\n #获取预测股票集\n context.to_buy = context.options['data'].read()\n# print(df)","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 交易引擎:每个单位时间开盘前调用一次。\ndef bigquant_run(context, data):\n now = data.current_dt.strftime('%Y-%m-%d')\n context.signal = context.signal_df[context.signal_df.date==now][\"signal\"].iloc[0]\n context.handle_flag = 0 #由于是分钟回测,每天只需要处理一次买卖\n context.subscribe(context.instruments)\n","type":"Literal","bound_global_parameter":null},{"name":"handle_tick","value":"# 交易引擎:tick数据处理函数,每个tick执行一次\ndef bigquant_run(context, tick):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"#卖出函数\ndef sell_stock(context,data,msg):\n #获取当前所有持仓\n stock_hold_now = context.get_account_positions() \n for instr in stock_hold_now:\n #卖出可用仓位(可能有今仓)\n position = context.get_position(instr).avail_qty\n if(position>0):\n #最新价格\n price = data.current(instr, 'close')\n context.order(instr, -position, price, order_type=OrderType.MARKET)\n print(\"{}卖出{} {}\".format(msg,instr,position))\n\n# 交易引擎:bar数据处理函数,每个单位执行一次\ndef bigquant_run(context, data):\n #signal为1尾盘卖\n if context.signal == 1:\n cur_date = data.current_dt\n cur_hm = cur_date.strftime('%H:%M')\n if(cur_hm==\"14:55\"):\n msg = str(cur_date)+\" 尾盘\"\n sell_stock(context,data,msg)\n \n #每天只处理一次\n if context.handle_flag==1:\n return\n # 获取今日的日期\n today = data.current_dt.strftime('%Y-%m-%d') \n #signal为0开盘卖\n if context.signal == 0:\n msg = today+\" 开盘\"\n sell_stock(context,data,msg)\n \n #买入预测集的前5只股票\n now_data = context.to_buy[context.to_buy['date']==today]\n today_to_buy = []\n if not now_data.empty:\n today_to_buy = now_data.instrument[0:5].to_list()\n print(today,\"=======早盘买入的股票 {}\".format(today_to_buy))\n \n # 获取账户资金\n total_portfolio = context.portfolio.portfolio_value\n\n for instr in today_to_buy:\n #获取持仓情况\n position = context.get_position(instr)\n #最新价格\n price = data.current(instr, 'close')\n \n #计算买入此股票的数量,不要超过总资金的某个比例\n context.order_value(instr, total_portfolio*context.order_pct, price, order_type=OrderType.MARKET)\n print(\"买入{}\".format(instr))\n \n context.handle_flag = 1\n","type":"Literal","bound_global_parameter":null},{"name":"handle_trade","value":"# 交易引擎:成交回报处理函数,每个成交发生时执行一次\ndef bigquant_run(context, trade):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"handle_order","value":"# 交易引擎:委托回报处理函数,每个委托变化时执行一次\ndef bigquant_run(context, order):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"after_trading","value":"# 交易引擎:盘后处理函数,每日盘后执行一次\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"capital_base","value":1000000,"type":"Literal","bound_global_parameter":null},{"name":"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":"before_start_days","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":"benchmark","value":"000300.HIX","type":"Literal","bound_global_parameter":null},{"name":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"disable_cache","value":"False","type":"Literal","bound_global_parameter":null},{"name":"replay_bdb","value":"False","type":"Literal","bound_global_parameter":null},{"name":"show_debug_info","value":"False","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-315"},{"name":"options_data","node_id":"-315"},{"name":"history_ds","node_id":"-315"},{"name":"benchmark_ds","node_id":"-315"}],"output_ports":[{"name":"raw_perf","node_id":"-315"}],"cacheable":false,"seq_num":4,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-8' Position='211,64,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-15' Position='70,183,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='765,21,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-43' Position='720,485,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='249,375,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='863,597,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='1108,37,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-84' Position='376,467,200,200'/><node_position Node='-86' Position='1078,418,200,200'/><node_position Node='-274' Position='381,188,200,200'/><node_position Node='-281' Position='385,280,200,200'/><node_position Node='-288' Position='1078,236,200,200'/><node_position Node='-295' Position='1081,327,200,200'/><node_position Node='-315' Position='569.2167358398438,806.86865234375,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-05-27 16:49:09.406701] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-05-27 16:49:09.414613] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.416072] INFO: moduleinvoker: instruments.v2 运行完成[0.009384s].
[2022-05-27 16:49:09.423885] INFO: moduleinvoker: advanced_auto_labeler.v2 开始运行..
[2022-05-27 16:49:09.432332] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.433780] INFO: moduleinvoker: advanced_auto_labeler.v2 运行完成[0.009894s].
[2022-05-27 16:49:09.437265] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-05-27 16:49:09.443166] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.444389] INFO: moduleinvoker: input_features.v1 运行完成[0.007125s].
[2022-05-27 16:49:09.459276] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-05-27 16:49:09.466134] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.467368] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.008099s].
[2022-05-27 16:49:09.473252] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-05-27 16:49:09.483318] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.485817] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.012544s].
[2022-05-27 16:49:09.498274] INFO: moduleinvoker: join.v3 开始运行..
[2022-05-27 16:49:09.510601] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.512177] INFO: moduleinvoker: join.v3 运行完成[0.013907s].
[2022-05-27 16:49:09.519853] INFO: moduleinvoker: dropnan.v1 开始运行..
[2022-05-27 16:49:09.526567] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.527831] INFO: moduleinvoker: dropnan.v1 运行完成[0.007977s].
[2022-05-27 16:49:09.534531] INFO: moduleinvoker: stock_ranker_train.v5 开始运行..
[2022-05-27 16:49:09.543429] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.619209] INFO: moduleinvoker: stock_ranker_train.v5 运行完成[0.084663s].
[2022-05-27 16:49:09.624568] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-05-27 16:49:09.631072] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.632384] INFO: moduleinvoker: instruments.v2 运行完成[0.007817s].
[2022-05-27 16:49:09.651676] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2022-05-27 16:49:09.658999] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.660463] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.008796s].
[2022-05-27 16:49:09.667594] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-05-27 16:49:09.675983] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.677880] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.010314s].
[2022-05-27 16:49:09.690208] INFO: moduleinvoker: dropnan.v1 开始运行..
[2022-05-27 16:49:09.696957] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.698898] INFO: moduleinvoker: dropnan.v1 运行完成[0.008712s].
[2022-05-27 16:49:09.712798] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-05-27 16:49:09.720827] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.722288] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[0.009491s].
[2022-05-27 16:49:09.762480] INFO: moduleinvoker: hfbacktest.v1 开始运行..
[2022-05-27 16:49:09.766456] INFO: hfbacktest: biglearning V1.4.11
[2022-05-27 16:49:09.767763] INFO: hfbacktest: bigtrader v1.9.6 2022-05-24
[2022-05-27 16:49:09.797814] INFO: moduleinvoker: cached.v2 开始运行..
[2022-05-27 16:49:09.805156] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.806837] INFO: moduleinvoker: cached.v2 运行完成[0.009039s].
[2022-05-27 16:49:09.852938] INFO: moduleinvoker: cached.v2 开始运行..
[2022-05-27 16:49:09.860210] INFO: moduleinvoker: 命中缓存
[2022-05-27 16:49:09.861706] INFO: moduleinvoker: cached.v2 运行完成[0.008789s].
[2022-05-27 16:49:11.721348] INFO: hfbacktest: backtest done, raw_perf_ds:DataSource(8cb4b20373fb415ab436a66341cfc2d3T)
[2022-05-27 16:49:12.176209] INFO: moduleinvoker: hfbacktest.v1 运行完成[2.413731s].
[2022-05-27 16:49:12.178299] INFO: moduleinvoker: hftrade.v2 运行完成[2.45002s].
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-9bbf268464d34a569e99a32f7e327432"}/bigcharts-data-end
2021-02-01 =======早盘买入的股票 ['000768.SZA', '002156.SZA', '002607.SZA', '002709.SZA', '002812.SZA']
买入000768.SZA
买入002156.SZA
买入002607.SZA
买入002709.SZA
买入002812.SZA
2021-02-02 =======早盘买入的股票 ['000768.SZA', '002156.SZA', '002607.SZA', '002709.SZA', '002812.SZA']
买入000768.SZA
买入002156.SZA
买入002607.SZA
买入002709.SZA
买入002812.SZA
2021-02-03 =======早盘买入的股票 ['000768.SZA', '002709.SZA', '002812.SZA', '002920.SZA', '300581.SZA']
买入000768.SZA
买入002709.SZA
买入002812.SZA
买入002920.SZA
买入300581.SZA
2022-05-27 16:49:10.498838 market open send order=OrderReq(bkt000,002709.SZA,'1','0',0,103.84,U,0,strategy,2021-02-03 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.499225 market open send order=OrderReq(bkt000,002812.SZA,'1','0',0,135.57,U,0,strategy,2021-02-03 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.499540 market open send order=OrderReq(bkt000,002920.SZA,'1','0',0,114.8,U,0,strategy,2021-02-03 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.499831 market open send order=OrderReq(bkt000,300581.SZA,'1','0',0,35.5899,U,0,strategy,2021-02-03 15:00:00) failed err=-108,委托数量错误
2021-02-04 =======早盘买入的股票 ['000768.SZA', '002709.SZA', '002812.SZA', '002920.SZA', '300759.SZA']
买入000768.SZA
买入002709.SZA
买入002812.SZA
买入002920.SZA
买入300759.SZA
2022-05-27 16:49:10.517297 market open send order=OrderReq(bkt000,000768.SZA,'1','0',0,31.67,U,0,strategy,2021-02-04 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.517615 market open send order=OrderReq(bkt000,002709.SZA,'1','0',0,96.1399,U,0,strategy,2021-02-04 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.517872 market open send order=OrderReq(bkt000,002812.SZA,'1','0',0,135.55,U,0,strategy,2021-02-04 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.518159 market open send order=OrderReq(bkt000,002920.SZA,'1','0',0,109.7399,U,0,strategy,2021-02-04 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.518471 market open send order=OrderReq(bkt000,300759.SZA,'1','0',0,150.5,U,0,strategy,2021-02-04 15:00:00) failed err=-108,委托数量错误
2021-02-05 =======早盘买入的股票 ['000768.SZA', '002497.SZA', '002709.SZA', '002812.SZA', '002920.SZA']
买入000768.SZA
买入002497.SZA
买入002709.SZA
买入002812.SZA
买入002920.SZA
2022-05-27 16:49:10.534639 market open send order=OrderReq(bkt000,000768.SZA,'1','0',0,30.66,U,0,strategy,2021-02-05 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.535515 market open send order=OrderReq(bkt000,002709.SZA,'1','0',0,96.9899,U,0,strategy,2021-02-05 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.535963 market open send order=OrderReq(bkt000,002812.SZA,'1','0',0,131.79,U,0,strategy,2021-02-05 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.536349 market open send order=OrderReq(bkt000,002920.SZA,'1','0',0,109.1999,U,0,strategy,2021-02-05 15:00:00) failed err=-108,委托数量错误
2021-02-08 =======早盘买入的股票 ['000768.SZA', '002709.SZA', '002812.SZA', '002821.SZA', '002920.SZA']
买入000768.SZA
买入002709.SZA
买入002812.SZA
买入002821.SZA
买入002920.SZA
2022-05-27 16:49:10.554392 market open send order=OrderReq(bkt000,000768.SZA,'1','0',0,30.8099,U,0,strategy,2021-02-08 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.554716 market open send order=OrderReq(bkt000,002709.SZA,'1','0',0,98.9899,U,0,strategy,2021-02-08 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.554970 market open send order=OrderReq(bkt000,002812.SZA,'1','0',0,134.1999,U,0,strategy,2021-02-08 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.555352 market open send order=OrderReq(bkt000,002821.SZA,'1','0',0,328.5799,U,0,strategy,2021-02-08 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.555644 market open send order=OrderReq(bkt000,002920.SZA,'1','0',0,111.9199,U,0,strategy,2021-02-08 15:00:00) failed err=-108,委托数量错误
2021-02-09 =======早盘买入的股票 ['000768.SZA', '002709.SZA', '002821.SZA', '002920.SZA', '300685.SZA']
买入000768.SZA
买入002709.SZA
买入002821.SZA
买入002920.SZA
买入300685.SZA
2022-05-27 16:49:10.574976 market open send order=OrderReq(bkt000,000768.SZA,'1','0',0,32.24,U,0,strategy,2021-02-09 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.575680 market open send order=OrderReq(bkt000,002709.SZA,'1','0',0,102.0,U,0,strategy,2021-02-09 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.575992 market open send order=OrderReq(bkt000,002821.SZA,'1','0',0,328.3399,U,0,strategy,2021-02-09 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.576380 market open send order=OrderReq(bkt000,002920.SZA,'1','0',0,109.6999,U,0,strategy,2021-02-09 15:00:00) failed err=-108,委托数量错误
2022-05-27 16:49:10.576985 market open send order=OrderReq(bkt000,300685.SZA,'1','0',0,92.11,U,0,strategy,2021-02-09 15:00:00) failed err=-108,委托数量错误
2021-02-10 =======早盘买入的股票 ['000768.SZA', '002709.SZA', '002821.SZA', '002920.SZA', '300581.SZA']
买入000768.SZA
买入002709.SZA
买入002821.SZA
买入002920.SZA
买入300581.SZA
- 收益率-1.96%
- 年化收益率nan%
- 基准收益率7.2%
- 阿尔法-0.99
- 贝塔1.76
- 夏普比率-1.76
- 胜率0.0
- 盈亏比0.0
- 收益波动率34.07%
- 信息比率-0.87
- 最大回撤6.96%
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-1e32139444d34860842c80f9656f1080"}/bigcharts-data-end