AI量化实验室

 找回密码
 立即注册
查看: 140|回复: 0

deap报错求解答

[复制链接]

1

主题

1

帖子

29

积分

量化新人

积分
29
发表于 2024-8-26 21:24:32 | 显示全部楼层 |阅读模式
本帖最后由 Young 于 2024-8-26 21:24 编辑

运行quantlab5.7因子挖掘报错应该是backtester报错,无法计算收益率。但是我运行的是作者发布的源码呀,按道理来说不应该报错……求指点
10it [00:09,  1.08it/s]  
0%|                                                                                           | 0/10 [00:00<?, ?it/s]                 #此次显示无法计算收益率


---------------------------------------------------------------------------KeyError                                 

Traceback (most recent call last)~\AppData\Roaming\Python\Python39\site-packages\pandas\_libs\index.pyx in pandas._libs.index.DatetimeEngine.get_loc()pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.Int64HashTable.get_item()
KeyError: 1262563200000000000

~\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\datetimes.py in get_loc(self, key, method, tolerance)    736            

return Index.get_loc(self, key, method, tolerance)    737         except KeyError as err:--> 738raise KeyError(orig_key) from err    739     740     
def _maybe_cast_for_get_loc(self, key) -> Timestamp:
KeyError: Timestamp('2010-01-04 00:00:00')               #该时间在原数据中是存在的










您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

AI量化实验室 ( 京ICP备16049031号-2 )

GMT+8, 2024-9-20 05:13 , Processed in 0.077659 second(s), 18 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表