Saturday, April 19, 2014

Been Down So Long (HP Filter Edition)

it looks above-trend to me...

I'm teaching my advanced students about "Real Business Cycles" this week, and, as part of the set up I'm introducing them to the Hodrick-Prescott (HP) filter, a widely-used method of separating "cyclical" from "trend" components of time series data, like US GDP.  I recently updated my example - the red line is US real GDP, which tends upwards, with occasional interruption, and the blue line is the trend, according to HP filter:
When we study "business cycles" we're studying the deviations of real GDP (red) from its trend (blue) path (the trend is the subject of economic growth theory).

The striking thing is at the end, where filter shows GDP above its trend path.  This is clearer if we pull out the deviations:
These are the business cycles captured by this method, and you can see at the end, the distance from trend is positive.

So, we're "above trend"?  Economy's not so bad after all?!

Well, not really... the way the HP filter works is that it chooses a trend that minimizes the distance between the trend and the underlying data, subject to a constraint limiting the change in the growth rate of the trend, which is what forces it to be smooth.  The US economy's slump was deep and long enough that it pulled down the trend far enough that we're now a little above it.

Here is the growth rate of the trend:
You can see how much, according to the filter, the last several years pulled down the trend path.

I'm not sure whether this says more about the economy or the de-trending method (there's a whole literature on technical issues in de-trending...).  But it does remind us that we need to be careful in how we use our tools and interpret their results (i.e., we should actually look at the graphs).

A somewhat different picture, which is more consistent with what most of us think is the state of "the economy" is given by comparing real GDP to the CBO's estimate of "potential output":
That is, we still have a long way to go to close our "output gap".

2 comments:

The Arthurian said...

Hi, Bill.

"The striking thing is at the end"

Yeah, endings seem to be a "gotcha" with the HP filter. That, and by adding or omitting years since the crisis, you change the trend some years *before* the crisis. Slick trick. "We need to be careful" with this, indeed!

Kurt Annen's Excel add-in to calculate HP values, and the Visual Basic code for same are available for download at IDEAS:

http://ideas.repec.org/c/dge/qmrbcd/165.html

The VB code is easy to use and works great. I didn't try the add-in.

Bill C said...

Thanks. Didn't realize you could HP-filter in Excel. Yes, I believe one of the problems is that its a little less 'reliable' at the endpoints...