OPEN-SOURCE SCRIPT
Diupdate

TradFi Fundamentals: Enhanced Macroeconomic Momentum Trading

261
Introduction
The "Enhanced Momentum with Advanced Normalization and Smoothing" indicator is a tool that combines traditional price momentum with a broad range of macroeconomic factors. I introduced the basic version from a research paper in my last script. This one leverages not only the price action of a security but also incorporates key economic data—such as GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and market volatility (VIX)—to create a comprehensive, normalized momentum score.

Previous indicator

Explanation
In plain terms, the indicator calculates a raw momentum value based on the change in price over a defined lookback period. It then normalizes this momentum, along with several economic indicators, using a method chosen by the user (options include simple, exponential, or weighted moving averages, as well as a median absolute deviation (MAD) approach). Each normalized component is assigned a weight reflecting its relative importance, and these weighted values are summed to produce an overall momentum score.

To reduce noise, the combined momentum score can be further smoothed using a user-selected method.

Signals
For generating trade signals, the indicator offers two modes:

Zero Cross Mode: Signals occur when the smoothed momentum line crosses the zero threshold.
Zone Mode: Overbought and oversold boundaries (which are user defined) provide signals when the momentum line crosses these preset limits.

Definition of the Settings

Price Momentum Settings:
Price Momentum Lookback: The number of days used to compute the percentage change in price (default 50 days).
Normalization Period (Price Momentum): The period over which the price momentum is normalized (default 200 days).

Economic Data Settings:
Normalization Period (Economic Data): The period used to normalize all economic indicators (default 200 days).
Normalization Method: Choose among SMA, EMA, WMA, or MAD to standardize both price and economic data. If MAD is chosen, a multiplier factor is applied (default is 1.4826).

Smoothing Options:
Apply Smoothing: A toggle to enable further smoothing of the combined momentum score.
Smoothing Period & Method: Define the period and type (SMA, EMA, or WMA) used to smooth the final momentum score.

Signal Generation Settings:
Signal Mode: Select whether signals are based on a zero-line crossover or by crossing user-defined overbought/oversold (OB/OS) zones.
OB/OS Zones: Define the upper and lower boundaries (default upper zones at 1.0 and 2.0, lower zones at -1.0 and -2.0) for zone-based signals.

Weights:
Each component (price momentum, GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and VIX) has an associated weight that determines its contribution to the overall score. These can be adjusted to reflect different market views or risk preferences.

Visual Aspects
The indicator plots the smoothed combined momentum score as a continuous blue line against a dotted zero-line reference. If the Zone signal mode is selected, the indicator also displays the upper and lower OB/OS boundaries as horizontal lines (red for overbought and green for oversold). Buy and sell signals are marked by small labels ("B" for buy and "S" for sell) that appear at the bottom or top of the chart when the score crosses the defined thresholds, allowing traders to quickly identify potential entry or exit points.

Conclusion
This enhanced indicator provides traders with a robust approach to momentum trading by integrating traditional price-based signals with a suite of macroeconomic indicators. Its normalization and smoothing techniques help reduce noise and mitigate the effects of outliers, while the flexible signal generation modes offer multiple ways to interpret market conditions. Overall, this tool is designed to deliver a more nuanced perspective on market momentum.
Catatan Rilis
Changed the security calls to avoid historical lookahead.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.