|
本帖最后由 rick 于 2024-9-12 13:43 编辑
请问这是为啥呢:5.9的最新版本,运行 quantlab5.9\策略集\全球大类资产-单因子回测.ipynb 的时候显示时间戳的key不存在。
完整日志:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File index.pyx:609, in pandas._libs.index.DatetimeEngine.get_loc()
File pandas\\_libs\\hashtable_class_helper.pxi:2606, in pandas._libs.hashtable.Int64HashTable.get_item()
File pandas\\_libs\\hashtable_class_helper.pxi:2630, in pandas._libs.hashtable.Int64HashTable.get_item()
KeyError: 1262563200000000000
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
File g:\Codes_in_Using\conda_envs\quantlab\lib\site-packages\pandas\core\indexes\base.py:3805, in Index.get_loc(self, key)
3804 try:
-> 3805 return self._engine.get_loc(casted_key)
3806 except KeyError as err:
File index.pyx:577, in pandas._libs.index.DatetimeEngine.get_loc()
File index.pyx:611, in pandas._libs.index.DatetimeEngine.get_loc()
KeyError: Timestamp('2010-01-04 00:00:00')
The above exception was the direct cause of the following exception:
...
630 return Index.get_loc(self, key)
631 except KeyError as err:
--> 632 raise KeyError(orig_key) from err
KeyError: Timestamp('2010-01-04 00:00:00')
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?免费注册
×
|