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

2,272 answered market questions

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

What Is Backtesting in Trading?
Distance from one close to the next open, liquid names, 2025 (basis points)ranking · 2026-09-16 · 5×3Preview: 5 ranked values, largest first.
Distance from one close to the next open, liquid names, 2025 (basis points)

Distance from one close to the next open, liquid names, 2025 (basis points)

most recentas of ranking 5×3read in context →
Distance from one close to the next open, liquid names, 2025 (basis points) — 5 rows by 3 columns, computed from US exchange, SIP and OPRA data.
tickeravg_abs_gap_bpsmedian_abs_gap_bps
AAPL73.336.4
MSFT66.339.8
TLT47.137.5
SPY46.728.5
KO38.123.5
the exact SQL behind every number
WITH
    px AS
    (
        SELECT
            ticker,
            date,
            toFloat64(open)  AS open_px,
            toFloat64(close) AS close_px
        FROM global_markets.stocks_daily_aggs
        WHERE ticker IN ('SPY', 'AAPL', 'MSFT', 'KO', 'TLT')
          AND date >= '2025-01-01'
          AND date <= '2025-12-31'
    ),
    gaps AS
    (
        SELECT
            ticker,
            date,
            close_px,
            leadInFrame(open_px) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING) AS next_open
        FROM px
    )
SELECT
    ticker,
    round(avg(abs(next_open / close_px - 1)) * 10000, 1)     AS avg_abs_gap_bps,
    round(median(abs(next_open / close_px - 1)) * 10000, 1)  AS median_abs_gap_bps
FROM gaps
WHERE next_open > 0
GROUP BY ticker
ORDER BY avg_abs_gap_bps DESC, ticker ASC
$