mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-12 12:12:04 +08:00
TST: Adds TradingSchedule test fixture
This commit is contained in:
@@ -38,7 +38,6 @@ from zipline.testing.fixtures import (
|
||||
WithSimParams,
|
||||
ZiplineTestCase,
|
||||
)
|
||||
from zipline.utils.calendars import default_nyse_schedule
|
||||
|
||||
|
||||
class SlippageTestCase(WithSimParams, WithDataPortal, ZiplineTestCase):
|
||||
@@ -92,9 +91,10 @@ class SlippageTestCase(WithSimParams, WithDataPortal, ZiplineTestCase):
|
||||
start=normalize_date(self.minutes[0]),
|
||||
end=normalize_date(self.minutes[-1])
|
||||
)
|
||||
with tmp_bcolz_minute_bar_reader(self.env, days, assets) as reader:
|
||||
with tmp_bcolz_minute_bar_reader(self.trading_schedule, days, assets) \
|
||||
as reader:
|
||||
data_portal = DataPortal(
|
||||
self.env, default_nyse_schedule,
|
||||
self.env, self.trading_schedule,
|
||||
first_trading_day=reader.first_trading_day,
|
||||
equity_minute_reader=reader,
|
||||
)
|
||||
@@ -481,14 +481,11 @@ class SlippageTestCase(WithSimParams, WithDataPortal, ZiplineTestCase):
|
||||
start=normalize_date(self.minutes[0]),
|
||||
end=normalize_date(self.minutes[-1])
|
||||
)
|
||||
with tmp_bcolz_minute_bar_reader(self.env, days, assets) as reader:
|
||||
with tmp_bcolz_minute_bar_reader(self.trading_schedule, days, assets) \
|
||||
as reader:
|
||||
data_portal = DataPortal(
|
||||
<<<<<<< HEAD
|
||||
self.env,
|
||||
self.env, self.trading_schedule,
|
||||
first_trading_day=reader.first_trading_day,
|
||||
=======
|
||||
self.env, default_nyse_schedule,
|
||||
>>>>>>> ENH: Adds ExchangeCalendar, TradingSchedule, and implementations
|
||||
equity_minute_reader=reader,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user