OPEN-SOURCE SCRIPT
Business Cycle Composite [v6]

The Business Cycle Composite is a macro oscillator that aggregates ten independently scored economic signals into a single weighted composite, designed to identify where the U.S. economy currently stands within the four classical cycle phases: Expansion, Late Cycle, Contraction, and Trough.
Each signal is normalized to a −1 to +1 scale before being weighted and combined. The yield curve (10Y−2Y spread) carries the highest weight at 18%, reflecting its historically reliable recession-forecasting track record. Credit market health is captured through the HYG/LQD ratio (15%), while Fed Funds trend, CPI momentum, consumer sentiment, risk appetite (XLY/XLP), and housing permits each contribute between 8–10%. The Copper/Gold ratio and the Sahm Rule unemployment trigger round out the composite at lower weights, serving as real-economy confirmation signals. The final score is smoothed with a configurable EMA and requires a minimum number of consecutive bars before a phase transition is confirmed, reducing noise-driven whipsaws.
The resulting oscillator crosses four threshold zones. A score above +0.35 signals Expansion — broad macro conditions are supportive of risk assets. Between zero and +0.35 the indicator reads Late Cycle, characterized by tightening conditions and fading momentum. Below zero but above −0.30 marks Contraction, where recessionary pressure is building. Below −0.30 the indicator enters the Trough phase, historically the zone where forward-looking assets begin to bottom ahead of the real economy.
The indicator plots both the smoothed composite and the underlying raw score, with color-coded phase backgrounds for instant visual context. A dashboard table in the top-right corner shows the current phase label, composite score, Sahm Rule status, and individual signal readings with a simple bar-style strength display. Five built-in alert conditions notify on every phase transition, including a dedicated Sahm Rule trigger alert.
All data is pulled automatically from FRED and standard U.S. equity ETFs. The indicator is best used on the weekly chart. All weights and thresholds are fully adjustable via the settings panel. For educational purposes only — not financial advice.
Each signal is normalized to a −1 to +1 scale before being weighted and combined. The yield curve (10Y−2Y spread) carries the highest weight at 18%, reflecting its historically reliable recession-forecasting track record. Credit market health is captured through the HYG/LQD ratio (15%), while Fed Funds trend, CPI momentum, consumer sentiment, risk appetite (XLY/XLP), and housing permits each contribute between 8–10%. The Copper/Gold ratio and the Sahm Rule unemployment trigger round out the composite at lower weights, serving as real-economy confirmation signals. The final score is smoothed with a configurable EMA and requires a minimum number of consecutive bars before a phase transition is confirmed, reducing noise-driven whipsaws.
The resulting oscillator crosses four threshold zones. A score above +0.35 signals Expansion — broad macro conditions are supportive of risk assets. Between zero and +0.35 the indicator reads Late Cycle, characterized by tightening conditions and fading momentum. Below zero but above −0.30 marks Contraction, where recessionary pressure is building. Below −0.30 the indicator enters the Trough phase, historically the zone where forward-looking assets begin to bottom ahead of the real economy.
The indicator plots both the smoothed composite and the underlying raw score, with color-coded phase backgrounds for instant visual context. A dashboard table in the top-right corner shows the current phase label, composite score, Sahm Rule status, and individual signal readings with a simple bar-style strength display. Five built-in alert conditions notify on every phase transition, including a dedicated Sahm Rule trigger alert.
All data is pulled automatically from FRED and standard U.S. equity ETFs. The indicator is best used on the weekly chart. All weights and thresholds are fully adjustable via the settings panel. For educational purposes only — not financial advice.
Open-source script
In true TradingView 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 TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView 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 TradingView. Read more in the Terms of Use.