STRASMORE/EXPLORE 3,214 QUERIES

drawdown_lines

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-10-08, from us-stock-margin-for-taiwan-investors.

as of table 6×5read in context →
drawdown_lines — 6 rows by 5 columns, computed from US exchange, SIP and OPRA data.
threshold_labelepisode_countbelow_countsample_fromsample_to
-10%10827552003-09-102026-10-08
-20%4114802003-09-102026-10-08
-25%4710082003-09-102026-10-08
-33%253432003-09-102026-10-08
-40%41522003-09-102026-10-08
-50%5422003-09-102026-10-08
Rows × columns
6 × 5
Period covered
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 drawdown_lines, derived from the stored result.
ColumnTypeRangeNotes
threshold_label text 6 distinct values (-10%, -20%, -25%…)
episode_count number 4 to 108 count
below_count number 42 to 2,755 count
sample_from date 2003-09-10
sample_to date 2026-10-08

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
    daily AS
    (
        SELECT
            date                  AS d,
            toFloat64(max(close)) AS px
        FROM global_markets.stocks_daily_aggs
        WHERE ticker = 'MSFT'
          AND date >= '2003-03-01'
        GROUP BY d
    ),
    pathed AS
    (
        SELECT
            d,
            round((px / max(px) OVER (ORDER BY d ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) - 1) * 100, 2) AS dd_pct
        FROM daily
    ),
    stepped AS
    (
        SELECT
            d,
            dd_pct,
            lagInFrame(dd_pct) OVER (ORDER BY d ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_dd_pct
        FROM pathed
    ),
    grid AS
    (
        SELECT arrayJoin([10., 20., 25., 33., 40., 50.]) AS threshold
    )
SELECT
    concat('-', toString(toUInt8(g.threshold)), '%')                       AS threshold_label,
    countIf(s.dd_pct <= -g.threshold AND s.prev_dd_pct > -g.threshold)     AS episode_count,
    countIf(s.dd_pct <= -g.threshold)                                      AS below_count,
    toString(min(s.d))                                                     AS sample_from,
    toString(max(s.d))                                                     AS sample_to
FROM stepped AS s
CROSS JOIN grid AS g
GROUP BY g.threshold
ORDER BY g.threshold
⌘/Ctrl + Enter

在你的 AI 助理中使用這些資料

開啟即可查詢,已帶入本頁資料。免費,無需帳號。