OPEN-SOURCE SCRIPT

MTT Cyclical vs Defensive Z-Score

335
The MTT Cyclical vs Defensive Z-Score is a sophisticated sentiment and rotation indicator designed to measure the relative strength of "risk-on" sectors against "risk-off" havens. It calculates a ratio between two distinct baskets: Cyclicals (Consumer Discretionary, Industrials, Materials) and Defensives/Commodities (Consumer Staples, Health Care, Utilities, and the DBC Commodity Index).

By applying a Z-score calculation to this ratio, the indicator identifies how many standard deviations the current market leadership is away from its mean. This transforms a simple ratio into a powerful tool for identifying market extremes and potential pivot points.

How the Indicator Works
The script follows a logical three-step process to quantify market sentiment:

Basket Comparison: It pits growth-sensitive sectors (which thrive during economic expansion) against defensive sectors and commodities (which act as anchors or inflation hedges).

Mean Reversion: It uses a Simple Moving Average (SMA) and Standard Deviation over a 20-period lookback to determine the "normal" range for this relationship.

Standardization: The resulting Z-score oscillates around a zero line. Green columns represent periods where cyclicals are outperforming their recent average, while red columns indicate defensive leadership.

How to Use It for Trading
The Z-score serves as a barometer for overextended market moves:

Identifying Extreme Optimism: When the Z-score crosses above +2.0, cyclicals are significantly overextended. This suggests the "risk-on" move may be exhausted, signaling a potential pullback or a rotation back into defensive stocks.

Identifying Extreme Fear: When the Z-score drops below -2.0, defensives and commodities are heavily favored. This often coincides with market bottoms or "washouts," suggesting that a bounce in cyclical sectors (and the broader market) may be imminent.

Trend Confirmation: Crossing the 0.0 (Mean) line acts as a momentum shifter. Moving from negative to positive suggests a fresh bullish rotation is gaining traction.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.