OPEN-SOURCE SCRIPT
Crisis indicator

What This Indicator Does
This indicator acts as an early warning system for potential market crises by tracking 5 of the most reliable financial danger signals that have predicted major market declines throughout history.
The 5 Crisis Signals Monitored
1. Yield Curve Inversion
- What it measures: When short-term interest rates become higher than long-term rates
- Why it matters: This has predicted every US recession since 1955
- Trigger: Yield curve drops below your set threshold (default: 0.0)
2. Shiller CAPE Ratio
- What it measures: Stock market valuation adjusted for economic cycles
- Why it matters: Only exceeded 30 during major bubbles (1929, 2000, 2021) - all followed by crashes
- Trigger: CAPE ratio rises above your threshold (default: 30.0)
3. Buffett Indicator
- What it measures: Total stock market value compared to GDP
- Why it matters: Warren Buffett's favorite market valuation gauge
- Trigger: Ratio exceeds your threshold (default: 180%)
4. VIX Complacency
- What it measures: Market fear gauge (Volatility Index)
- Why it matters: Extremely low VIX indicates investor complacency before storms
- Trigger: VIX falls below your threshold (default: 15.0)
5. SPX Extreme Deviation
- What it measures: How far S&P 500 is above its 200-week moving average
- Why it matters: Major tops in 1929, 2000, 2021 all showed extreme deviations
- Trigger: Deviation exceeds your threshold (default: 2.8 standard deviations)
How to Read the Results
The Yellow Line (0-5 Scale)
- Shows how many of the 5 danger signals are currently active
- 0-1: Normal market conditions
- 2: High Risk - Caution advised
- 3+: Crisis Cluster - High probability of market decline
The Information Table
- Shows exactly which signals are triggering
- Displays current values for each indicator
- Color-coded status (Green = Safe, Red = Danger)
Historical Performance
When 3+ indicators flash simultaneously:
- 1999-2000: Preceded Dot-com crash (-49% SPX)
- 2007: Preceded Financial Crisis (-57% SPX)
- 2021: Preceded 2022 bear market (-25% SPX)
This indicator acts as an early warning system for potential market crises by tracking 5 of the most reliable financial danger signals that have predicted major market declines throughout history.
The 5 Crisis Signals Monitored
1. Yield Curve Inversion
- What it measures: When short-term interest rates become higher than long-term rates
- Why it matters: This has predicted every US recession since 1955
- Trigger: Yield curve drops below your set threshold (default: 0.0)
2. Shiller CAPE Ratio
- What it measures: Stock market valuation adjusted for economic cycles
- Why it matters: Only exceeded 30 during major bubbles (1929, 2000, 2021) - all followed by crashes
- Trigger: CAPE ratio rises above your threshold (default: 30.0)
3. Buffett Indicator
- What it measures: Total stock market value compared to GDP
- Why it matters: Warren Buffett's favorite market valuation gauge
- Trigger: Ratio exceeds your threshold (default: 180%)
4. VIX Complacency
- What it measures: Market fear gauge (Volatility Index)
- Why it matters: Extremely low VIX indicates investor complacency before storms
- Trigger: VIX falls below your threshold (default: 15.0)
5. SPX Extreme Deviation
- What it measures: How far S&P 500 is above its 200-week moving average
- Why it matters: Major tops in 1929, 2000, 2021 all showed extreme deviations
- Trigger: Deviation exceeds your threshold (default: 2.8 standard deviations)
How to Read the Results
The Yellow Line (0-5 Scale)
- Shows how many of the 5 danger signals are currently active
- 0-1: Normal market conditions
- 2: High Risk - Caution advised
- 3+: Crisis Cluster - High probability of market decline
The Information Table
- Shows exactly which signals are triggering
- Displays current values for each indicator
- Color-coded status (Green = Safe, Red = Danger)
Historical Performance
When 3+ indicators flash simultaneously:
- 1999-2000: Preceded Dot-com crash (-49% SPX)
- 2007: Preceded Financial Crisis (-57% SPX)
- 2021: Preceded 2022 bear market (-25% SPX)
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.