cn_stock_holidays icon indicating copy to clipboard operation
cn_stock_holidays copied to clipboard

SHSZExchangeCalendar Error

Open HungryFour opened this issue 6 years ago • 3 comments

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 会相应变大,猜测是中间的时间差计算问题。不知道作者使用过程中是否遇到过此问题。

谢作者,提供这么好的开源项目。

HungryFour avatar Mar 16 '18 10:03 HungryFour

嗯嗯,zipline对日历和数据的匹配还是要求比较严格的,最好能在ingest bandle 之前奖数据处理一下,你使用的是分钟数据么?

rainx avatar Mar 19 '18 01:03 rainx

数据已经处理,用的是分钟数据,还是提示上述问题。您使用分钟数据的时候,有遇到这个问题吗?

HungryFour avatar Mar 26 '18 03:03 HungryFour

def open_time(self): return time(9, 30) <-------------------- 此处应该是 return time(9, 31)

tallyz avatar Jan 12 '20 15:01 tallyz