|
本帖最后由 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') #该时间在原数据中是存在的
|
|