+
    Qmj                         R t ^ RIt^ RIHt 0 RmtRR lt]R8X  d$   ]P                  ! ]! 4       '       d   ^ M^4       R# R# )aw  
Single source of truth for "is the TSX open today" -- weekend + full-closure
holiday check. Every cron job in this project (run_daily_scan.sh, fetch_prices.py,
check_positions.sh) calls this instead of keeping its own copy of the calendar,
so the list can't silently drift the way run_daily_scan.sh's filter thresholds
once did (see CLAUDE.md).

Deliberately does NOT skip on early-close days (e.g. Dec 24, 1pm EST close) or
settlement-only holidays where TSX stays open for trading (e.g. National Day
for Truth and Reconciliation, Sept 30 -- TMX explicitly keeps the market open
that day; only settlement is affected). Only full closures block a run.

Update HOLIDAYS each year from:
https://www.tsx.com/en/trading/calendars-and-trading-hours/calendar

CLI usage (for bash scripts): exit 0 = trading day, exit 1 = market closed.
Python usage: from is_trading_day import is_trading_day
N)datec                     T ;'       g    \         P                  ! 4       p V P                  4       ^8  d   R# V P                  4       \        9  # )   F)r   todayweekday	isoformatHOLIDAYS)ds   &0/media/raid/rshare/SwingTrader/is_trading_day.pyis_trading_dayr   &   s7    	TZZ\Ayy{a;;=((    __main__>
   
2026-01-01
2026-02-16
2026-04-03
2026-05-18
2026-07-01
2026-08-03
2026-09-07
2026-10-12
2026-12-25
2026-12-28)N)__doc__sysdatetimer   r   r   __name__exit r   r
   <module>r      sC   $  ) zHH.""Q* r   