STRASMORE/EXPLORE 2,170 QUERIES 22Y EQUITIES · 12Y OPTIONS

2,170 answered market questions

every one with its exact SQL, its result and the date it was computed · free, no signup

Trade Markouts Explained: Execution Quality
Effective spread split into realized spread and adverse selection, by half hourseries · 2026-08-15 · 13×5Preview: a 13-point series, ending lower. INTC markout curve, June 10 2026, measured from two reference basesranking · 2026-08-15 · 5×4Preview: 5 ranked values, largest first. The same curve, split by print size: small fills against blocksranking · 2026-08-15 · 5×4Preview: 5 ranked values, largest first.
Iceberg Orders Explained: Hidden Liquidity
Most repeated price and size pairings, AAPL, June 17, 2026table · 2026-08-06 · 12×5 Every AAPL print on June 17, 2026, grouped by trade sizeranking · 2026-08-06 · 6×4Preview: 6 ranked values, largest first. Average shares per print, monthly, MSFT and KOseries · 2026-08-06 · 90×4Preview: a 16-point series, ending lower. The busiest price and size pairing, half hour by half hourscalar · 2026-08-06 · 1×367
Effective spread split into realized spread and adverse selection, by half hour

Effective spread split into realized spread and adverse selection, by half hour

most recentas of series 13×5read in context →
Effective spread split into realized spread and adverse selection, by half hour — 13 rows by 5 columns, computed from US exchange, SIP and OPRA data.
et_timeeffective_spread_bpsrealized_spread_bpsadverse_selection_bpsfill_count
09:3010.6512.3388.313156976
10:008.0531.8926.16193545
10:307.573-9.09116.66595266
11:007.0791.6665.41487234
11:307.704-4.86412.56869850
12:005.6243.9181.70748500
12:305.1510.0385.11245567
13:004.6670.9323.73539236
13:305.598-0.0345.63243249
14:004.59-1.1345.72338018
14:304.5041.2563.24948662
15:005.29-1.6156.90564389
15:306.184-1.087.26569101
the exact SQL behind every number
WITH
    mid_by_second AS
    (
        SELECT
            dateDiff('second', toDateTime('2026-06-10 13:30:00', 'UTC'), sip_timestamp) AS sec,
            argMax((toFloat64(bid_price) + toFloat64(ask_price)) / 2, sip_timestamp)    AS mid
        FROM global_markets.cache_stocks_quotes
        WHERE ticker = 'INTC'
          AND sip_timestamp >= toDateTime('2026-06-10 13:30:00', 'UTC')
          AND sip_timestamp <  toDateTime('2026-06-10 20:00:00', 'UTC')
          AND bid_price > 0
          AND ask_price > bid_price
        GROUP BY sec
    ),
    signed_fills AS
    (
        SELECT
            t.sec + 60   AS future_sec,
            t.et_time    AS et_time,
            t.fill_price AS fill_price,
            q.mid        AS ref_mid,
            if(t.fill_price > q.mid, 1, -1) AS side
        FROM
        (
            SELECT
                dateDiff('second', toDateTime('2026-06-10 13:30:00', 'UTC'), sip_timestamp) AS sec,
                sec - 1          AS ref_sec,
                toFloat64(price) AS fill_price,
                formatDateTime(toStartOfInterval(toTimeZone(sip_timestamp, 'America/New_York'), toIntervalMinute(30)), '%H:%i') AS et_time
            FROM global_markets.stocks_trades
            WHERE ticker = 'INTC'
              AND sip_timestamp >= toDateTime('2026-06-10 13:30:01', 'UTC')
              AND sip_timestamp <  toDateTime('2026-06-10 19:55:00', 'UTC')
              AND price > 0
              AND size > 0
        ) AS t
        INNER JOIN mid_by_second AS q ON q.sec = t.ref_sec
        WHERE t.fill_price != q.mid
    )
SELECT
    f.et_time                                                                  AS et_time,
    round(avg(2 * f.side * (f.fill_price - f.ref_mid) / f.ref_mid) * 10000, 3) AS effective_spread_bps,
    round(avg(2 * f.side * (f.fill_price - fut.mid) / f.ref_mid) * 10000, 3)   AS realized_spread_bps,
    round(avg(2 * f.side * (fut.mid - f.ref_mid) / f.ref_mid) * 10000, 3)      AS adverse_selection_bps,
    count()                                                                    AS fill_count
FROM signed_fills AS f
INNER JOIN mid_by_second AS fut ON fut.sec = f.future_sec
GROUP BY f.et_time
ORDER BY f.et_time
$