OPEN-SOURCE SCRIPT
Crash Filter (Watchlist + High Risk)

Use with SPX 1W
Crash Regime Filter is a low noise macro risk overlay designed to identify recession style equity drawdown environments rather than normal corrections.
The model combines five conditions that historically align with major market stress:
Oil shock
WTI crude rises sharply over a 3 month window, optionally requiring a 52 week high. Energy spikes often act as economic shock events that pressure margins, consumers, and inflation expectations.
Yield curve inversion
The 10 year minus 3 month Treasury spread remains inverted for multiple weeks. Persistent inversion reflects tightening financial conditions and rising recession probability.
Trend break
SPX trades below its 40 week moving average.
Trend rollover
The 40 week moving average slope turns negative, confirming that price weakness is structural rather than temporary.
Macro composite deterioration
The composite ((SPX divided by unemployment squared) multiplied by inflation and fed funds) divided by M2 confirms that macro conditions and liquidity are worsening.
Two states are displayed:
Watchlist
Oil shock plus curve inversion confirmed and macro composite deteriorating, but equity trend has not fully rolled over. This is an early warning regime.
High Risk
All conditions confirmed, including trend breakdown and negative MA slope. This reflects elevated recession and crash probability.
This indicator is intended as a regime filter for:
• Position sizing
• Hedging decisions
• Risk reduction
• Avoiding aggressive dip buying during macro deterioration
It is not a short term trading signal and is best used on weekly charts.
Crash Regime Filter is a low noise macro risk overlay designed to identify recession style equity drawdown environments rather than normal corrections.
The model combines five conditions that historically align with major market stress:
Oil shock
WTI crude rises sharply over a 3 month window, optionally requiring a 52 week high. Energy spikes often act as economic shock events that pressure margins, consumers, and inflation expectations.
Yield curve inversion
The 10 year minus 3 month Treasury spread remains inverted for multiple weeks. Persistent inversion reflects tightening financial conditions and rising recession probability.
Trend break
SPX trades below its 40 week moving average.
Trend rollover
The 40 week moving average slope turns negative, confirming that price weakness is structural rather than temporary.
Macro composite deterioration
The composite ((SPX divided by unemployment squared) multiplied by inflation and fed funds) divided by M2 confirms that macro conditions and liquidity are worsening.
Two states are displayed:
Watchlist
Oil shock plus curve inversion confirmed and macro composite deteriorating, but equity trend has not fully rolled over. This is an early warning regime.
High Risk
All conditions confirmed, including trend breakdown and negative MA slope. This reflects elevated recession and crash probability.
This indicator is intended as a regime filter for:
• Position sizing
• Hedging decisions
• Risk reduction
• Avoiding aggressive dip buying during macro deterioration
It is not a short term trading signal and is best used on weekly charts.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
