mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-19 11:22:06 +08:00
Clean up daily bar reader/writer to take advantage of new trading calendar. The reader
is backwards-compatible with the previous format. In USEquityLoader, use dailyreader's trading_calendar. This is backwards compatible and will fall back to the NYSE calendar if the reader doesn’t have a calendar specified.
This commit is contained in:
@@ -3424,9 +3424,10 @@ class TestEquityAutoClose(WithTmpDir, WithTradingCalendar, ZiplineTestCase):
|
||||
frequency=frequency
|
||||
)
|
||||
path = self.tmpdir.getpath("testdaily.bcolz")
|
||||
BcolzDailyBarWriter(path, dates, self.trading_calendar).write(
|
||||
iteritems(trade_data_by_sid),
|
||||
writer = BcolzDailyBarWriter(
|
||||
path, self.trading_calendar, dates[0], dates[-1]
|
||||
)
|
||||
writer.write(iteritems(trade_data_by_sid))
|
||||
reader = BcolzDailyBarReader(path)
|
||||
data_portal = DataPortal(
|
||||
env.asset_finder, self.trading_calendar,
|
||||
|
||||
Reference in New Issue
Block a user