OPEN-SOURCE SCRIPT

[BT] NedDavis Series: CPI Minus 5-Year Moving Average

🟧GENERAL
The script works on the Monthly Timeframe and has 2 main settings (explained in FEATURES). It uses the US CPI data, reported by the Bureau of Labour Statistics.

🔹Functionality 1: The main idea is to plot the distance between the CPI line and the 5 year moving average of the CPI line. This technique in mathematics is called "deviation from the moving average". This technique is used to analyse how has CPI previously acted and can give clues at what it might do in the future. Economic historians use such analysis, together with specific period analysis to predict potential risks in the future (see an example of such analysis in HOW TO USE section. The mathematical technique is a simple subtraction between 2 points (CPI - 5yr SMA of CPI).

▶︎Interpretation for deviation from a moving average:
  • Positive Deviation: When the line is above its moving average, it indicates that the current value is higher than the average, suggesting potential strength or bullish sentiment.
  • Negative Deviation: Conversely, when the line falls below its moving average, it suggests weakness or bearish sentiment as the current value is lower than the average.


▶︎Applications:
  • Trend Identification: Deviations from moving averages can help identify trends, with sustained deviations indicating strong trends.
  • Reversal Signals: Significant deviations from moving averages may signal potential trend reversals, especially when combined with other technical indicators.
  • Volatility Measurement: Monitoring the magnitude of deviations can provide insights into market volatility and price movements.


Remember the indicator is applying this only for the US CPI - not the ticker you apply the indicator on!

🔹Functionality 2: It plots on a new pane below information about the Consumer Price Index. You can also find the information by plotting the ticker symbol USACPIALLMINMEI on TradingView, which is a Monthly economic data by the OECD for the CPI in the US. The only addition you would get from the indicator is the plot of the 5 year Simple Moving Average.

🔹What is the US Consumer Price Index?
  • Measures the change in the price of goods and services purchased by consumers;
  • Traders care about the CPI because consumer prices account for a majority of overall inflation. Inflation is important to currency valuation because rising prices lead the central bank to raise interest rates out of respect for their inflation containment mandate;
  • It is measured as the average price of various goods and services are sampled and then compared to the previous sampling.
  • Source: Bureau of Labor Statistics;


FEATURES OF INDICATOR
1) The US Consumer Price Index Minus the Five Year Moving Average of the same.
As shown on the picture above and explained in previous section. Here a more detailed view.
imagen

2) The actual US Consumer Price Index (Annual Rate of change) and the Five year average of the US Consumer Price Index. Explained above and shown below:
imagen

To activate 2) go into settings and toggle the check box.
imagen

HOW TO USE
It can be used for a fundamental analysis on the relationship between the stock market, the economy and the Feds decisions to hike or cut rates, whose main mandate is to control inflation over time.

I have created this indicator to show my analysis in this idea:
What does a First Fed Rate cut really mean?
What does a First Fed Rate cut really mean?


CREDITS
I have seen such idea in the past posted by the institutional grade research of NedDavis and have recreated it for the TradingView platform, open-source for the community.
consumerCPIdavisfedFundamental AnalysisindexinflationNEDpricestatistics

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad