mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
BUG: Fixes reading and writing of daily bars first_trading_day attr
When writing first_trading_day, it is already in the correct frame of reference (seconds since epoch) and does not need to be transformed further. Adjusts the reader to expect this value.
This commit is contained in:
@@ -186,6 +186,12 @@ class BcolzDailyBarTestCase(WithBcolzDailyBarReader, ZiplineTestCase):
|
||||
DatetimeIndex(result.attrs['calendar'], tz='UTC'),
|
||||
)
|
||||
|
||||
def test_read_first_trading_day(self):
|
||||
self.assertEqual(
|
||||
self.bcolz_daily_bar_reader.first_trading_day,
|
||||
self.trading_days[0],
|
||||
)
|
||||
|
||||
def _check_read_results(self, columns, assets, start_date, end_date):
|
||||
results = self.bcolz_daily_bar_reader.load_raw_arrays(
|
||||
columns,
|
||||
|
||||
Reference in New Issue
Block a user