OPEN-SOURCE SCRIPT
Updated

BTC & SPX vs Yield Curve: Recession Risk Zones

154
BTC & SPX vs Yield Curve โ€“ Recession Risk Zones

This tool helps you track Bitcoin (BTC) and the S&P 500 (SPX) against key macro signals from the U.S. yield curve to spot potential recession risks.

๐ŸŸช Color Legend:
๐Ÿ”ด Red = Yield curve is inverted (warning starts)

๐ŸŸก Yellow = Projected 6โ€“18 month recession risk (if inversion still active)

๐ŸŸ  Orange = Active 6โ€“18 month risk window (after inversion ends)

๐Ÿ’œ Fuchsia = Real historical U.S. recessions

๐Ÿ“ˆ Whatโ€™s Plotted:
๐Ÿ”ต BTCUSD (blue line) โ€“ Normalized price

๐ŸŸข S&P 500 (green line) โ€“ Normalized price

๐ŸŸ  10Yโ€“2Y Yield Spread โ€“ Macro signal for risk

โœ… Use it to:
Spot macro pressure zones

See how BTC and SPX behave around economic stress

Stay cautious when red/orange/yellow areas appear

Let me know if you'd like to enable toggles to hide/show BTC or SPX independently!
Release Notes
๐Ÿ“˜ BTC & SPX vs Yield Curve โ€“ Recession Risk Zones
This macro tool helps you identify when Bitcoin (BTC) and the S&P 500 (SPX) may be at risk based on the U.S. 2Yโ€“10Y yield curve and historical recession timing.

๐Ÿง  How It Works:
Strong Inversion Triggered (๐Ÿ”ด Red):
When the yield spread drops below -0.15%, a strong inversion begins โ€” a proven early warning signal for economic trouble.

True Un-Inversion Detected:
The script waits until the spread crosses back above 0% after a strong inversion.
This confirms a "true un-inversion" โ€” historically a key signal before recessions.

Recession Risk Period (๐ŸŸ  Orange):
After a true un-inversion, the script tracks a 6โ€“18 month warning window, where recession risk is elevated.

Projected Risk (๐ŸŸก Yellow):
If the strong inversion is still active, this area forecasts where the risk zone could occur in the future.

Historical Recessions (๐Ÿ’œ Fuchsia):
Recession periods from the 1980s onward are shaded to validate how well this logic matches history.

๐Ÿ“ˆ Whatโ€™s Plotted:
๐Ÿ”ต BTCUSD (blue line) โ€“ Normalized price

๐ŸŸข SPX (green line) โ€“ Normalized price

๐ŸŸ  Yield spread (orange line) โ€“ 10Y minus 2Y yield

โœ… Use It To:
Time macro conditions affecting BTC & SPX

Avoid entering high-risk periods blindly

See how major assets react around real economic events

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 TradingView. Read more in the Terms of Use.