mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-09 11:19:23 +08:00
ENH: Adds ExchangeCalendar, TradingSchedule, and implementations
Conflicts: tests/data/test_minute_bars.py tests/data/test_us_equity_pricing.py tests/finance/test_slippage.py tests/pipeline/test_engine.py tests/pipeline/test_us_equity_pricing_loader.py tests/serialization_cases.py tests/test_algorithm.py tests/test_assets.py tests/test_bar_data.py tests/test_benchmark.py tests/test_exception_handling.py tests/test_fetcher.py tests/test_finance.py tests/test_history.py tests/test_perf_tracking.py tests/test_security_list.py tests/utils/test_events.py zipline/algorithm.py zipline/data/data_portal.py zipline/data/us_equity_loader.py zipline/errors.py zipline/finance/trading.py zipline/testing/core.py zipline/utils/events.py
This commit is contained in:
@@ -85,6 +85,7 @@ from zipline.testing.fixtures import (
|
||||
ZiplineTestCase,
|
||||
)
|
||||
from zipline.utils.memoize import lazyval
|
||||
from zipline.utils.calendars import default_nyse_schedule
|
||||
|
||||
|
||||
class RollingSumDifference(CustomFactor):
|
||||
@@ -826,7 +827,7 @@ class FrameInputTestCase(WithTradingEnvironment, ZiplineTestCase):
|
||||
cls.dates = date_range(
|
||||
cls.start,
|
||||
cls.end,
|
||||
freq=cls.env.trading_day,
|
||||
freq=default_nyse_schedule.day,
|
||||
tz='UTC',
|
||||
)
|
||||
cls.assets = cls.asset_finder.retrieve_all(cls.asset_ids)
|
||||
@@ -985,7 +986,7 @@ class SyntheticBcolzTestCase(WithAdjustmentReader,
|
||||
def test_SMA(self):
|
||||
engine = SimplePipelineEngine(
|
||||
lambda column: self.pipeline_loader,
|
||||
self.env.trading_days,
|
||||
default_nyse_schedule.all_execution_days,
|
||||
self.asset_finder,
|
||||
)
|
||||
window_length = 5
|
||||
@@ -1039,7 +1040,7 @@ class SyntheticBcolzTestCase(WithAdjustmentReader,
|
||||
# valuable.
|
||||
engine = SimplePipelineEngine(
|
||||
lambda column: self.pipeline_loader,
|
||||
self.env.trading_days,
|
||||
default_nyse_schedule.all_execution_days,
|
||||
self.asset_finder,
|
||||
)
|
||||
window_length = 5
|
||||
@@ -1083,7 +1084,7 @@ class ParameterizedFactorTestCase(WithTradingEnvironment, ZiplineTestCase):
|
||||
@classmethod
|
||||
def init_class_fixtures(cls):
|
||||
super(ParameterizedFactorTestCase, cls).init_class_fixtures()
|
||||
day = cls.env.trading_day
|
||||
day = default_nyse_schedule.day
|
||||
|
||||
cls.dates = dates = date_range(
|
||||
'2015-02-01',
|
||||
|
||||
Reference in New Issue
Block a user