{"description":"实验创建于2022/5/12","graph":{"edges":[{"to_node_id":"-280:input_1","from_node_id":"-1878:data"},{"to_node_id":"-280:input_2","from_node_id":"-1890:data_1"},{"to_node_id":"-902:input_ds","from_node_id":"-960:data_1"},{"to_node_id":"-921:input_2","from_node_id":"-902:data"},{"to_node_id":"-268:input_1","from_node_id":"-3631:data"},{"to_node_id":"-157:input_2","from_node_id":"-3631:data"},{"to_node_id":"-268:input_2","from_node_id":"-4795:data_1"},{"to_node_id":"-3672:input_ds","from_node_id":"-3663:data_1"},{"to_node_id":"-921:input_3","from_node_id":"-3672:data"},{"to_node_id":"-592:input_1","from_node_id":"-921:data_1"},{"to_node_id":"-483:input_1","from_node_id":"-592:data_1"},{"to_node_id":"-489:input_data","from_node_id":"-483:data"},{"to_node_id":"-585:input_data","from_node_id":"-489:data_1"},{"to_node_id":"-500:input_1","from_node_id":"-585:data"},{"to_node_id":"-577:input_1","from_node_id":"-500:data_1"},{"to_node_id":"-157:input_1","from_node_id":"-577:data_1"},{"to_node_id":"-236:input_1","from_node_id":"-577:data_2"},{"to_node_id":"-3663:input_1","from_node_id":"-268:data_1"},{"to_node_id":"-960:input_1","from_node_id":"-280:data_1"},{"to_node_id":"-181:instruments","from_node_id":"-157:data_1"},{"to_node_id":"-2555:input_1","from_node_id":"-157:data_1"},{"to_node_id":"-169:input_1","from_node_id":"-157:data_2"},{"to_node_id":"-220:input_ds","from_node_id":"-169:data_1"},{"to_node_id":"-214:input_ds","from_node_id":"-2555:data_1"},{"to_node_id":"-229:input_1","from_node_id":"-214:data"},{"to_node_id":"-229:input_2","from_node_id":"-220:data"},{"to_node_id":"-181:options_data","from_node_id":"-229:data_1"},{"to_node_id":"-181:history_ds","from_node_id":"-229:data_1"},{"to_node_id":"-224:input_data","from_node_id":"-229:data_2"}],"nodes":[{"node_id":"-1878","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2019-10-11","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-10-11","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_FUND","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"#159919.ZOF","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-1878"}],"output_ports":[{"name":"data","node_id":"-1878"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-1890","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, start_date,end_date):\n # 示例代码如下。在这里编写您的代码\n #from datetime import datetime\n #ins=input_1.read_pickle()['instruments']\n #start_date=input_1.read_pickle()['start_date']\n #end_date=input_1.read_pickle()['end_date']\n #start_date_dt = datetime.strptime(start_date, '%Y-%m-%d')\n #end_date_dt = datetime.strptime(end_date, '%Y-%m-%d')\n \n fund_info = DataSource('basic_info_CN_FUND').read()\n #fund_info_0 = fund_info[fund_info['type'] == 'ETF']\n\n data_1 = DataSource.write_df(fund_info)\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":"-1890"},{"name":"input_2","node_id":"-1890"},{"name":"input_3","node_id":"-1890"}],"output_ports":[{"name":"data_1","node_id":"-1890"},{"name":"data_2","node_id":"-1890"},{"name":"data_3","node_id":"-1890"}],"cacheable":true,"seq_num":2,"comment":"读出场内基金信息","comment_collapsed":false},{"node_id":"-960","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 df = DataSource.read_df(input_1)\n df['close'] = df['close'] * df['adjust_factor']\n df = df.sort_values(['instrument', 'date'])\n first_instrument = df.iloc[0]['instrument']\n for key, group in df.groupby('instrument'):\n group['return_0'] = group['close'] / group['close'].shift(1) - 1\n if key == first_instrument:\n group_all = group\n else:\n group_all = pd.concat([group_all, group])\n group_all = group_all.dropna()\n #df['cum_return'] = (df['return_0'] + 1).cumprod() - 1\n data_1 = DataSource.write_df(group_all)\n #data_2 = DataSource.write_pickle(df)\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":"-960"},{"name":"input_2","node_id":"-960"},{"name":"input_3","node_id":"-960"}],"output_ports":[{"name":"data_1","node_id":"-960"},{"name":"data_2","node_id":"-960"},{"name":"data_3","node_id":"-960"}],"cacheable":true,"seq_num":3,"comment":"计算日收益率","comment_collapsed":false},{"node_id":"-902","module_id":"BigQuantSpace.select_columns.select_columns-v3","parameters":[{"name":"columns","value":"date,instrument,return_0,close","type":"Literal","bound_global_parameter":null},{"name":"reverse_select","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-902"},{"name":"columns_ds","node_id":"-902"}],"output_ports":[{"name":"data","node_id":"-902"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-3631","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2019-10-11","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-10-11","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_MUTFUND","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"#000395.OFCN","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-3631"}],"output_ports":[{"name":"data","node_id":"-3631"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true},{"node_id":"-4795","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1):\n # 示例代码如下。在这里编写您的代码\n #from datetime import datetime\n #ins=input_1.read_pickle()['instruments']\n #start_date=input_1.read_pickle()['start_date']\n #end_date=input_1.read_pickle()['end_date']\n #start_date_dt = datetime.strptime(start_date, '%Y-%m-%d')\n #end_date_dt = datetime.strptime(end_date, '%Y-%m-%d')\n \n #if len(ins) == 0:\n fund_info = DataSource('basic_info_CN_MUTFUND').read()\n #fund_info_0 = fund_info[fund_info['etf_lof'] == 'ETF']\n data_1 = DataSource.write_df(fund_info)\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":"-4795"},{"name":"input_2","node_id":"-4795"},{"name":"input_3","node_id":"-4795"}],"output_ports":[{"name":"data_1","node_id":"-4795"},{"name":"data_2","node_id":"-4795"},{"name":"data_3","node_id":"-4795"}],"cacheable":true,"seq_num":6,"comment":"读出场外公募基金信息","comment_collapsed":false},{"node_id":"-3663","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 df = DataSource.read_df(input_1)\n df = df.rename({'adjust_nav': 'close'}, axis = 1)\n df['return_0'] = df['adj_nav_chg_pct'] / 100\n '''\n df = df.sort_values(['instrument', 'date'])\n first_instrument = df.iloc[0]['instrument']\n for key, group in df.groupby('instrument'):\n group['cum_return'] = (group['return_0'] + 1).cumprod() - 1\n if key == first_instrument:\n group_all = group\n else:\n group_all = pd.concat([group_all, group])\n ''' \n data_1 = DataSource.write_df(df)\n #data_2 = DataSource.write_pickle(df)\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":"-3663"},{"name":"input_2","node_id":"-3663"},{"name":"input_3","node_id":"-3663"}],"output_ports":[{"name":"data_1","node_id":"-3663"},{"name":"data_2","node_id":"-3663"},{"name":"data_3","node_id":"-3663"}],"cacheable":true,"seq_num":28,"comment":"计算日收益率","comment_collapsed":false},{"node_id":"-3672","module_id":"BigQuantSpace.select_columns.select_columns-v3","parameters":[{"name":"columns","value":"date,instrument,return_0,close","type":"Literal","bound_global_parameter":null},{"name":"reverse_select","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-3672"},{"name":"columns_ds","node_id":"-3672"}],"output_ports":[{"name":"data","node_id":"-3672"}],"cacheable":true,"seq_num":29,"comment":"","comment_collapsed":true},{"node_id":"-921","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 #df1 = DataSource.read_df(input_1)\n df2 = DataSource.read_df(input_2)\n df3 = DataSource.read_df(input_3)\n df = pd.concat([df2, df3])\n data_1 = DataSource.write_df(df)\n #data_2 = DataSource.write_pickle(df)\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":"-921"},{"name":"input_2","node_id":"-921"},{"name":"input_3","node_id":"-921"}],"output_ports":[{"name":"data_1","node_id":"-921"},{"name":"data_2","node_id":"-921"},{"name":"data_3","node_id":"-921"}],"cacheable":true,"seq_num":30,"comment":"纵向合并2个表","comment_collapsed":false},{"node_id":"-592","module_id":"BigQuantSpace.set_inf_to_nan.set_inf_to_nan-v1","parameters":[],"input_ports":[{"name":"input_1","node_id":"-592"}],"output_ports":[{"name":"data_1","node_id":"-592"}],"cacheable":true,"seq_num":31,"comment":"","comment_collapsed":true},{"node_id":"-483","module_id":"BigQuantSpace.pivot_fbfill_stack.pivot_fbfill_stack-v3","parameters":[{"name":"index_col","value":"date","type":"Literal","bound_global_parameter":null},{"name":"col_name","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"values_col","value":"return_0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-483"}],"output_ports":[{"name":"data","node_id":"-483"}],"cacheable":true,"seq_num":33,"comment":"","comment_collapsed":true},{"node_id":"-489","module_id":"BigQuantSpace.pandas_pivot_table.pandas_pivot_table-v1","parameters":[{"name":"index","value":"date","type":"Literal","bound_global_parameter":null},{"name":"columns","value":"instrument","type":"Literal","bound_global_parameter":null},{"name":"values","value":"return_0","type":"Literal","bound_global_parameter":null},{"name":"flat","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-489"}],"output_ports":[{"name":"data_1","node_id":"-489"}],"cacheable":true,"seq_num":34,"comment":"用日收益率形成透视表","comment_collapsed":false},{"node_id":"-585","module_id":"BigQuantSpace.dropnan.dropnan-v2","parameters":[],"input_ports":[{"name":"input_data","node_id":"-585"},{"name":"features","node_id":"-585"}],"output_ports":[{"name":"data","node_id":"-585"}],"cacheable":true,"seq_num":35,"comment":"","comment_collapsed":true},{"node_id":"-500","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 df = DataSource.read_df(input_1)\n df = df.loc[ :,(\"return_0\", )]\n data_1 = DataSource.write_df(df)\n #data_2 = DataSource.write_pickle(df)\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":"-500"},{"name":"input_2","node_id":"-500"},{"name":"input_3","node_id":"-500"}],"output_ports":[{"name":"data_1","node_id":"-500"},{"name":"data_2","node_id":"-500"},{"name":"data_3","node_id":"-500"}],"cacheable":true,"seq_num":36,"comment":"修改列索引","comment_collapsed":false},{"node_id":"-577","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 df = DataSource.read_df(input_1)\n df_columns = df.columns.to_list()\n hs300_corr = pd.DataFrame(0, index = df_columns, columns = ['hs300_corr'])\n for label, item in df.iteritems():\n hs300_corr.loc[label, 'hs300_corr'] = df['159919.ZOF'].corr(item)\n hs300_corr = hs300_corr.sort_values(by = ['hs300_corr'])\n hs300_corr1 = hs300_corr[(hs300_corr['hs300_corr'] <= 0.01) & (hs300_corr['hs300_corr'] >= - 0.01)]\n hs300_corr1_ins = hs300_corr1.index.to_list()\n hs300_corr1_ins.append('159919.ZOF')\n hs300_corr_df = df[hs300_corr1_ins]\n corr_high = hs300_corr_df.corr().applymap(lambda x: np.nan if x > 0.1 else x).isnull()\n col_all = corr_high.columns.tolist()\n del_col = []\n i = 0\n while i < len(col_all) - 1:\n ex_index = corr_high.iloc[:,i][i+1:].index[np.where(corr_high.iloc[:,i][i+1:])].tolist()\n for var in ex_index:\n col_all.remove(var)\n corr_high = corr_high.loc[col_all, col_all]\n i += 1\n col_all_corr = hs300_corr_df[col_all].corr()\n hs300_nocorr_df = hs300_corr_df[col_all]\n #print(\"下表为无相关性的基金的两两的相关系数,接近0表示相关性弱,接近1表示相关性强。\")\n #print(col_all_corr)\n ins = hs300_nocorr_df.columns.to_list()\n df2 = DataSource(\"basic_info_CN_FUND\").read()\n df4 = DataSource(\"basic_info_CN_MUTFUND\").read()\n name = []\n for value in ins:\n is_named = False\n for index1, row1 in df4.iterrows():\n if value == row1['instrument']:\n name.append(row1['sec_short_name'])\n is_named = True\n break\n if not is_named:\n for index2, row2 in df2.iterrows():\n if value == row2['instrument']:\n name.append(row2['name'])\n is_named = True\n break\n hs300_nocorr_df.columns = name\n data_1 = DataSource.write_df(col_all_corr)\n data_2 = DataSource.write_df(hs300_nocorr_df)\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":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-577"},{"name":"input_2","node_id":"-577"},{"name":"input_3","node_id":"-577"}],"output_ports":[{"name":"data_1","node_id":"-577"},{"name":"data_2","node_id":"-577"},{"name":"data_3","node_id":"-577"}],"cacheable":true,"seq_num":37,"comment":"筛选出与沪深300指数基金相关性低的基金","comment_collapsed":false},{"node_id":"-268","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):\n # 示例代码如下。在这里编写您的代码\n from datetime import datetime\n ins=input_1.read_pickle()['instruments']\n start_date=input_1.read_pickle()['start_date']\n end_date=input_1.read_pickle()['end_date']\n start_date_dt = datetime.strptime(start_date, '%Y-%m-%d')\n end_date_dt = datetime.strptime(end_date, '%Y-%m-%d')\n fund_info_0 = DataSource.read_df(input_2)\n \n fund_info_delist_date = fund_info_0[fund_info_0['delist_date'].notnull()]\n fund_info_delist_date1 = fund_info_delist_date[(fund_info_delist_date['delist_date'] >= end_date_dt) & (fund_info_delist_date['list_date'] <= start_date_dt)]\n ins_delist_date1 = fund_info_delist_date1['instrument'].to_list()\n fund_info_delist_date2 = fund_info_0[fund_info_0['delist_date'].isnull() & (fund_info_0['list_date'] <= start_date_dt)]\n ins_delist_date2 = fund_info_delist_date2['instrument'].to_list()\n fund_info_expire_date = fund_info_0[fund_info_0['expire_date'].notnull()]\n fund_info_expire_date1 = fund_info_expire_date[(fund_info_expire_date['expire_date'] >= end_date_dt) & (fund_info_expire_date['establish_date'] <= start_date_dt)]\n ins_expire_date1 = fund_info_expire_date1['instrument'].to_list()\n fund_info_expire_date2 = fund_info_0[fund_info_0['expire_date'].isnull() & (fund_info_0['establish_date'] <= start_date_dt)]\n ins_expire_date2 = fund_info_expire_date2['instrument'].to_list()\n ins1 = ins_delist_date1 + ins_delist_date2 + ins_expire_date1 + ins_expire_date2 \n df=DataSource('history_nav_CN_MUTFUND').read(ins1,start_date=start_date,end_date=end_date)\n data_1 = DataSource.write_df(df)\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":"-268"},{"name":"input_2","node_id":"-268"},{"name":"input_3","node_id":"-268"}],"output_ports":[{"name":"data_1","node_id":"-268"},{"name":"data_2","node_id":"-268"},{"name":"data_3","node_id":"-268"}],"cacheable":true,"seq_num":19,"comment":"读取场外公募基金行情","comment_collapsed":false},{"node_id":"-280","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):\n # 示例代码如下。在这里编写您的代码\n from datetime import datetime\n ins=input_1.read_pickle()['instruments']\n start_date=input_1.read_pickle()['start_date']\n end_date=input_1.read_pickle()['end_date']\n start_date_dt = datetime.strptime(start_date, '%Y-%m-%d')\n end_date_dt = datetime.strptime(end_date, '%Y-%m-%d')\n \n fund_info_0 = DataSource.read_df(input_2)\n fund_info1 = fund_info_0[(fund_info_0['delist_date'] >= end_date_dt) & (fund_info_0['list_date'] <= start_date_dt)]\n fund_info2 = fund_info_0[fund_info_0['delist_date'].isnull() & (fund_info_0['list_date'] <= start_date_dt)]\n ins1 = fund_info1['instrument'].to_list() \n ins2 = fund_info2['instrument'].to_list() \n ins1.extend(ins2)\n df=DataSource('bar1d_CN_FUND').read(ins1,start_date=start_date,end_date=end_date)\n data_1 = DataSource.write_df(df)\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":"-280"},{"name":"input_2","node_id":"-280"},{"name":"input_3","node_id":"-280"}],"output_ports":[{"name":"data_1","node_id":"-280"},{"name":"data_2","node_id":"-280"},{"name":"data_3","node_id":"-280"}],"cacheable":true,"seq_num":20,"comment":"读取场内基金行情","comment_collapsed":false},{"node_id":"-157","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 df = DataSource.read_df(input_1)\n dict = DataSource.read_pickle(input_2)\n dict2 = dict.copy()\n list = df.index.to_list()\n trade_mutfund_list = []\n trade_fund_list = []\n \n for item in list:\n item_split = item.split(\".\")\n if item_split[1] == 'OFCN' or item_split[1] == 'OFCN2':\n trade_mutfund_list.append(item)\n elif item_split[1] == 'ZOF' or item_split[1] == 'HOF':\n trade_fund_list.append(item)\n \n dict['instruments'] = trade_mutfund_list\n dict2['instruments'] = trade_fund_list\n dict2['market'] = 'CN_FUND'\n #print(dict)\n data_1 = DataSource.write_pickle(dict2)\n data_2 = DataSource.write_pickle(dict)\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":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-157"},{"name":"input_2","node_id":"-157"},{"name":"input_3","node_id":"-157"}],"output_ports":[{"name":"data_1","node_id":"-157"},{"name":"data_2","node_id":"-157"},{"name":"data_3","node_id":"-157"}],"cacheable":true,"seq_num":8,"comment":"合并产生代码列表","comment_collapsed":false},{"node_id":"-169","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):\n # 示例代码如下。在这里编写您的代码\n from datetime import datetime\n ins=input_1.read_pickle()['instruments']\n start_date=input_1.read_pickle()['start_date']\n end_date=input_1.read_pickle()['end_date']\n df=DataSource('history_nav_CN_MUTFUND').read(ins,start_date=start_date,end_date=end_date)\n df['open'] = df['nav']\n df['high'] = df['nav']\n df['low'] = df['nav']\n df['close'] = df['nav']\n df['adjust_factor'] = df['adjust_nav'] / df['nav']\n df['volume'] = 1000000\n data_1 = DataSource.write_df(df)\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":"-169"},{"name":"input_2","node_id":"-169"},{"name":"input_3","node_id":"-169"}],"output_ports":[{"name":"data_1","node_id":"-169"},{"name":"data_2","node_id":"-169"},{"name":"data_3","node_id":"-169"}],"cacheable":true,"seq_num":9,"comment":"读取场外公募基金行情","comment_collapsed":false},{"node_id":"-181","module_id":"BigQuantSpace.trade.trade-v4","parameters":[{"name":"start_date","value":"2019-10-11","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-10-11","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.0003, sell_cost=0.0013, min_cost=5))\n # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)\n # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只\n #stock_count = 5\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.2\n #context.hold_days = 5\n \n #周期为22个交易日\n context.rebalance_days = 22\n\n # 如果策略运行中,需要将数据进行保存,可以借用extension这个对象,类型为dict\n # 比如当前运行的k线的索引,比如个股持仓天数、买入均价\n if 'index' not in context.extension:\n context.extension['index'] = 0\n","type":"Literal","bound_global_parameter":null},{"name":"handle_data","value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n # 不在换仓日就return,相当于后面的代码只会一个月运行一次,买入的股票会持有1个月\n if context.extension['index'] % context.rebalance_days != 0:\n context.extension['index'] += 1\n return \n \n # 按日期过滤得到今日的预测数据\n date = data.current_dt.strftime('%Y-%m-%d')\n ranker_prediction = context.ranker_prediction[\n context.ranker_prediction.date == date]\n fund_amount = len(ranker_prediction)\n instrument_open = {}\n instrument_weight = {}\n \n for index, row in ranker_prediction.iterrows():\n instrument_open[row['instrument']] = row['open']\n instrument_weight[row['instrument']] = row['weight']\n \n #print('date: ', date, 'fund_amount: ', str(fund_amount))\n \n # 1. 资金分配\n # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金\n # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)\n #is_staging = context.trading_day_index < context.hold_days # 是否在建仓期间(前 hold_days 天)\n #cash_avg = context.portfolio.portfolio_value / context.hold_days\n portfolio_value = context.portfolio.portfolio_value\n #cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)\n positions = {e.symbol: p.amount\n for e, p in context.perf_tracker.position_tracker.positions.items()}\n '''\n # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按StockRanker预测的排序末位淘汰\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 context.order_target(context.symbol(instrument), 0)\n cash_for_sell -= positions[instrument]\n if cash_for_sell <= 0:\n break\n '''\n # 3. 生成买入订单:按StockRanker预测的排序,买入前面的stock_count只股票\n if fund_amount > 0:\n weight = 1 / fund_amount\n #print('date: ', date, 'index: ', str(context.extension['index']), ' portfolio_value: ', str(portfolio_value), ' weight: ', str(weight))\n buy_instruments = list(ranker_prediction.instrument)\n #cash = cash_for_buy * buy_cash_weights\n #max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument\n for instrument, amount in positions.items():\n if instrument not in buy_instruments:\n context.order(context.symbol(instrument), - amount)\n \n for i, instrument in enumerate(buy_instruments):\n #if cash > max_cash_per_instrument - positions.get(instrument, 0):\n # 确保股票持仓量不会超过每次股票最大的占用资金量\n # cash = max_cash_per_instrument - positions.get(instrument, 0)\n #hold_amount = positions.get(instrument, 0)\n #open_price = instrument_open[instrument]\n #trade_amount = int((portfolio_value * weight - hold_amount * open_price) / open_price)\n #print('instrument: ', instrument, ' open_price: ', str(open_price), ' hold_amount: ', 'trade_amount: ', str(trade_amount))\n #if trade_amount > 100 or trade_amount < 0:\n context.order_target_percent(context.symbol(instrument), weight)\n context.extension['index'] += 1\n","type":"Literal","bound_global_parameter":null},{"name":"prepare","value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"before_trading_start","value":"# 回测引擎:每个单位时间开始前调用一次,即每日开盘前调用一次。\ndef bigquant_run(context, data):\n pass\n","type":"Literal","bound_global_parameter":null},{"name":"volume_limit","value":"0.025","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":"open","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.HIX","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-181"},{"name":"options_data","node_id":"-181"},{"name":"history_ds","node_id":"-181"},{"name":"benchmark_ds","node_id":"-181"},{"name":"trading_calendar","node_id":"-181"}],"output_ports":[{"name":"raw_perf","node_id":"-181"}],"cacheable":false,"seq_num":10,"comment":"","comment_collapsed":true},{"node_id":"-2555","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):\n # 示例代码如下。在这里编写您的代码\n #from datetime import datetime\n ins=input_1.read_pickle()['instruments']\n start_date=input_1.read_pickle()['start_date']\n end_date=input_1.read_pickle()['end_date']\n df=DataSource('bar1d_CN_FUND').read(ins,start_date=start_date,end_date=end_date)\n data_1 = DataSource.write_df(df)\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":"-2555"},{"name":"input_2","node_id":"-2555"},{"name":"input_3","node_id":"-2555"}],"output_ports":[{"name":"data_1","node_id":"-2555"},{"name":"data_2","node_id":"-2555"},{"name":"data_3","node_id":"-2555"}],"cacheable":true,"seq_num":7,"comment":"读取场内基金行情","comment_collapsed":false},{"node_id":"-214","module_id":"BigQuantSpace.select_columns.select_columns-v3","parameters":[{"name":"columns","value":"date,instrument,open,high,low,close,adjust_factor,volume","type":"Literal","bound_global_parameter":null},{"name":"reverse_select","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-214"},{"name":"columns_ds","node_id":"-214"}],"output_ports":[{"name":"data","node_id":"-214"}],"cacheable":true,"seq_num":12,"comment":"","comment_collapsed":true},{"node_id":"-220","module_id":"BigQuantSpace.select_columns.select_columns-v3","parameters":[{"name":"columns","value":"date,instrument,open,high,low,close,adjust_factor,volume","type":"Literal","bound_global_parameter":null},{"name":"reverse_select","value":"False","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-220"},{"name":"columns_ds","node_id":"-220"}],"output_ports":[{"name":"data","node_id":"-220"}],"cacheable":true,"seq_num":13,"comment":"","comment_collapsed":true},{"node_id":"-229","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 df1 = DataSource.read_df(input_1)\n df2 = DataSource.read_df(input_2)\n #df3 = DataSource.read_df(input_3)\n df3 = pd.concat([df1, df2])\n #df4 = df3.reset_index()\n df5 = df3.sort_values(by = 'date')\n df5.index = range(len(df5))\n i = 0\n for name, group in df5.groupby(df5['date']):\n fund_numbers = len(group)\n weight = 1 / fund_numbers\n group['weight'] = weight\n group['date'] = name\n \n if i == 0:\n group_all = group.copy()\n first_date = name\n else:\n group_all = pd.concat([group_all, group])\n i += 1\n #group_all1 = group_all.sort_values(by = 'date')\n instrument_weight = group_all[group_all['date'] == first_date]\n instrument_weight = instrument_weight[['instrument', 'weight']]\n instrument_weight1 = instrument_weight.reset_index(drop = True)\n instrument_weight2 = instrument_weight1.set_index('instrument')\n ins = instrument_weight2.index.to_list()\n df6 = DataSource(\"basic_info_CN_FUND\").read()\n df7 = DataSource(\"basic_info_CN_MUTFUND\").read()\n name = []\n for value in ins:\n is_named = False\n for index1, row1 in df7.iterrows():\n if value == row1['instrument']:\n name.append(row1['sec_short_name'])\n is_named = True\n break\n if not is_named:\n for index2, row2 in df6.iterrows():\n if value == row2['instrument']:\n name.append(row2['name'])\n is_named = True\n break\n instrument_weight2.index = name \n data_1 = DataSource.write_df(group_all)\n data_2 = DataSource.write_df(instrument_weight2)\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":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-229"},{"name":"input_2","node_id":"-229"},{"name":"input_3","node_id":"-229"}],"output_ports":[{"name":"data_1","node_id":"-229"},{"name":"data_2","node_id":"-229"},{"name":"data_3","node_id":"-229"}],"cacheable":false,"seq_num":11,"comment":"纵向合并2个表","comment_collapsed":false},{"node_id":"-236","module_id":"BigQuantSpace.df_stastic1.df_stastic1-v1","parameters":[{"name":"type_num","value":1,"type":"Literal","bound_global_parameter":null},{"name":"columns","value":"[\"PassengerId\"]","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-236"}],"output_ports":[],"cacheable":true,"seq_num":14,"comment":"","comment_collapsed":true},{"node_id":"-224","module_id":"BigQuantSpace.plot_dataframe.plot_dataframe-v1","parameters":[{"name":"title","value":"无相关性基金权重图","type":"Literal","bound_global_parameter":null},{"name":"chart_type","value":"pie","type":"Literal","bound_global_parameter":null},{"name":"x","value":"","type":"Literal","bound_global_parameter":null},{"name":"y","value":"","type":"Literal","bound_global_parameter":null},{"name":"options","value":"{\n 'chart': {\n 'height': 400\n }\n}","type":"Literal","bound_global_parameter":null},{"name":"candlestick","value":"False","type":"Literal","bound_global_parameter":null},{"name":"pane_1","value":"","type":"Literal","bound_global_parameter":null},{"name":"pane_2","value":"","type":"Literal","bound_global_parameter":null},{"name":"pane_3","value":"","type":"Literal","bound_global_parameter":null},{"name":"pane_4","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_data","node_id":"-224"}],"output_ports":[],"cacheable":false,"seq_num":15,"comment":"绘制无相关性基金权重图","comment_collapsed":false}],"node_layout":"<node_postions><node_position Node='-1878' Position='-170,187,200,200'/><node_position Node='-1890' Position='124,166,200,200'/><node_position Node='-960' Position='107,382,200,200'/><node_position Node='-902' Position='83,471,200,200'/><node_position Node='-3631' Position='406,174,200,200'/><node_position Node='-4795' Position='696,170,200,200'/><node_position Node='-3663' Position='423,374,200,200'/><node_position Node='-3672' Position='409,475,200,200'/><node_position Node='-921' Position='80,541,200,200'/><node_position Node='-592' Position='70,643,200,200'/><node_position Node='-483' Position='-108,721,200,200'/><node_position Node='-489' Position='-114,799,200,200'/><node_position Node='-585' Position='-99,901,200,200'/><node_position Node='-500' Position='-82,973,200,200'/><node_position Node='-577' Position='-78,1054,200,200'/><node_position Node='-268' Position='394,278,200,200'/><node_position Node='-280' Position='90,265,200,200'/><node_position Node='-157' Position='411.08282470703125,747.4878540039062,200,200'/><node_position Node='-169' Position='727.2751770019531,841.2954711914062,200,200'/><node_position Node='-181' Position='223.27517700195312,1121.2954711914062,200,200'/><node_position Node='-2555' Position='417.08282470703125,845.4878540039062,200,200'/><node_position Node='-214' Position='407.2751770019531,940.2954711914062,200,200'/><node_position Node='-220' Position='720.2751770019531,940.2954711914062,200,200'/><node_position Node='-229' Position='523.2751770019531,1012.2954711914062,200,200'/><node_position Node='-236' Position='-79.35111618041992,1166.7039794921875,200,200'/><node_position Node='-224' Position='691.2751770019531,1119.2954711914062,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2022-11-03 17:53:02.177607] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-11-03 17:53:02.411158] INFO: moduleinvoker: instruments.v2 运行完成[0.233546s].
[2022-11-03 17:53:02.426776] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:53:02.573404] INFO: moduleinvoker: cached.v3 运行完成[0.146634s].
[2022-11-03 17:53:02.587889] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:53:04.439864] INFO: moduleinvoker: cached.v3 运行完成[1.851935s].
[2022-11-03 17:53:04.466641] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:53:11.588660] INFO: moduleinvoker: cached.v3 运行完成[7.122049s].
[2022-11-03 17:53:15.113290] INFO: moduleinvoker: select_columns.v3 开始运行..
[2022-11-03 17:53:15.511281] INFO: moduleinvoker: select_columns.v3 运行完成[0.398012s].
[2022-11-03 17:53:15.520175] INFO: moduleinvoker: instruments.v2 开始运行..
[2022-11-03 17:53:15.580974] INFO: moduleinvoker: instruments.v2 运行完成[0.060793s].
[2022-11-03 17:53:15.597208] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:53:16.807940] INFO: moduleinvoker: cached.v3 运行完成[1.210732s].
[2022-11-03 17:53:16.888001] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:53:43.727226] INFO: moduleinvoker: cached.v3 运行完成[26.839216s].
[2022-11-03 17:53:43.762742] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:54:05.896185] INFO: moduleinvoker: cached.v3 运行完成[22.133455s].
[2022-11-03 17:54:05.916358] INFO: moduleinvoker: select_columns.v3 开始运行..
[2022-11-03 17:54:23.071272] INFO: moduleinvoker: select_columns.v3 运行完成[17.154918s].
[2022-11-03 17:54:23.100179] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:54:39.623837] INFO: moduleinvoker: cached.v3 运行完成[16.523661s].
[2022-11-03 17:54:39.760756] INFO: moduleinvoker: set_inf_to_nan.v1 开始运行..
[2022-11-03 17:54:55.178917] INFO: moduleinvoker: set_inf_to_nan.v1 运行完成[15.418163s].
[2022-11-03 17:54:55.303528] INFO: moduleinvoker: pivot_fbfill_stack.v3 开始运行..
[2022-11-03 17:55:16.493011] INFO: moduleinvoker: pivot_fbfill_stack.v3 运行完成[21.189472s].
[2022-11-03 17:55:16.563235] INFO: moduleinvoker: pandas_pivot_table.v1 开始运行..
[2022-11-03 17:55:40.257673] INFO: moduleinvoker: pandas_pivot_table.v1 运行完成[23.694464s].
[2022-11-03 17:55:40.277989] INFO: moduleinvoker: dropnan.v2 开始运行..
[2022-11-03 17:55:42.356293] INFO: dropnan: /data, 842/842
[2022-11-03 17:55:42.425239] INFO: dropnan: 行数: 842/842
[2022-11-03 17:55:42.434841] INFO: moduleinvoker: dropnan.v2 运行完成[2.156839s].
[2022-11-03 17:55:42.451498] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:55:43.428202] INFO: moduleinvoker: cached.v3 运行完成[0.976684s].
[2022-11-03 17:55:43.488318] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:56:27.783820] INFO: moduleinvoker: cached.v3 运行完成[44.295507s].
[2022-11-03 17:56:27.869168] INFO: moduleinvoker: cached.v3 开始运行..
[2022-11-03 17:56:28.146332] INFO: moduleinvoker: cached.v3 运行完成[0.277197s].
[2022-11-03 17:56:28.201433] INFO: moduleinvoker: cached.v3 开始运行..
列: ['date', 'instrument', 'return_0', 'close']
/data: 83564
列: ['date', 'instrument', 'return_0', 'close']
/data: 4533009