{"slug":"market-recap-2026-07-06","qid":"baseline_spread_rank","label":"SPY's update-weighted average quoted spread: July 6 ranked against the trailing month (rank 1 = tightest)","post_title":"Market Recap: July 6, 2026, The Day in Numbers","post_url":"/blog/market-recap-2026-07-06#q-baseline_spread_rank","columns":["jul6_avg_spread_cents","tightness_rank","sessions_compared","widest_session_cents","other_sessions_avg_cents","first_session","dropped_invalid_quotes"],"rows":[{"jul6_avg_spread_cents":1.815,"tightness_rank":1,"sessions_compared":21,"widest_session_cents":2.865,"other_sessions_avg_cents":2.337,"first_session":"June 4, 2026","dropped_invalid_quotes":41468}],"shape":"scalar","sql":"SELECT\n    round(anyIf(avg_spread_cents, d = toDate('2026-07-06')), 3) AS jul6_avg_spread_cents,\n    arrayCount(x -> x < anyIf(avg_spread_cents, d = toDate('2026-07-06')), groupArrayIf(avg_spread_cents, d != toDate('2026-07-06'))) + 1 AS tightness_rank,\n    count() AS sessions_compared,\n    round(max(avg_spread_cents), 3) AS widest_session_cents,\n    round(avgIf(avg_spread_cents, d != toDate('2026-07-06')), 3) AS other_sessions_avg_cents,\n    replaceAll(formatDateTime(min(d), '%M %e, %Y'), '  ', ' ') AS first_session,\n    sum(dropped_invalid) AS dropped_invalid_quotes\nFROM (\n    SELECT toDate(toTimeZone(sip_timestamp, 'America/New_York')) AS d,\n           avgIf(toFloat64(ask_price - bid_price), bid_price > 0 AND ask_price >= bid_price) * 100 AS avg_spread_cents,\n           countIf(NOT (bid_price > 0 AND ask_price >= bid_price)) AS dropped_invalid\n    FROM global_markets.cache_stocks_quotes\n    WHERE ticker = 'SPY'\n      AND sip_timestamp >= toDateTime('2026-06-04 00:00:00')\n      AND sip_timestamp < toDateTime('2026-07-07 00:00:00')\n      AND (toHour(sip_timestamp) * 60 + toMinute(sip_timestamp)) BETWEEN 810 AND 1199\n    GROUP BY d\n)","computed_at":"2026-07-26T05:50:20.801208+00:00","elapsed":26.876558194}