{"slug":"rule-605-and-606-execution-reports","qid":"effective_vs_quoted","label":"Effective spread against quoted spread by trade size, AAPL","post_title":"Rule 605 vs 606: Execution Quality Reports","post_url":"/blog/rule-605-and-606-execution-reports#q-effective_vs_quoted","columns":["size_bucket","avg_quoted_spread_bps","avg_effective_spread_bps","eq_over_q_pct"],"rows":[{"size_bucket":"1 to 99 (odd lot)","avg_quoted_spread_bps":1.19,"avg_effective_spread_bps":1.1,"eq_over_q_pct":92.5},{"size_bucket":"100 to 499","avg_quoted_spread_bps":1.1,"avg_effective_spread_bps":0.6,"eq_over_q_pct":54.6},{"size_bucket":"500 to 1,999","avg_quoted_spread_bps":1.18,"avg_effective_spread_bps":1.02,"eq_over_q_pct":86.4},{"size_bucket":"2,000 and up","avg_quoted_spread_bps":1.2,"avg_effective_spread_bps":1.41,"eq_over_q_pct":117.6}],"shape":"ranking","sql":"SELECT\n    size_bucket,\n    round(avg(quoted_bps), 2)                            AS avg_quoted_spread_bps,\n    round(avg(effective_bps), 2)                         AS avg_effective_spread_bps,\n    round(100 * avg(effective_bps) / avg(quoted_bps), 1) AS eq_over_q_pct\nFROM\n(\n    SELECT\n        multiIf(t.size < 100,  '1 to 99 (odd lot)',\n                t.size < 500,  '100 to 499',\n                t.size < 2000, '500 to 1,999',\n                               '2,000 and up')                                AS size_bucket,\n        multiIf(t.size < 100, 1, t.size < 500, 2, t.size < 2000, 3, 4)         AS bucket_order,\n        10000 * (q.ask - q.bid) / ((q.ask + q.bid) / 2)                        AS quoted_bps,\n        10000 * 2 * abs(t.price - ((q.ask + q.bid) / 2)) / ((q.ask + q.bid) / 2) AS effective_bps\n    FROM\n    (\n        SELECT ticker, sip_timestamp, toFloat64(price) AS price, size\n        FROM global_markets.stocks_trades\n        WHERE ticker = 'AAPL'\n          AND sip_timestamp >= '2026-06-17 14:00:00'\n          AND sip_timestamp <  '2026-06-17 15:00:00'\n          AND size > 0\n          AND price > 0\n    ) AS t\n    ASOF JOIN\n    (\n        SELECT ticker, sip_timestamp, toFloat64(bid_price) AS bid, toFloat64(ask_price) AS ask\n        FROM global_markets.cache_stocks_quotes\n        WHERE ticker = 'AAPL'\n          AND sip_timestamp >= '2026-06-17 13:45:00'\n          AND sip_timestamp <  '2026-06-17 15:00:00'\n          AND bid_price > 0\n          AND ask_price > bid_price\n    ) AS q\n    ON t.ticker = q.ticker AND t.sip_timestamp >= q.sip_timestamp\n)\nWHERE effective_bps < 200 AND quoted_bps < 200\nGROUP BY size_bucket, bucket_order\nORDER BY bucket_order","computed_at":"2026-08-07T16:54:05.800994+00:00","elapsed":0.004585878}