{"slug":"lehman-collapse-market-crash-2008","qid":"peak_to_trough","label":"The full bear market: SPY peak close to trough close, and the road back","post_title":"Lehman's Collapse: The 2008 Tape, Replayed","post_url":"/blog/lehman-collapse-market-crash-2008#q-peak_to_trough","columns":["peak_date","peak_close","trough_date","trough_close","peak_to_trough_pct","sessions_peak_to_trough","lehman_monday_close","peak_to_lehman_pct","trough_vs_lehman_pct","lehman_eve_reclaim_date","sessions_until_reclaim"],"rows":[{"peak_date":"2007-10-09","peak_close":156.41,"trough_date":"2009-03-09","trough_close":68.07,"peak_to_trough_pct":-56.5,"sessions_peak_to_trough":355,"lehman_monday_close":120.34,"peak_to_lehman_pct":-23.1,"trough_vs_lehman_pct":-43.4,"lehman_eve_reclaim_date":"2010-12-22","sessions_until_reclaim":572}],"shape":"scalar","sql":"WITH daily AS (\n    SELECT\n        toDate(toTimeZone(window_start, 'America/New_York')) AS et_date,\n        argMaxIf(toFloat64(close), window_start, (toHour(toTimeZone(window_start, 'America/New_York')) * 60 + toMinute(toTimeZone(window_start, 'America/New_York'))) BETWEEN 570 AND 959) AS close_usd\n    FROM global_markets.delayed_stocks_minute_aggs\n    WHERE ticker = 'SPY'\n      AND window_start >= toDateTime('2007-01-01 00:00:00') AND window_start < toDateTime('2014-01-01 00:00:00')\n    GROUP BY et_date\n),\n(SELECT argMax(et_date, (close_usd, et_date)) FROM daily WHERE et_date < toDate('2008-09-15')) AS peak_d,\n(SELECT argMin(et_date, (close_usd, et_date)) FROM daily WHERE et_date < toDate('2010-01-01')) AS trough_d,\n(SELECT max(close_usd) FROM daily WHERE et_date = toDate('2008-09-12')) AS lehman_eve_close,\n(SELECT min(et_date) FROM daily WHERE et_date > toDate('2008-09-15') AND close_usd >= lehman_eve_close) AS reclaim_d\nSELECT\n    toString(peak_d) AS peak_date,\n    round(maxIf(close_usd, et_date = peak_d), 2) AS peak_close,\n    toString(trough_d) AS trough_date,\n    round(maxIf(close_usd, et_date = trough_d), 2) AS trough_close,\n    round((maxIf(close_usd, et_date = trough_d) / maxIf(close_usd, et_date = peak_d) - 1) * 100, 1) AS peak_to_trough_pct,\n    countIf(et_date > peak_d AND et_date <= trough_d) AS sessions_peak_to_trough,\n    round(maxIf(close_usd, et_date = toDate('2008-09-15')), 2) AS lehman_monday_close,\n    round((maxIf(close_usd, et_date = toDate('2008-09-15')) / maxIf(close_usd, et_date = peak_d) - 1) * 100, 1) AS peak_to_lehman_pct,\n    round((maxIf(close_usd, et_date = trough_d) / maxIf(close_usd, et_date = toDate('2008-09-15')) - 1) * 100, 1) AS trough_vs_lehman_pct,\n    toString(reclaim_d) AS lehman_eve_reclaim_date,\n    countIf(et_date > toDate('2008-09-15') AND et_date < reclaim_d) AS sessions_until_reclaim\nFROM daily","computed_at":"2026-07-26T05:38:21.164671+00:00","elapsed":6.43945861}