{"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"-281: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-43: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":"-109:input_1","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","from_node_id":"-281:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:data","from_node_id":"-295:data"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data1","from_node_id":"-129:data"},{"to_node_id":"-129:input_data","from_node_id":"-147:data_1"},{"to_node_id":"-228:input_1","from_node_id":"-147:data_2"},{"to_node_id":"-1481:instruments","from_node_id":"-758:instrument_list"},{"to_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-43:training_ds","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data"},{"to_node_id":"-281:input_data","from_node_id":"-228:data_1"},{"to_node_id":"-295:input_data","from_node_id":"-228:data_2"},{"to_node_id":"-1481:options_data","from_node_id":"-109:data_1"},{"to_node_id":"-109:input_2","from_node_id":"-121:data_1"},{"to_node_id":"-228:input_2","from_node_id":"-221:data_2"},{"to_node_id":"-758:input","from_node_id":"-221:data_2"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\ndouble_low = close + bond_prem_ratio\nremain_size\nrank_swing_volatility_5 = nanstd((high-low)/pre_close, 5)*sqrt(200)*100","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-v6","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":"20","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":"plot_charts","value":"True","type":"Literal","bound_global_parameter":null},{"name":"ndcg_discount_base","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":false,"seq_num":6,"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":"-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":"-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":"-129","module_id":"BigQuantSpace.auto_labeler_on_datasource.auto_labeler_on_datasource-v1","parameters":[{"name":"label_expr","value":"# #号开始的表示注释\n# 0. 每行一个,顺序执行,从第二个开始,可以使用label字段\n# 1. 可用数据字段见 https://bigquant.com/docs/develop/datasource/deprecated/history_data.html\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/develop/bigexpr/usage.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, 10)\n\n# 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)\nwhere(shift(high, -1) == shift(low, -1), NaN, label)\n","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":"date_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"instrument_col","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"user_functions","value":"{}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-129"}],"output_ports":[{"name":"data","node_id":"-129"}],"cacheable":true,"seq_num":10,"comment":"","comment_collapsed":true},{"node_id":"-147","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,start_date_input,end_date_input):\n # 示例代码如下。在这里编写您的代码\n df = DataSource(\"bar1d_CN_CONBOND\").read(start_date=start_date_input, end_date=end_date_input)\n df1 = DataSource(\"market_performance_CN_CONBOND\").read(start_date=start_date_input, end_date=end_date_input)\n df2 = df.drop(['close'],axis = 1)\n df3 = pd.merge(df1,df2,on=['date','instrument'],how='inner')\n data_1 = DataSource.write_df(df3)\n data_2 = DataSource.write_df(df3)\n return Outputs(data_1=data_1, data_2=data_2, data_3=None)\n","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":"{\"start_date_input\":\"2017-06-01\",\n\"end_date_input\":\"2019-11-01\"}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-147"},{"name":"input_2","node_id":"-147"},{"name":"input_3","node_id":"-147"}],"output_ports":[{"name":"data_1","node_id":"-147"},{"name":"data_2","node_id":"-147"},{"name":"data_3","node_id":"-147"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-758","module_id":"BigQuantSpace.trade_data_generation.trade_data_generation-v1","parameters":[{"name":"category","value":"CN_STOCK","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input","node_id":"-758"}],"output_ports":[{"name":"history_data","node_id":"-758"},{"name":"instrument_list","node_id":"-758"},{"name":"calendar","node_id":"-758"}],"cacheable":false,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"-1481","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 print('初始化函数开始:')\n print('context.options',context.options)\n # 加载预测数据\n context.ranker_prediction = context.options.get('data').read()['data']\n context.param = context.options['data'].read()[\"param\"]\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0003, min_cost=5))\n # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)\n # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只\n stock_count = context.param[\"stock_count\"]\n # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]\n context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, stock_count)])\n # 设置每只股票占用的最大资金比例\n context.max_cash_per_instrument = 0.4\n context.hold_days = context.param[\"hold_days\"]\n print('初始化函数结束')\n","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 交易引擎:每个单位时间开盘前调用一次。\ndef bigquant_run(context, data):\n # 盘前处理,订阅行情等\n print('订阅行情前',data)\n context.subscribe(context.instruments)\n print('订阅行情后',data)\n pass\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":"import math\n# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n print('当前日期data.current_dt',data.current_dt)\n print('data',data)\n try:\n context.ranker_prediction = context.options.get('data').read()['data']\n # 相隔几天(hold_days)进行一下换仓\n if context.trading_day_index % context.hold_days != 0:\n return \n\n # 按日期过滤得到今日的预测数据\n ranker_prediction = context.ranker_prediction[\n context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]\n # 目前持仓\n positions = {e: p.amount * p.last_sale_price for e, p in context.portfolio.positions.items()}\n # 权重\n buy_cash_weights = context.stock_weights\n # 今日买入股票列表\n stock_to_buy = list(ranker_prediction.instrument[:len(buy_cash_weights)])\n # 持仓上限\n max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument\n print(\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\")\n # 通过positions对象,使用列表生成式的方法获取目前持仓的股票列表\n stock_hold_now = [equity for equity in context.portfolio.positions ]\n # 继续持有的股票:调仓时,如果买入的股票已经存在于目前的持仓里,那么应继续持有\n no_need_to_sell = [i for i in stock_hold_now if i in stock_to_buy]\n # 需要卖出的股票\n stock_to_sell = [i for i in stock_hold_now if i not in no_need_to_sell]\n\n # 卖出\n for stock in stock_to_sell:\n # 如果该股票停牌,则没法成交。因此需要用can_trade方法检查下该股票的状态\n # 如果返回真值,则可以正常下单,否则会出错\n # 因为stock是字符串格式,我们用symbol方法将其转化成平台可以接受的形式:Equity格式\n if data.can_trade(context.symbol(stock)):\n # order_target_percent是平台的一个下单接口,表明下单使得该股票的权重为0,\n # 即卖出全部股票,可参考回测文档\n print('卖出order target percent',context.symbol(stock))\n print('卖出结果',context.order_target_percent(context.symbol(stock), 0))\n\n # 如果当天没有买入的股票,就返回\n if len(stock_to_buy) == 0:\n return\n\n # 买入\n print('买入列表',stock_to_buy)\n for i, instrument in enumerate(stock_to_buy):\n cash = context.portfolio.portfolio_value * 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 > 500:\n cash = int(math.floor(cash))\n print('买入order_value',context.symbol(instrument),' cash ',cash)\n print(context.order_value(context.symbol(instrument), cash))\n except Exception as e:\n print('抛出异常',e)","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":"80","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":"True","type":"Literal","bound_global_parameter":null},{"name":"show_debug_info","value":"True","type":"Literal","bound_global_parameter":null},{"name":"backtest_only","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-1481"},{"name":"options_data","node_id":"-1481"},{"name":"history_ds","node_id":"-1481"},{"name":"benchmark_ds","node_id":"-1481"}],"output_ports":[{"name":"raw_perf","node_id":"-1481"}],"cacheable":false,"seq_num":21,"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":"-228","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"def del_input(input_1):\n df = input_1.read_df()\n df = df.drop([\"trigger_cond_item_desc\",'revise_item_desc','trigger_item_desc'],axis=1)\n df = df.dropna(axis=0, how='all', thresh=None, subset=None, inplace=False)\n print(df.columns)\n #df.sort_values(by=['date','double_low'],axis=0,ascending=True,inplace = True)\n df = df.sort_index(axis = 1)\n df = df.reset_index(drop = True)\n df = df.groupby('date').head(10)\n #print(df[['double_low','date']])\n data_1 = DataSource.write_df(df)\n return data_1\n# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n data_1 = del_input(input_1)\n data_2 = del_input(input_2)\n return Outputs(data_1=data_1, data_2=data_2, data_3=None)","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":"-228"},{"name":"input_2","node_id":"-228"},{"name":"input_3","node_id":"-228"}],"output_ports":[{"name":"data_1","node_id":"-228"},{"name":"data_2","node_id":"-228"},{"name":"data_3","node_id":"-228"}],"cacheable":false,"seq_num":23,"comment":"","comment_collapsed":true},{"node_id":"-109","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 # 示例代码如下。在这里编写您的代码\n print('m11.input1',input_1)\n df = input_1.read()\n param = input_2.read()\n \n data = {\n \"param\": param,\n \"data\": df\n }\n data_1 = DataSource.write_pickle(data)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","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":"-109"},{"name":"input_2","node_id":"-109"},{"name":"input_3","node_id":"-109"}],"output_ports":[{"name":"data_1","node_id":"-109"},{"name":"data_2","node_id":"-109"},{"name":"data_3","node_id":"-109"}],"cacheable":true,"seq_num":11,"comment":"合并数据和Trade参数","comment_collapsed":true},{"node_id":"-121","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, stock_count, hold_days):\n # 示例代码如下。在这里编写您的代码\n param = {\n \"stock_count\": stock_count,\n \"hold_days\": hold_days\n }\n data_1 = DataSource.write_pickle(param)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\n","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":"{\n \"stock_count\": 4,\n \"hold_days\": 5 \n}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-121"},{"name":"input_2","node_id":"-121"},{"name":"input_3","node_id":"-121"}],"output_ports":[{"name":"data_1","node_id":"-121"},{"name":"data_2","node_id":"-121"},{"name":"data_3","node_id":"-121"}],"cacheable":true,"seq_num":14,"comment":"暴露Trade的参数","comment_collapsed":true},{"node_id":"-16105","module_id":"BigQuantSpace.hyper_parameter_search.hyper_parameter_search-v1","parameters":[{"name":"param_grid_builder","value":"def bigquant_run():\n import itertools\n param_grid = {}\n \n period_list = [5,6,120] \n \n # 在这里设置需要调优的参数备选\n feature_list = [\n '''\n double_low = close + bond_prem_ratio\n remain_size\n rank_swing_volatility_5 = nanstd((high-low)/pre_close, {0})*sqrt(200)*100\n '''.format(period) for period in period_list\n ]\n param_grid[\"m14.params\"] = [\n \"\"\"{\"stock_count\": 3, \"hold_days\": 3}\"\"\",\n \"\"\"{\"stock_count\": 4, \"hold_days\": 4}\"\"\",\n ]\n param_grid['m3.features'] = feature_list\n return param_grid","type":"Literal","bound_global_parameter":null},{"name":"scoring","value":"def bigquant_run(result):\n # 评分:收益/最大回撤\n score = result.get('m21').read_raw_perf()['sharpe'].tail(1)[0]\n return {'score': score}\n","type":"Literal","bound_global_parameter":null},{"name":"search_algorithm","value":"网格搜索","type":"Literal","bound_global_parameter":null},{"name":"search_iterations","value":10,"type":"Literal","bound_global_parameter":null},{"name":"random_state","value":"","type":"Literal","bound_global_parameter":null},{"name":"workers","value":1,"type":"Literal","bound_global_parameter":null},{"name":"worker_distributed_run","value":"False","type":"Literal","bound_global_parameter":null},{"name":"worker_silent","value":"False","type":"Literal","bound_global_parameter":null},{"name":"run_now","value":"True","type":"Literal","bound_global_parameter":null},{"name":"bq_graph","value":"True","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"bq_graph_port","node_id":"-16105"},{"name":"input_1","node_id":"-16105"},{"name":"input_2","node_id":"-16105"},{"name":"input_3","node_id":"-16105"}],"output_ports":[{"name":"result","node_id":"-16105"}],"cacheable":false,"seq_num":9,"comment":"","comment_collapsed":true},{"node_id":"-221","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,start_date_input,end_date_input):\n # 示例代码如下。在这里编写您的代码\n df = DataSource(\"bar1d_CN_CONBOND\").read(start_date=start_date_input, end_date=end_date_input)\n df1 = DataSource(\"market_performance_CN_CONBOND\").read(start_date=start_date_input, end_date=end_date_input)\n df2 = df.drop(['close'],axis = 1)\n df3 = pd.merge(df1,df2,on=['date','instrument'],how='inner')\n data_1 = DataSource.write_df(df3)\n data_2 = DataSource.write_df(df3)\n return Outputs(data_1=data_1, data_2=data_2, data_3=None)\n","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":"{\"start_date_input\":\"2021-01-05\",\n\"end_date_input\":\"2021-06-19\"}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-221"},{"name":"input_2","node_id":"-221"},{"name":"input_3","node_id":"-221"}],"output_ports":[{"name":"data_1","node_id":"-221"},{"name":"data_2","node_id":"-221"},{"name":"data_3","node_id":"-221"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='672,-151,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-43' Position='558,575,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='729,717,200,200'/><node_position Node='-281' Position='369,140,200,200'/><node_position Node='-295' Position='941,147,200,200'/><node_position Node='-129' Position='-5,156,200,200'/><node_position Node='-147' Position='69,-161,200,200'/><node_position Node='-758' Position='1373,160,200,200'/><node_position Node='-1481' Position='1025,791,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='117,385,200,200'/><node_position Node='-228' Position='701,-2,200,200'/><node_position Node='-109' Position='1269,643,200,200'/><node_position Node='-121' Position='1577,522,200,200'/><node_position Node='-16105' Position='116,574,200,200'/><node_position Node='-221' Position='1312,-181,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-06-27 22:53:36.914767] INFO: moduleinvoker: input_features.v1 开始运行..
[2022-06-27 22:53:37.054044] INFO: moduleinvoker: input_features.v1 运行完成[0.139298s].
[2022-06-27 22:53:37.093629] INFO: moduleinvoker: cached.v3 开始运行..
[2022-06-27 22:53:41.550232] INFO: moduleinvoker: cached.v3 运行完成[4.456627s].
[2022-06-27 22:53:43.018737] INFO: moduleinvoker: auto_labeler_on_datasource.v1 开始运行..
[2022-06-27 22:53:43.488069] INFO: 自动标注(任意数据源): 开始标注 ..
[2022-06-27 22:53:44.618582] INFO: moduleinvoker: auto_labeler_on_datasource.v1 运行完成[1.599851s].
[2022-06-27 22:53:44.661503] INFO: moduleinvoker: cached.v3 开始运行..
[2022-06-27 22:53:44.769714] INFO: moduleinvoker: cached.v3 运行完成[0.108214s].
[2022-06-27 22:53:44.799228] INFO: moduleinvoker: cached.v3 开始运行..
[2022-06-27 22:53:47.423168] INFO: moduleinvoker: cached.v3 运行完成[2.623957s].
[2022-06-27 22:53:47.482121] INFO: moduleinvoker: cached.v3 开始运行..
[2022-06-27 22:53:49.090652] INFO: moduleinvoker: cached.v3 运行完成[1.608522s].
[2022-06-27 22:53:49.116148] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-06-27 22:53:49.624529] INFO: derived_feature_extractor: 提取完成 double_low = close + bond_prem_ratio, 0.002s
[2022-06-27 22:53:49.664907] INFO: derived_feature_extractor: 提取完成 rank_swing_volatility_5 = nanstd((high-low)/pre_close, 5)*sqrt(200)*100, 0.038s
[2022-06-27 22:53:49.969262] INFO: derived_feature_extractor: /data, 5920
[2022-06-27 22:53:50.240567] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[1.1245s].
[2022-06-27 22:53:50.295968] INFO: moduleinvoker: join.v3 开始运行..
[2022-06-27 22:53:53.061436] INFO: join: /data, 行数=5789/5920, 耗时=0.32405s
[2022-06-27 22:53:53.319867] INFO: join: 最终行数: 5789
[2022-06-27 22:53:53.355453] INFO: moduleinvoker: join.v3 运行完成[3.059478s].
[2022-06-27 22:53:53.385851] INFO: moduleinvoker: stock_ranker_train.v6 开始运行..
[2022-06-27 22:53:53.968760] INFO: StockRanker: 特征预处理 ..
[2022-06-27 22:53:54.050219] INFO: StockRanker: prepare data: training ..
[2022-06-27 22:53:54.283706] INFO: StockRanker训练: f65c769c 准备训练: 5789 行数
[2022-06-27 22:53:54.286014] INFO: StockRanker训练: AI模型训练,将在5789*3=1.74万数据上对模型训练进行20轮迭代训练。预计将需要1~2分钟。请耐心等待。
[2022-06-27 22:53:54.481103] INFO: StockRanker训练: 正在训练 ..
[2022-06-27 22:53:54.556971] INFO: StockRanker训练: 任务状态: Pending
[2022-06-27 22:54:14.860238] INFO: StockRanker训练: 任务状态: Running
[2022-06-27 22:55:25.542498] INFO: StockRanker训练: 00:01:03.3359280, finished iteration 1
[2022-06-27 22:55:25.558781] INFO: StockRanker训练: 00:01:03.3575462, finished iteration 2
[2022-06-27 22:55:25.570269] INFO: StockRanker训练: 00:01:03.4165336, finished iteration 3
[2022-06-27 22:55:25.586827] INFO: StockRanker训练: 00:01:03.4544459, finished iteration 4
[2022-06-27 22:55:25.597571] INFO: StockRanker训练: 00:01:03.4707795, finished iteration 5
[2022-06-27 22:55:25.607391] INFO: StockRanker训练: 00:01:03.4831823, finished iteration 6
[2022-06-27 22:55:25.614290] INFO: StockRanker训练: 00:01:03.5103710, finished iteration 7
[2022-06-27 22:55:25.617038] INFO: StockRanker训练: 00:01:03.5504815, finished iteration 8
[2022-06-27 22:55:25.619683] INFO: StockRanker训练: 00:01:03.5695104, finished iteration 9
[2022-06-27 22:55:25.622325] INFO: StockRanker训练: 00:01:03.5963399, finished iteration 10
[2022-06-27 22:55:25.624995] INFO: StockRanker训练: 00:01:03.6363771, finished iteration 11
[2022-06-27 22:55:25.627631] INFO: StockRanker训练: 00:01:03.6704580, finished iteration 12
[2022-06-27 22:55:25.630190] INFO: StockRanker训练: 00:01:03.6817212, finished iteration 13
[2022-06-27 22:55:25.632579] INFO: StockRanker训练: 00:01:03.7075075, finished iteration 14
[2022-06-27 22:55:25.635265] INFO: StockRanker训练: 00:01:03.7227046, finished iteration 15
[2022-06-27 22:55:25.641271] INFO: StockRanker训练: 00:01:03.7417501, finished iteration 16
[2022-06-27 22:55:25.643920] INFO: StockRanker训练: 00:01:03.7535100, finished iteration 17
[2022-06-27 22:55:25.651492] INFO: StockRanker训练: 00:01:03.7734722, finished iteration 18
[2022-06-27 22:55:25.653903] INFO: StockRanker训练: 00:01:03.7843872, finished iteration 19
[2022-06-27 22:55:25.656073] INFO: StockRanker训练: 00:01:03.8194875, finished iteration 20
[2022-06-27 22:55:35.718181] INFO: StockRanker训练: 任务状态: Succeeded
[2022-06-27 22:55:36.367072] INFO: moduleinvoker: stock_ranker_train.v6 运行完成[102.981212s].
[2022-06-27 22:55:36.388056] INFO: moduleinvoker: derived_feature_extractor.v3 开始运行..
[2022-06-27 22:55:36.648029] INFO: derived_feature_extractor: 提取完成 double_low = close + bond_prem_ratio, 0.002s
[2022-06-27 22:55:36.691719] INFO: derived_feature_extractor: 提取完成 rank_swing_volatility_5 = nanstd((high-low)/pre_close, 5)*sqrt(200)*100, 0.041s
[2022-06-27 22:55:37.053236] INFO: derived_feature_extractor: /data, 1090
[2022-06-27 22:55:37.305584] INFO: moduleinvoker: derived_feature_extractor.v3 运行完成[0.91753s].
[2022-06-27 22:55:37.377035] INFO: moduleinvoker: stock_ranker_predict.v5 开始运行..
[2022-06-27 22:55:39.966171] INFO: StockRanker预测: /data ..
[2022-06-27 22:55:42.075148] INFO: moduleinvoker: stock_ranker_predict.v5 运行完成[4.69811s].
[2022-06-27 22:55:42.125934] INFO: moduleinvoker: cached.v3 开始运行..
[2022-06-27 22:55:42.312000] INFO: moduleinvoker: cached.v3 运行完成[0.18608s].
[2022-06-27 22:55:42.461557] INFO: moduleinvoker: trade_data_generation.v1 开始运行..
[2022-06-27 22:55:46.062169] INFO: moduleinvoker: trade_data_generation.v1 运行完成[3.600592s].
[2022-06-27 22:55:46.514778] INFO: moduleinvoker: hfbacktest.v1 开始运行..
[2022-06-27 22:55:46.670000] INFO: hfbacktest: passed-in daily_data_ds:None
[2022-06-27 22:55:46.673014] INFO: hfbacktest: passed-in minute_data_ds:None
[2022-06-27 22:55:46.683087] INFO: hfbacktest: passed-in tick_data_ds:None
[2022-06-27 22:55:46.691095] INFO: hfbacktest: passed-in each_data_ds:None
[2022-06-27 22:55:46.704568] INFO: hfbacktest: passed-in dominant_data_ds:None
[2022-06-27 22:55:46.709521] INFO: hfbacktest: passed-in benchmark_data_ds:None
[2022-06-27 22:55:46.715002] INFO: hfbacktest: passed-in trading_calendar_ds:None
[2022-06-27 22:55:47.362698] INFO: hfbacktest: biglearning V1.4.14
[2022-06-27 22:55:47.367892] INFO: hfbacktest: bigtrader v1.9.6 2022-06-22
[2022-06-27 22:55:47.564133] INFO: hfbacktest: strategy callbacks:{'on_init': , 'on_stop': , 'on_start': , 'handle_data': , 'handle_tick': , 'handle_trade': , 'handle_order': }
[2022-06-27 22:55:47.621419] INFO: hfbacktest: begin reading history data, 2021-01-05 00:00:00~2021-06-18, disable_cache:False, replay_bdb:1
[2022-06-27 22:55:47.626090] INFO: hfbacktest: reading benchmark data 2021-01-04 00:00:00~2021-06-18...
[2022-06-27 22:55:47.640996] INFO: moduleinvoker: cached.v2 开始运行..
[2022-06-27 22:55:48.214551] INFO: moduleinvoker: cached.v2 运行完成[0.573544s].
[2022-06-27 22:55:48.287502] INFO: hfbacktest: reading daily data 2019-12-30 00:00:00~2021-06-18...
[2022-06-27 22:55:48.336408] INFO: moduleinvoker: cached.v2 开始运行..
[2022-06-27 22:55:49.552350] INFO: moduleinvoker: cached.v2 运行完成[1.215969s].
[2022-06-27 22:55:49.852707] INFO: hfbacktest: cached_benchmark_ds:DataSource(9fdaac123ba14b0697f57fe06121e238T)
[2022-06-27 22:55:49.859489] INFO: hfbacktest: cached_daily_ds:DataSource(1fea5adf2da64efaabef0526a4d395bbT)
[2022-06-27 22:55:49.869198] INFO: hfbacktest: cached_minute_ds:None
[2022-06-27 22:55:49.872540] INFO: hfbacktest: cached_tick_ds:None
[2022-06-27 22:55:49.875350] INFO: hfbacktest: cached_each_ds:None
[2022-06-27 22:55:49.878358] INFO: hfbacktest: dominant_data_ds:None
[2022-06-27 22:55:49.880164] INFO: hfbacktest: read history data done, call run_backtest()
[2022-06-27 22:55:51.708936] ERROR: moduleinvoker: module name: hfbacktest, module version: v1, trackeback: OverflowError: cannot convert float infinity to integer
[2022-06-27 22:55:51.784519] ERROR: moduleinvoker: module name: hftrade, module version: v2, trackeback: OverflowError: cannot convert float infinity to integer
Index(['remain_size', 'instrument', 'equ_trading_code', 'conversion_chg_pct',
'date', 'conversion_price', 'name_x', 'trading_code',
'conversion_chg_pct_week', 'bond_prem_ratio', 'equ_name',
'redemption_price', 'close_equ', 'total_size', 'pure_bond_prem_ratio',
'pure_bond_ratio', 'close', 'pre_close', 'name_y', 'open', 'high',
'low', 'deal_number', 'volume', 'amount', 'accrued_interest',
'yield_to_maturity', 'vwap', 'gross_close', 'net_close'],
dtype='object')
Index(['remain_size', 'instrument', 'equ_trading_code', 'conversion_chg_pct',
'date', 'conversion_price', 'name_x', 'trading_code',
'conversion_chg_pct_week', 'bond_prem_ratio', 'equ_name',
'redemption_price', 'close_equ', 'total_size', 'pure_bond_prem_ratio',
'pure_bond_ratio', 'close', 'pre_close', 'name_y', 'open', 'high',
'low', 'deal_number', 'volume', 'amount', 'accrued_interest',
'yield_to_maturity', 'vwap', 'gross_close', 'net_close'],
dtype='object')
bigcharts-data-start/{"__type":"tabs","__id":"bigchart-27274cfd9b8f4d2087ace9be3a6d7159"}/bigcharts-data-end
m11.input1 DataSource(40d32d3b18ea48999be6fb2e1c2b7062T)
2022-06-27 22:55:49.932538 init history datas...
2022-06-27 22:55:49.933923 init history datas done.
2022-06-27 22:55:49.946181 run_backtest() capital_base:1000000, frequency:1d, product_type:conbond, date:2021-01-05 ~ 2021-06-18
2022-06-27 22:55:49.946755 run_backtest() running...
2022-06-27 22:55:49.987275 initial contracts len=0
2022-06-27 22:55:49.987535 backtest inited.
初始化函数开始:
context.options {'data': DataSource(4ab7f0956b7c4dfba027981cd2dcb15dT)}
初始化函数结束
2022-06-27 22:55:50.051275 backtest transforming 1d, bars=1...
2022-06-27 22:55:50.051512 transform start_trading_day=2021-01-05 00:00:00, simulation period=2021-01-05 ~ 2021-06-18
2022-06-27 22:55:50.051560 transform source=None, before_start_days=80
2022-06-27 22:55:50.051611 transform replay_func=<cyfunction BacktestEngine.transform.<locals>.replay_bars_dt at 0x7f809fd7c1e0>
订阅行情前 BarDatas(current_dt:2021-01-05 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-05 08:30:00)
当前日期data.current_dt 2021-01-05 15:00:00
data BarDatas(current_dt:2021-01-05 15:00:00)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
买入列表 ['110047.HCB', '110033.HCB', '128042.ZCB', '128129.ZCB']
买入order_value Equity(381 [110047.HCB]) cash 390380
0
买入order_value Equity(386 [110033.HCB]) cash 246302
0
买入order_value Equity(267 [128042.ZCB]) cash 195190
0
买入order_value Equity(168 [128129.ZCB]) cash 168127
0
订阅行情前 BarDatas(current_dt:2021-01-06 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-06 08:30:00)
当前日期data.current_dt 2021-01-06 15:00:00
data BarDatas(current_dt:2021-01-06 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-07 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-07 08:30:00)
当前日期data.current_dt 2021-01-07 15:00:00
data BarDatas(current_dt:2021-01-07 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-08 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-08 08:30:00)
当前日期data.current_dt 2021-01-08 15:00:00
data BarDatas(current_dt:2021-01-08 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-11 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-11 08:30:00)
当前日期data.current_dt 2021-01-11 15:00:00
data BarDatas(current_dt:2021-01-11 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-12 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-12 08:30:00)
当前日期data.current_dt 2021-01-12 15:00:00
data BarDatas(current_dt:2021-01-12 15:00:00)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
卖出order target percent Equity(381 [110047.HCB])
卖出结果 0
卖出order target percent Equity(386 [110033.HCB])
卖出结果 0
卖出order target percent Equity(267 [128042.ZCB])
卖出结果 0
卖出order target percent Equity(168 [128129.ZCB])
卖出结果 0
买入列表 ['110065.HCB', '110034.HCB', '110051.HCB', '110056.HCB']
买入order_value Equity(108 [110065.HCB]) cash 388693
0
买入order_value Equity(182 [110034.HCB]) cash 245238
0
买入order_value Equity(6 [110051.HCB]) cash 194346
0
买入order_value Equity(387 [110056.HCB]) cash 167401
0
订阅行情前 BarDatas(current_dt:2021-01-13 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-13 08:30:00)
当前日期data.current_dt 2021-01-13 15:00:00
data BarDatas(current_dt:2021-01-13 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-14 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-14 08:30:00)
当前日期data.current_dt 2021-01-14 15:00:00
data BarDatas(current_dt:2021-01-14 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-15 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-15 08:30:00)
当前日期data.current_dt 2021-01-15 15:00:00
data BarDatas(current_dt:2021-01-15 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-18 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-18 08:30:00)
当前日期data.current_dt 2021-01-18 15:00:00
data BarDatas(current_dt:2021-01-18 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-19 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-19 08:30:00)
当前日期data.current_dt 2021-01-19 15:00:00
data BarDatas(current_dt:2021-01-19 15:00:00)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
卖出order target percent Equity(108 [110065.HCB])
卖出结果 0
卖出order target percent Equity(6 [110051.HCB])
卖出结果 0
卖出order target percent Equity(387 [110056.HCB])
卖出结果 0
买入列表 ['110034.HCB', '113036.HCB', '110038.HCB', '110045.HCB']
买入order_value Equity(182 [110034.HCB]) cash 145528
0
买入order_value Equity(28 [113036.HCB]) cash 243631
0
买入order_value Equity(47 [110038.HCB]) cash 193073
0
买入order_value Equity(316 [110045.HCB]) cash 166304
0
订阅行情前 BarDatas(current_dt:2021-01-20 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-20 08:30:00)
当前日期data.current_dt 2021-01-20 15:00:00
data BarDatas(current_dt:2021-01-20 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-21 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-21 08:30:00)
当前日期data.current_dt 2021-01-21 15:00:00
data BarDatas(current_dt:2021-01-21 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-22 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-22 08:30:00)
当前日期data.current_dt 2021-01-22 15:00:00
data BarDatas(current_dt:2021-01-22 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-25 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-25 08:30:00)
当前日期data.current_dt 2021-01-25 15:00:00
data BarDatas(current_dt:2021-01-25 15:00:00)
订阅行情前 BarDatas(current_dt:2021-01-26 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-26 08:30:00)
当前日期data.current_dt 2021-01-26 15:00:00
data BarDatas(current_dt:2021-01-26 15:00:00)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
卖出order target percent Equity(28 [113036.HCB])
卖出结果 0
卖出order target percent Equity(47 [110038.HCB])
卖出结果 0
卖出order target percent Equity(316 [110045.HCB])
卖出结果 0
买入列表 ['110047.HCB', '110077.HCB', '113024.HCB', '110034.HCB']
买入order_value Equity(381 [110047.HCB]) cash 381043
0
买入order_value Equity(33 [110077.HCB]) cash 240411
0
买入order_value Equity(299 [113024.HCB]) cash 190521
0
订阅行情前 BarDatas(current_dt:2021-01-27 08:30:00)
订阅行情后 BarDatas(current_dt:2021-01-27 08:30:00)
2022-06-27 22:55:51.707928 strategy strategy exception:Traceback (most recent call last):
File "bigtrader/strategy/engine.py", line 713, in bigtrader2.bigtrader.strategy.engine.StrategyEngine._call_strategy_func
File "bigtrader/strategy/strategy_base.py", line 2188, in bigtrader2.bigtrader.strategy.strategy_base.StrategyBase.call_handle_continous_trading
File "bigtrader/finance/account_engine.py", line 2457, in bigtrader2.bigtrader.finance.account_engine.AccountEngine.send_order
File "bigtrader/finance/account_engine.py", line 2355, in bigtrader2.bigtrader.finance.account_engine.AccountEngine._check_order_cash_or_adjust
OverflowError: cannot convert float infinity to integer
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
<ipython-input-2-d2d7234668d1> in <module>
327 )
328
--> 329 m21 = M.hftrade.v2(
330 instruments=m12.instrument_list,
331 options_data=m11.data_1,
OverflowError: cannot convert float infinity to integer