STRASMORE/EXPLORE 2,433 QUERIES

streaks

Answered against 22 years of US equities and 12 years of US options data and published with the query that produced it. This result is stored as of 2026-09-20, from bullish-vs-bearish-meaning.

as of table 10×6read in context →
streaks — 10 rows by 6 columns, computed from US exchange, SIP and OPRA data.
streakdirectiondaysstartedendedmove_pct
Up run, Feb 2010Up streak14Feb 26, 2010Mar 17, 20105.8
Up run, May 2024Up streak10May 2, 2024May 15, 20245.9
Up run, Apr 2025Up streak9Apr 22, 2025May 2, 202510.3
Up run, Mar 2004Up streak9Mar 24, 2004Apr 5, 20045.3
Up run, Nov 2006Up streak9Nov 10, 2006Nov 22, 20062
Down run, Dec 2007Down streak8Dec 27, 2007Jan 8, 2008-7.1
Down run, Dec 2018Down streak8Dec 13, 2018Dec 24, 2018-11.7
Down run, Feb 2020Down streak7Feb 20, 2020Feb 28, 2020-12.4
Down run, Jul 2011Down streak7Jul 25, 2011Aug 2, 2011-6.8
Down run, Jun 2006Down streak7Jun 5, 2006Jun 13, 2006-5
Rows × columns
10 × 6
Computed
Completeness
No missing values
Source
US exchange, SIP and OPRA market data
Licence
Strasmore terms · free, no signup
Formats
JSON · CSV · the SQL below

What each column holds

Column definitions for streaks, derived from the stored result.
ColumnTypeRangeNotes
streak text 10 distinct values
direction text 2 distinct values (Down streak, Up streak)
days number 7 to 14
started text 10 distinct values (Apr 22, 2025, Dec 13, 2018, Dec 27, 2007…)
ended text 10 distinct values (Apr 5, 2004, Aug 2, 2011, Dec 24, 2018…)
move_pct number -12.4 to 10.3 percent

Computed from Strasmore's warehouse of US exchange, SIP and OPRA market data. Equity prices are delayed; options greeks and implied volatility are end-of-day. This result is stored, not recomputed on load — it is exactly the numbers that were returned on , and the query below is what returned them.

Run it yourself

This is the exact query behind the result above. Change a ticker, a date or a column and run it against the warehouse — no account, no key. The no-signup tier is smaller than the one this page was computed on; a query that reaches past it comes back saying which plan runs it.

WITH bars AS
(
    SELECT
        date,
        toFloat64(any(close)) AS close_price
    FROM global_markets.stocks_daily_aggs
    WHERE ticker = 'SPY'
      AND close > 0
    GROUP BY date
),
moves AS
(
    SELECT
        date,
        close_price,
        lagInFrame(close_price, 1) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS prev_close
    FROM bars
),
signs AS
(
    SELECT
        date,
        close_price,
        prev_close,
        sign(close_price - prev_close) AS dir
    FROM moves
    WHERE prev_close > 0
),
flags AS
(
    SELECT
        date,
        close_price,
        prev_close,
        dir,
        if(dir != lagInFrame(dir, 1) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), 1, 0) AS run_break
    FROM signs
),
runs AS
(
    SELECT
        date,
        close_price,
        prev_close,
        dir,
        sum(run_break) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS run_id
    FROM flags
),
run_stats AS
(
    SELECT
        run_id,
        any(dir)                                                                      AS run_dir,
        count()                                                                       AS days,
        min(date)                                                                     AS run_start,
        max(date)                                                                     AS run_end,
        round(100 * (argMax(close_price, date) / argMin(prev_close, date) - 1), 1)    AS move_pct
    FROM runs
    WHERE dir != 0
    GROUP BY run_id
)
SELECT
    concat(if(run_dir = 1, 'Up run, ', 'Down run, '), formatDateTime(run_start, '%b %Y'))                          AS streak,
    if(run_dir = 1, 'Up streak', 'Down streak')                                                                     AS direction,
    days,
    concat(formatDateTime(run_start, '%b '), toString(toDayOfMonth(run_start)), ', ', toString(toYear(run_start))) AS started,
    concat(formatDateTime(run_end, '%b '), toString(toDayOfMonth(run_end)), ', ', toString(toYear(run_end)))       AS ended,
    move_pct
FROM run_stats
ORDER BY direction DESC, days DESC, streak ASC
LIMIT 5 BY direction
⌘/Ctrl + Enter