{"slug":"is-the-stock-market-open-today","qid":"bond_gap","label":"Weekdays in the trailing year when stocks traded but no Treasury yield printed","post_title":"Is the Stock Market Open Today?","post_url":"/blog/is-the-stock-market-open-today#q-bond_gap","columns":["session_date","weekday"],"rows":[{"session_date":"2025-10-13","weekday":"Monday"},{"session_date":"2025-11-11","weekday":"Tuesday"}],"shape":"table","sql":"WITH stock_days AS (\n    SELECT toDate(toTimeZone(window_start, 'America/New_York')) AS d\n    FROM global_markets.delayed_stocks_minute_aggs\n    WHERE ticker = 'SPY'\n      AND window_start >= today() - 370\n      AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60 + toMinute(toTimeZone(window_start, 'America/New_York'))) BETWEEN 570 AND 959\n    GROUP BY d\n    HAVING count() >= 100\n)\nSELECT toString(d) AS session_date,\n       formatDateTime(d, '%W') AS weekday\nFROM stock_days\nWHERE d <= (SELECT max(date) FROM global_markets.treasury_yields)\n  AND d NOT IN (SELECT date FROM global_markets.treasury_yields WHERE date >= today() - 370)\nORDER BY d","computed_at":"2026-08-25T13:00:04.816878+00:00","elapsed":0.203508557}