{"slug":"can-a-death-cross-be-bullish","qid":"death_crosses","label":"death_crosses","post_title":"can-a-death-cross-be-bullish","post_url":"/blog/can-a-death-cross-be-bullish#q-death_crosses","columns":["event","off_1y_high_pct","fwd_1m_pct","fwd_3m_pct","fwd_6m_pct","fwd_12m_pct"],"rows":[{"event":"Aug 18, 2004","off_1y_high_pct":5.5,"fwd_1m_pct":2.8,"fwd_3m_pct":7.1,"fwd_6m_pct":10.2,"fwd_12m_pct":11.1},{"event":"Jul 19, 2006","off_1y_high_pct":5.2,"fwd_1m_pct":3.5,"fwd_3m_pct":8.5,"fwd_6m_pct":13.6,"fwd_12m_pct":22.1},{"event":"Dec 21, 2007","off_1y_high_pct":5.3,"fwd_1m_pct":-8.9,"fwd_3m_pct":-10.1,"fwd_6m_pct":-11.4,"fwd_12m_pct":-41.2},{"event":"Jul 6, 2010","off_1y_high_pct":15.6,"fwd_1m_pct":9.8,"fwd_3m_pct":10.6,"fwd_6m_pct":23.5,"fwd_12m_pct":30.1},{"event":"Aug 12, 2011","off_1y_high_pct":13.4,"fwd_1m_pct":-0.3,"fwd_3m_pct":5.2,"fwd_6m_pct":14.6,"fwd_12m_pct":19.2},{"event":"Aug 28, 2015","off_1y_high_pct":6.7,"fwd_1m_pct":-5.6,"fwd_3m_pct":5.2,"fwd_6m_pct":-0.6,"fwd_12m_pct":9.6},{"event":"Jan 11, 2016","off_1y_high_pct":10,"fwd_1m_pct":-3.6,"fwd_3m_pct":7.2,"fwd_6m_pct":11.9,"fwd_12m_pct":17.9},{"event":"Dec 7, 2018","off_1y_high_pct":10.2,"fwd_1m_pct":-2.1,"fwd_3m_pct":6,"fwd_6m_pct":9.6,"fwd_12m_pct":19.1},{"event":"Mar 30, 2020","off_1y_high_pct":22.7,"fwd_1m_pct":12.1,"fwd_3m_pct":16.4,"fwd_6m_pct":27.7,"fwd_12m_pct":50.9},{"event":"Mar 14, 2022","off_1y_high_pct":12.7,"fwd_1m_pct":5.1,"fwd_3m_pct":-10.1,"fwd_6m_pct":-5.7,"fwd_12m_pct":-6.6},{"event":"Apr 14, 2025","off_1y_high_pct":12,"fwd_1m_pct":9,"fwd_3m_pct":15.8,"fwd_6m_pct":22.8,"fwd_12m_pct":30.1}],"shape":"table","sql":"WITH\nbars AS\n(\n    SELECT\n        date,\n        toFloat64(argMax(close, _ingest_time)) AS px\n    FROM global_markets.stocks_daily_aggs\n    WHERE ticker = 'SPY'\n    GROUP BY date\n),\nsmas AS\n(\n    SELECT\n        date,\n        px,\n        row_number() OVER (ORDER BY date) AS rn,\n        avg(px) OVER (ORDER BY date ROWS BETWEEN 49 PRECEDING AND CURRENT ROW) AS avg_50,\n        avg(px) OVER (ORDER BY date ROWS BETWEEN 199 PRECEDING AND CURRENT ROW) AS avg_200,\n        max(px) OVER (ORDER BY date ROWS BETWEEN 251 PRECEDING AND CURRENT ROW) AS high_1y,\n        leadInFrame(px, 21) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS px_1m,\n        leadInFrame(px, 63) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS px_3m,\n        leadInFrame(px, 126) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS px_6m,\n        leadInFrame(px, 252) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS px_12m\n    FROM bars\n),\nstates AS\n(\n    SELECT\n        *,\n        (avg_50 < avg_200) AS below,\n        lagInFrame((avg_50 < avg_200), 1) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS prev_below\n    FROM smas\n),\nflags AS\n(\n    SELECT\n        *,\n        (rn >= 201 AND below = 1 AND prev_below = 0) AS is_death,\n        (rn >= 201 AND below = 0 AND prev_below = 1) AS is_golden\n    FROM states\n)\nSELECT\n    concat(formatDateTime(date, '%b'), ' ', toString(toDayOfMonth(date)), ', ', toString(toYear(date))) AS event,\n    round((1 - px / high_1y) * 100, 1)                        AS off_1y_high_pct,\n    if(px_1m > 0,  round((px_1m / px - 1) * 100, 1), NULL)    AS fwd_1m_pct,\n    if(px_3m > 0,  round((px_3m / px - 1) * 100, 1), NULL)    AS fwd_3m_pct,\n    if(px_6m > 0,  round((px_6m / px - 1) * 100, 1), NULL)    AS fwd_6m_pct,\n    if(px_12m > 0, round((px_12m / px - 1) * 100, 1), NULL)   AS fwd_12m_pct\nFROM flags\nWHERE is_death\nORDER BY date","computed_at":"2026-09-13T15:00:28.879945+00:00","elapsed":0.006875569}