I am working on putting together a presentation on recent economic activity, and I am not sure what is the best way to represent inflation at an annual level. I pulled the CPI All Items All Urban data from FRED, and converted the index data into monthly year-over-year percentages. I now want to generate a table with yearly values. My first thought was to take the average of the monthly values within the year, as (I think) that would represent an accurate estimation of what consumers in the economy experienced throughout the year. It was recommended to me that I instead use the YoY from the December of each year, as that would reflect the percent increase in prices from the beginning of the year to the end of the year. We will likely split the difference, report both and include a graph with monthly YoY and a 12-month moving average with the December values of both series highlighted. That said, I am still not sure what is the best representation of annual inflation, and I haven't found a definitive answer from an official source.
2 Answers
The suggestion made to you about using December YoY to represent annual inflation is not an appropriate way.
Some pointers:
Inflation comes from index which represent average price levels during the month. So even for a month there is an averaging. Start by finding out how this average is calculated in the index compilation in your country. In some countries AM is used while in others GM to decrease intra-month variations.
It also depends on the purpose. If for example the calculated annual inflation rate is an input for studying/deflating a stock variable then perhaps the index at the end of year is okay. But for most applications, the average change in price during the year is more relevant. In such cases it is advisable to first calculate average index for all 12 months for each year and then calculation inflation from the annual time series of the index. How to average should take into consideration answer of point 1 above.
Note: An important thing here is that average inflation rate over the year is different from annual inflation. In the former you take average of the monthly inflation rates while in the latter you calculate inflation from average annual index (just like CPI compiling agency does for a month from daily/intra-month price data). So decide accordingly.
-
$\begingroup$ I'm working with U.S. CPI data. I know that the BLS switched to using geometric means in the 90s for its price baskets. I wanted to check my understanding and see if I could use the relative importance weights to calculate the CPI for all items from the weighted average of the eight immediate subcomponents (Food, Apparel, etc.), but I ended up off by a few points. Do you know what methodology the BLS uses to aggregate components? $\endgroup$ Feb 25, 2022 at 2:52
-
$\begingroup$ I do not know the methodology followed by BLS but please keep in mind that averaging is done at multiple stages. Across items weighted average is taken for index not inflation and it is AM not GM. The question of AM or GM comes at commodity level not across commodity level $\endgroup$– DayneFeb 25, 2022 at 8:30
Short answer: Its YoY because it measures exactly by how much the price level grew over 12 months. I doubt an official source would answer that - there are some things that are considered common knowledge. However, since you either have the index, or YoY values for growth rates, I guess you have an indirect answer.
Long answer: Inflation (like pretty much anything in finance and econ) grows over time, hence it is exponential in nature. The geometric mean is the best measure to determine the average growth rate. If you do it properly, your approach will be identical to the YoY figure. I used FredAPI in Julia below to show this. One of the most common CPI measures for the US is CPIAUCSL.
Getting the dataframe, and doing computing growth rates for YoY and MoM in pct results in the following df,
where the highlighted area is the original data. Note that FRED uses 2020-12-01 to refer to the December CPI (which is actually end of Dec, released in Jan).
a ) to get YoY in percent for 2021, you use end of Dec 2020 (which is beginning of Jan) and end Dec21 and compute the percent change. Doing this for every month, results in column YoY %
b ) if you were to do MoM, you compute change from one month to the other, column MoM%
c ) the geometric mean is defined as $$\left({\frac {a_{1}}{a_{0}}}{\frac {a_{2}}{a_{1}}}\cdots {\frac {a_{n}}{a_{n-1}}}\right)^{\frac {1}{n}}=\left({\frac {a_{n}}{a_{0}}}\right)^{\frac {1}{n}}$$ Now, we can easily compute both to see it is equivalent
gm = geomean(last(df.MoM, 12))-1
println("The geometric mean from monthly growth rates is $(round(gm, digits = 5)*100)%")
growth_rate = df.value[end]/df.value[1]
println("The YoY % growth rate is $(round((growth_rate-1)*100, digits = 5))%")
println("We can also turn this into monthly values: $(round(growth_rate^(1/12)-1, digits = 5)) ...")
println("... which is $(round((growth_rate^(1/12)-1)*100, digits = 3))% ...")
println("... which happens to be identical to the geometric mean: $(gm == growth_rate^(1/12)-1)")
println("From the start value of the CPI ($(df.value[1])), you can use the geometric mean to compute the end value of the CPI: $(df.value[1]*(1+gm)^12)")
println("Or you use the start value of the CPI ($(df.value[1])), and YoY to compute the end value of the CPI: $(df.value[1]*(1+df[!,"YoY %"][end]/100))")
Now, expressing growth rates in monthly values is very hard to grasp for people. Do you find it easier to say you earned 7% return last year on a stock, or to hear you made, on average (geomean) 0.13 % a week?
What you should not do, is to use the average of monthly YoY values. That is pretty much meaningless and not referring to growth rates in 2021. They are growth rates in between the year and given inflation accelerated last year, it will underestimate the actual growth rate over the year significantly.
EDIT
If you want percent increase in prices from the beginning of the year to the end of the year, which is how inflation rates are usually reported, you use YoY December.
Assume an iPhone costs £1000 at the beginning of January (since there is always only monthly values for inflation, the end of Dec, is the by far best proxy to use for the beginning of Jan value). If at the end of the year, you need to pay £1100 for the exact same model, by how much did the price of the iPhone increase over the year? I assume no one disputes that it increased by £100, or 10%?
If the entire economy would be iPhones, that would be our inflation. Now obviously, the cost of an iPhone throughout that year could have been anything. It may have sold for £500 on Black Friday, in which case the average price people paid would probably be substantially below £1000. However, if you want to know by how much the price increased within the entire year (that is akin to inflation), you use the beginning and end value.
The BLS (Bureau of Labour statistics) has a FAQ page where on point 16 you can read: "Sometimes the index level itself will be reported, but it is also common to see 1-monthor 12-month percent changes reported." These are the three values I provided above (seasonally adjusted in my case).
The BLS actually allows you to retrieve yearly averages (of the monthly YoY values - the 4.7 in the column annual below),
just like you could do that on FRED as well:
Note that the BLS is not seasonally adjusted and FRED seasonally adjusted (both are available). However, think of how that average is computed. It is the average of the YoY in my example.
That refers to the average price of an iPhone, every month, compared to the price a year ago, and than averaged over the year, as can be seen below (if you switch the last price to 1100 you have the example before). The numbers match with the inflation data, because I simply normalized the price of an "iPhone" to match the provided inflation data.
As shown above, BLS itself does not mention this possibility as one of the choices in their FAQ. usinflationcalculator.com computes it also as the standard YoY in December but add that the BLS allows you to display it as an avg while adding that this number is rarely discussed.
The data isn't really published that way by the BLS, but this is a simple option you can choose from if you tick the box "include annual averages" in a generic template (just like FRED). This may make more sense for other series, unless your goal is not to get the change in price levels from start to end.
I'll leave it to whoever reads this to decide if the price of an iPhone that cost 1000 at the beginning of the year and that cost ~1100 at the end of the year grew by 4.6% over that year or by ~10%. Furthermore, everyone can decide if this price increase refers to inflation in that year, or not (and what that 4.6% actually refers to).
I'll leave it at that.
-
1$\begingroup$ The questions asks for a way how to average the inflation over whole year not just for every month but your answer only talks about using year on year for every month $\endgroup$– csilviaFeb 18, 2022 at 17:13
-
$\begingroup$ @csilvia, I understood that the question asks about the best way to represent inflation at an annual level. That simply is YoY in December. What is missing in your opinion? YoY in December tells you how much inflation changed over the year. This number can be broken down into monthly averages (as shown), which is identical to the average (geomean should be used for growth rates) monthly growth rates. If you have £100 on 2021-01-01 and end up with £105 on 2021-12-31., what is your return? The calculation is the same for inflation. $\endgroup$– AKdemyFeb 18, 2022 at 19:07
-
1$\begingroup$ you could simply suggest another way how to aggregate inflation over year. Telling someone who needs yearly inflation numbers just to use monthly YoY numbers does not help. $\endgroup$– csilviaFeb 20, 2022 at 14:41
-
$\begingroup$ I don't understand. If you need yearly inflation, you need YoY in December. In my opinion, there is nothing else that makes sense unless you know better in which case I am looking forward to your suggestion. There is also a comment that it was recommended to the OP that this is the way it should be done. $\endgroup$– AKdemyFeb 20, 2022 at 16:55
-
1$\begingroup$ YoY for December 2021 is not equal to inflation for year 2021, I will leave it at that $\endgroup$– csilviaFeb 21, 2022 at 21:03