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!
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
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda โ ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda โ ketahui lebih lanjut di sini.