问答交流

LSTM模拟运行出错

由chenfeng8638创建,最终由small_q 被浏览 66 用户

ValueError Traceback (most recent call last) <ipython-input-1-652f482ac31d> in <module> 251 ) 252 --> 253 m36 = M.filter_delist_stock.v6( 254 input_1=m25.data 255 )

/var/app/enabled/biglearning/module2/common/modulemanagerv2.cpython-38-x86_64-linux-gnu.so in biglearning.module2.common.modulemanagerv2.BigQuantModuleVersion.call()

/var/app/enabled/biglearning/module2/common/moduleinvoker.cpython-38-x86_64-linux-gnu.so in biglearning.module2.common.moduleinvoker.module_invoke()

/var/app/enabled/biglearning/module2/common/moduleinvoker.cpython-38-x86_64-linux-gnu.so in biglearning.module2.common.moduleinvoker._invoke_with_cache()

/var/app/enabled/biglearning/module2/common/moduleinvoker.cpython-38-x86_64-linux-gnu.so in biglearning.module2.common.moduleinvoker._invoke_with_cache()

/var/app/enabled/biglearning/module2/common/moduleinvoker.cpython-38-x86_64-linux-gnu.so in biglearning.module2.common.moduleinvoker._module_run()

/var/app/data/custom_module/custom_modules/filter_delist_stock/v6/init.py in bigquant_run(input_1) 42 end = df.date.max() 43 #获取代码的股票名称 ---> 44 df_name=D.history_data(instruments=ins, start_date=start, end_date=end, 45 fields=['name']) 46 df_merge=pd.merge(df,df_name,on=['instrument','date'])

/var/app/enabled/bigdatasource/api/datareader.py in history_data(self, instruments, start_date, end_date, fields, market) 230 table = 'financial_statement_ff_CN_STOCK_A' 231 _fields = [x + '_0' for x in _fields] --> 232 sub_df = DataSource(table).read(start_date=start_date, end_date=end_date, 233 fields=_fields, instruments=instruments) 234 if sub_df is None:

/var/app/enabled/bigdatasource/api/v5/bigdatasource.py in read(self, instruments, start_date, end_date, fields, query, product_codes, **kwargs) 114 if not end_date: 115 end_date = (datetime.datetime.now() + datetime.timedelta(days=10)).strftime(DAY_FORMAT) --> 116 start_date = self.convert_str(start_date) 117 end_date = self.convert_str(end_date) 118 instruments = self.convert_list(instruments)

/var/app/enabled/bigdatasource/api/v5/bigdatasource.py in convert_str(item) 328 return item 329 if isinstance(item, (datetime.datetime, pd.Timestamp)): --> 330 item = item.strftime(DAY_FORMAT) 331 return item 332

/var/app/data/python_lib/pandas/_libs/tslibs/nattype.pyx in pandas._libs.tslibs.nattype._make_error_func.f()

==ValueError: NaTType does not support strftime==

标签

LSTM
评论
  • 发你的策略出来看看
{link}