OPEN-SOURCE SCRIPT

Year-over-Year % Change for PCEPILFE

Hello, traders!
This indicator is specifically for PCEPILFE, which is a 'Personal Consumption Expenditures (PCE) Index excluding food and energy.'
What this indicator does is compare the monthly data to that of the same month last year to see how it has changed over the year. This comparison method is widely known as YoY(Year-over-Year).
While I made this indicator to use for PCEPILFE, you may use it for different charts as long as they show monthly data.

PCEPILFE is one of the main measures of inflation the Federal Reserve uses.
You can see the YoY % change of the PCE Index excluding food and energy in the official website for the Bureau of Labor Statistics, but unfortunately, I couldn't find one in TradingView.
So instead, I decided to make my own indicator showing the changes using PCEPILFE.

The code is very simple: it compares the data to the data 12 points ago because 12 points would mean 12 months in this chart. We then multiply the result by 100 for percentage.
Doing so, we compare the current month to the same month of the previous year.

Because I am only interested in the YoY % Change of the index, I pulled the indicator all the way up, covering the original chart data entirely. (Or you could achieve the same by simply moving your indicator to the pane above. But this way, the original chart data is also visible.)
I hope this indicator helps you with your analysis. Feel free to ask questions if have any!

God bless!
educationalforecastingGrowth

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Check my Discord channel!
Also on:

Disclaimer