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

2,707 answered market questions

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

What Happens After a Big One-Day Gain
How the next session split: gapped up, gapped up and faded, closed highertable · 2026-09-27 · 5×5 Overnight gap versus intraday run: what the next session didtable · 2026-09-27 · 3×5 Next-session returns after a big one-day gain, by size of the gaintable · 2026-09-27 · 5×5 The full spread of next-session returns for top-20 daily gainersranking · 2026-09-27 · 5×3Preview: 5 ranked values, smallest first. Sample coverage and next-session medians, year by yeartable · 2026-09-27 · 4×5
How the next session split: gapped up, gapped up and faded, closed higher

How the next session split: gapped up, gapped up and faded, closed higher

most recentas of table 5×5read in context →
How the next session split: gapped up, gapped up and faded, closed higher — 5 rows by 5 columns, computed from US exchange, SIP and OPRA data.
gain_bucketobservationsgapped_up_pctgapped_up_then_faded_pctclosed_higher_pct
under 10%63949.324.647.1
10 to 15%26474827.344.6
15 to 25%568945.62643
25 to 50%418841.924.241.1
50% and up181730.318.532.9
the exact SQL behind every number
WITH bars AS
(
    SELECT
        ticker,
        date,
        max(toFloat64(open))   AS o,
        max(toFloat64(close))  AS c,
        max(toFloat64(volume)) AS vol
    FROM global_markets.stocks_daily_aggs
    WHERE date >= today() - 1095
      AND date <= today() - 2
      AND ifNull(otc, 0) = 0
      AND ticker NOT IN ('SPCX')
    GROUP BY ticker, date
),
seq AS
(
    SELECT
        ticker,
        date,
        c,
        vol,
        lagInFrame(c)     OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS prev_c,
        leadInFrame(o)    OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS next_o,
        leadInFrame(c)    OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS next_c,
        leadInFrame(date) OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS next_date
    FROM bars
),
movers AS
(
    SELECT
        date,
        ticker,
        100 * (c / prev_c - 1)      AS gain_pct,
        100 * (next_o / c - 1)      AS next_gap_pct,
        100 * (next_c / next_o - 1) AS next_oc_pct,
        100 * (next_c / c - 1)      AS next_cc_pct,
        row_number() OVER (PARTITION BY date ORDER BY c / prev_c DESC, ticker ASC) AS rnk
    FROM seq
    WHERE prev_c >= 5
      AND next_o > 0
      AND next_c > 0
      AND c * vol >= 5000000
      AND dateDiff('day', date, next_date) <= 6
)
SELECT
    multiIf(gain_pct < 10, 'under 10%',
            gain_pct < 15, '10 to 15%',
            gain_pct < 25, '15 to 25%',
            gain_pct < 50, '25 to 50%',
                           '50% and up')                                       AS gain_bucket,
    count()                                                                    AS observations,
    round(100 * countIf(next_gap_pct > 0) / count(), 1)                         AS gapped_up_pct,
    round(100 * countIf(next_gap_pct > 0 AND next_oc_pct < 0) / count(), 1)     AS gapped_up_then_faded_pct,
    round(100 * countIf(next_cc_pct > 0) / count(), 1)                          AS closed_higher_pct
FROM movers
WHERE rnk <= 20
GROUP BY gain_bucket
ORDER BY min(gain_pct) ASC
$