{"slug":"who-matches-overnight-us-stock-trades","qid":"spread_clock","label":"spread_clock","post_title":"who-matches-overnight-us-stock-trades","post_url":"/blog/who-matches-overnight-us-stock-trades#q-spread_clock","columns":["et_hour","median_spread_bps","quote_count"],"rows":[{"et_hour":"04:00","median_spread_bps":7,"quote_count":1524},{"et_hour":"05:00","median_spread_bps":5.7,"quote_count":434},{"et_hour":"06:00","median_spread_bps":7.3,"quote_count":655},{"et_hour":"07:00","median_spread_bps":4.8,"quote_count":1243},{"et_hour":"08:00","median_spread_bps":4.8,"quote_count":1385},{"et_hour":"09:00","median_spread_bps":1.5,"quote_count":100884},{"et_hour":"10:00","median_spread_bps":1.2,"quote_count":134690},{"et_hour":"11:00","median_spread_bps":0.9,"quote_count":104454},{"et_hour":"12:00","median_spread_bps":0.9,"quote_count":81737},{"et_hour":"13:00","median_spread_bps":0.6,"quote_count":65676},{"et_hour":"14:00","median_spread_bps":0.6,"quote_count":71337},{"et_hour":"15:00","median_spread_bps":0.6,"quote_count":113066},{"et_hour":"16:00","median_spread_bps":3.9,"quote_count":735},{"et_hour":"17:00","median_spread_bps":3,"quote_count":194},{"et_hour":"18:00","median_spread_bps":3.6,"quote_count":709},{"et_hour":"19:00","median_spread_bps":3,"quote_count":388}],"shape":"ranking","sql":"SELECT\n    formatDateTime(toTimeZone(sip_timestamp, 'America/New_York'), '%H:00') AS et_hour,\n    round(quantileDeterministic(0.5)(\n        20000 * toFloat64(ask_price - bid_price) / toFloat64(ask_price + bid_price),\n        toUInt64(sequence_number)), 1)                                     AS median_spread_bps,\n    count()                                                                AS quote_count\nFROM global_markets.cache_stocks_quotes\nWHERE ticker = 'AAPL'\n  AND sip_timestamp >= toDateTime('2026-09-15 00:00:00', 'America/New_York')\n  AND sip_timestamp <  toDateTime('2026-09-16 00:00:00', 'America/New_York')\n  AND bid_price > 0\n  AND ask_price > bid_price\nGROUP BY et_hour\nHAVING count() >= 25\nORDER BY et_hour","computed_at":"2026-10-03T16:02:33.717004+00:00","elapsed":0.002484507}