Skip to content

Update TASE calendar for Mon-Fri trading week - #485

Merged
rsheftel merged 2 commits into
rsheftel:devfrom
haeganm:fix/tase-monday-friday-trading-week
Oct 5, 2026
Merged

rsheftel merged 2 commits into
rsheftel:devfrom
haeganm:fix/tase-monday-friday-trading-week

Conversation

@haeganm

@haeganm haeganm commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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 TASEClosedDay list 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:

  • The weekmask becomes "Mon Tue Wed Thu Fri", with the crossover handled in an overridden valid_days that stitches a pre-2026 CustomBusinessDay (old weekmask) to the regular path, following the exact pattern NYSEExchangeCalendar.valid_days uses for the 1952 Saturday crossover. Pre-2026 output is unchanged: the 2019-2025 schedule hashes identically before and after this change.
  • TASEClosedDay gains 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.
  • Friday sessions get a 13:34 Asia/Jerusalem early close via special_closes with 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:

  • New tests in tests/test_tase_calendar.py (the existing test_xtae_calendar.py covers 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.
  • Cross-checked against the upstream exchange_calendars XTAE 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.
  • 2019-2025 schedule output is byte-identical to master (hash-compared), so no historical behavior changes.
  • ruff format --check and ruff check pass 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_htf anchoring for pre-2026 ranges still uses the current weekmask (NYSE handles the equivalent with a larger date_range_htf override; happy to follow up if wanted).

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.
@haeganm

haeganm commented Sep 17, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants