cn_stock_holidays
cn_stock_holidays copied to clipboard
SHSZExchangeCalendar Error
zipline (1.1.1+258.gbd24e0de) zipline-cn-databundle (0.5)
IndexError: index 246479 is out of bounds for axis 0 with size # 186582
您好,使用cn_stock_holidays过程中,zipline ingest bundle的时候,报错。 经查,发现是SHSZExchangeCalendar的问题。 @property def open_time(self): return time(9, 30) @property def close_time(self): return time(15, 00)
将9:30 缩小。 将15:00放大后,186582 会相应变大,猜测是中间的时间差计算问题。不知道作者使用过程中是否遇到过此问题。
谢作者,提供这么好的开源项目。
嗯嗯,zipline对日历和数据的匹配还是要求比较严格的,最好能在ingest bandle 之前奖数据处理一下,你使用的是分钟数据么?
数据已经处理,用的是分钟数据,还是提示上述问题。您使用分钟数据的时候,有遇到这个问题吗?
def open_time(self): return time(9, 30) <-------------------- 此处应该是 return time(9, 31)