STRASMORE/EXPLORE 2,707 QUERIES

down_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-27, from how-much-to-risk-per-trade.

as of ranking 5×3read in context →
down_streaks — 5 rows by 3 columns, computed from US exchange, SIP and OPRA data.
tickerlongest_losing_runruns_of_4_or_more
KO869
MSFT854
SPY855
AAPL861
NVDA854
Rows × columns
5 × 3
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 down_streaks, derived from the stored result.
ColumnTypeRangeNotes
ticker text 5 distinct values (AAPL, KO, MSFT…)
longest_losing_run number every row is 8
runs_of_4_or_more number 54 to 69

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.

SELECT
    ticker,
    max(run_len)          AS longest_losing_run,
    countIf(run_len >= 4) AS runs_of_4_or_more
FROM
(
    SELECT
        ticker,
        grp,
        count() AS run_len
    FROM
    (
        SELECT
            ticker,
            down,
            sum(if(down = 0, 1, 0)) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS grp
        FROM
        (
            SELECT
                ticker,
                date,
                if(toFloat64(close) < toFloat64(prev_close), 1, 0) AS down
            FROM
            (
                SELECT
                    ticker,
                    date,
                    close,
                    lagInFrame(close) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_close
                FROM global_markets.stocks_daily_aggs
                WHERE ticker IN ('AAPL', 'MSFT', 'NVDA', 'SPY', 'KO')
                  AND date >= '2016-09-01'
                  AND date <  '2026-09-01'
            )
            WHERE toFloat64(prev_close) > 0
        )
    )
    WHERE down = 1
    GROUP BY ticker, grp
)
GROUP BY ticker
ORDER BY longest_losing_run DESC
⌘/Ctrl + Enter

Use dis data for your AI assistant

E go open ready to query, with dis page data. Free, no account.