Repository navigation
Update TASE calendar for Mon-Fri trading week - #485
Merged
rsheftel merged 2 commits intoOct 5, 2026
Merged
Conversation
TASE moved from a Sunday-Thursday to a Monday-Friday trading week effective 2026-01-05; the last Sunday session was 2026-01-04. The calendar still used the Sun-Thu weekmask and its closed-day list ended at 2025-10-14, so every Sunday since January was reported as a trading day, every Friday as closed, and every 2026 holiday as open. Change the weekmask to Mon-Fri and handle the crossover in valid_days following the NYSE pre/post-1952 pattern, add the 2026 and 2027 closures, and add the Friday 13:34 early close via special_closes. Pre-2026 output is unchanged. Session sets for 2026-2027 match the upstream exchange_calendars XTAE calendar exactly.
Numbered plan for issue #484 under .github/plans, matching the convention used for the CME 2026 early closes change.
Contributor
Author
|
gentle ping on this when you get a chance. TASE moved to the Mon-Fri week on 2026-01-05, so the current calendar is off for all of 2026. happy to adjust anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #484
Updates the TASE calendar for the exchange's move from a Sunday-Thursday to a Monday-Friday trading week, effective 2026-01-05 (last Sunday session 2026-01-04, first Friday session 2026-01-09), and adds the missing 2026 and 2027 holiday closures. The previous
TASEClosedDaylist ended at 2025-10-14, so every 2026 holiday was being reported as a trading day, and the old weekmask reported every Sunday since January as open and every Friday as closed.Three changes in
calendars/tase.py:"Mon Tue Wed Thu Fri", with the crossover handled in an overriddenvalid_daysthat stitches a pre-2026CustomBusinessDay(old weekmask) to the regular path, following the exact patternNYSEExchangeCalendar.valid_daysuses for the 1952 Saturday crossover. Pre-2026 output is unchanged: the 2019-2025 schedule hashes identically before and after this change.TASEClosedDaygains the 2026 and 2027 closures. The 2026 dates match the exchange's published schedule, including the new-trading-week rule that a Friday before a Sunday holiday or holiday eve is closed (e.g. Friday 2026-09-18 ahead of Yom Kippur eve on Sunday 2026-09-20). The 2027 dates follow the same rules; election days or other one-off closures would still need to be added when announced.special_closeswith the weekday form, per the exchange's published Friday hours (9:59-13:34). This uses the continuous-session end, consistent with the calendar's documented convention of excluding the closing auction. Pre-2026 Fridays are unaffected since they are not valid days.Validation:
tests/test_tase_calendar.py(the existingtest_xtae_calendar.pycovers the mirrored calendar, not this one): transition week, both regimes, 2026 Passover and High Holidays, 2027 High Holidays, and the Friday close. Full suite passes: 1495 tests.exchange_calendarsXTAE calendar, which models the transition independently (holiday dates computed from the Hebrew calendar via pyluach): the session sets for 2026-2027 are identical, 492 sessions each, zero differences.ruff format --checkandruff checkpass on the changed files.The change log has an entry under Unreleased. Noted but deliberately not touched, since they predate this change: the regular Mon-Thu close is still 15:59 (TASE's continuous session currently ends 17:14; the docstring already flags the times as only checked against 2020-2021), the old-regime Sunday early close was never modeled, and
date_range_htfanchoring for pre-2026 ranges still uses the current weekmask (NYSE handles the equivalent with a largerdate_range_htfoverride; happy to follow up if wanted).