mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-05 23:10:27 +08:00
make calendar test compare generated calendar with the benchmark calendar
renaming cal_days to bench_days
This commit is contained in:
@@ -35,11 +35,11 @@ class TestTradingCalendar(TestCase):
|
||||
"""
|
||||
|
||||
env = TradingEnvironment()
|
||||
env_start_index = \
|
||||
env.trading_days.searchsorted(tradingcalendar.start)
|
||||
env_days = env.trading_days[env_start_index:]
|
||||
cal_days = tradingcalendar.trading_days
|
||||
self.check_days(env_days, cal_days)
|
||||
bench_days = env.benchmark_returns[tradingcalendar.start:].index
|
||||
bounds = env.trading_days.slice_locs(start=tradingcalendar.start,
|
||||
end=bench_days[-1])
|
||||
env_days = env.trading_days[bounds[0]:bounds[1]]
|
||||
self.check_days(env_days, bench_days)
|
||||
|
||||
@nottest
|
||||
def test_lse_calendar_vs_environment(self):
|
||||
|
||||
Reference in New Issue
Block a user