drawdown_episodes
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-25, from msft-decline-from-peak.
| peak_on | trough_on | depth_pct | sessions_below_peak | days_to_recover |
|---|---|---|---|---|
| 2021/11/19 | 2022/11/03 | 37.6 | 392 | 573 |
| 2025/10/28 | 2026/06/25 | 34.9 | 228 | 0 |
| 2020/02/10 | 2020/03/16 | 28.2 | 82 | 120 |
| 2024/07/05 | 2025/04/08 | 24.2 | 229 | 335 |
| 2018/10/01 | 2018/12/24 | 18.6 | 112 | 165 |
| 2015/04/28 | 2015/08/25 | 17.7 | 124 | 178 |
| 2015/01/08 | 2015/04/02 | 15.3 | 72 | 106 |
| 2015/12/29 | 2016/06/27 | 14.4 | 141 | 206 |
| 2020/09/02 | 2020/09/18 | 13.5 | 98 | 146 |
| 2023/07/18 | 2023/09/26 | 13.2 | 78 | 112 |
| 2018/01/31 | 2018/02/08 | 10.5 | 16 | 26 |
- Rows × columns
- 11 × 5
- Computed
- Completeness
- No missing values
- Source
- US exchange, SIP and OPRA market data
- Licence
- Strasmore terms · free, no signup
What each column holds
| Column | Type | Range | Notes |
|---|---|---|---|
peak_on |
text | 11 distinct values (2015/01/08, 2015/04/28, 2015/12/29…) | |
trough_on |
text | 11 distinct values (2015/04/02, 2015/08/25, 2016/06/27…) | |
depth_pct |
number | 10.5 to 37.6 | percent |
sessions_below_peak |
number | 16 to 392 | |
days_to_recover |
number | 0 to 573 |
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,
toFloat64(max(close)) AS close
FROM global_markets.stocks_daily_aggs
WHERE ticker = 'MSFT'
AND date >= '2015-01-01'
GROUP BY date
),
marked AS
(
SELECT
date,
close,
max(close) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS peak_close,
argMax(date, close) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS peak_date
FROM daily
),
next_session AS
(
SELECT
date,
any(date) OVER (ORDER BY date ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) AS next_date
FROM daily
),
episodes AS
(
SELECT
peak_date,
any(peak_close) AS peak_level,
min(close) AS trough_level,
argMin(date, close) AS trough_date,
max(date) AS last_below_date,
count() AS sessions_below
FROM marked
WHERE close < peak_close
GROUP BY peak_date
HAVING min(close) / any(peak_close) <= 0.90
)
SELECT
formatDateTime(e.peak_date, '%Y/%m/%d') AS peak_on,
formatDateTime(e.trough_date, '%Y/%m/%d') AS trough_on,
round((1 - e.trough_level / e.peak_level) * 100, 1) AS depth_pct,
toUInt32(e.sessions_below) AS sessions_below_peak,
if(n.next_date > e.peak_date,
toUInt32(dateDiff('day', e.peak_date, n.next_date)),
toUInt32(0)) AS days_to_recover
FROM episodes AS e
LEFT JOIN next_session AS n ON n.date = e.last_below_date
ORDER BY depth_pct DESC
在你的 AI 助理中使用這些資料
開啟即可查詢,已帶入本頁資料。免費,無需帳號。