The Hodrick-Prescott (HP) filter is used to detrend time series. This approach was introduced to economists in the work of Kydland and Prescott,
it became part of the toolbox used by people who worked in the real business cycle literature, and its use spread from there. Hodrick and Prescott's paper was unpublished for a long time, but appeared eventually in the Journal of Money, Credit, and Banking.
In studying the cyclical behavior of economic time series, one has to take a stand on how to separate the cyclical component of the time series from the trend component. One approach is to simply fit a linear trend to the time series (typically in natural logs for prices and quantities). The problem with this is that there are typically medium-run changes in growth trends (e.g. real GDP grew at a relatively high rate in the 1960s, and at a relatively low rate from 2000-2012). If we are interested in variation in the time series only at business cycle frequencies, we should want to take out some of that medium-run variation. This requires that we somehow allow the growth trend to change over time. That's essentially what the HP filter does.
You can find a description of the HP filter on page 3 of Hodrick and Prescott's paper.
The HP filter takes an economic time series y(t), and fits a trend g(t) to that raw time series, by solving a minimization problem. The trend g(t) is chosen to minimize the sum of squared deviations of y(t) from g(t), plus the sum of squared second differences, weighted by a smoothing parameter L (the greek letter lambda in the paper). The minimization problem penalizes changes in the growth trend, with the penalty increasing as L increases. The larger is L, the smoother will be the trend g(t).
Clearly, the choice of L is critical when one is using the HP filter. L=0 implies that that g(t)=y(t) and there are no deviations from trend, and L=infinity gives a linear trend. Kydland and Prescott used L=1600 for quarterly data, and that stuck. It's obviously arbitrary, but it produces deviations from trend that don't violate the eyeball metric.
Here's what happens when you HP filter the quarterly real GDP data available on FRED. The first chart shows the log of real GDP and the HP trend.
You can see in the chart how the growth trend changes over time to fit the time series.
The next chart shows the deviations of real GDP from the HP trend.
This last picture doesn't grossly violate the eyeball metric, as it seems more or less consistent with what we think we know about business cycles. The large negative deviations from trend more or less match up with how the NBER defines the business cycle.
Of course the NBER committee that dates business cycles is a group of human beings, and the HP filter is just a statistical technique, but it is reassuring if the two approaches are in the same ballpark.
Kydland and Prescott's approach to studying business cycles was to: (i) Define the raw time series that we are trying to explain as the deviations of actual time series from HP trends. (ii) Simulate a calibrated model on the computer to produce artificial time series. (iii) HP filter the artificial time series and ask whether these time series look much like the raw time series we are trying to explain.
Here's what Paul Krugman has to say about HP filters:
When applied to business cycles, the HP filter finds a smoothed measure of real GDP, which is then taken to represent the economy’s underlying potential, with deviations from this smoothed measure representing unsustainable temporary deviations from potential.
I'm not sure if this is just Krugman's misunderstanding, or if this is widespread. In any case, it seems important to correct the misunderstanding.
What is the economy's "underlying potential" anyway? It's the level of aggregate real GDP that we could achieve if, within the set of feasible economic policies, policymakers were to choose the policy that maximizes aggregate economic welfare. The HP trend is no more a measure of potential than is a linear trend fit to the data. The HP trend was arrived at through a purely statistical procedure. I did not use any economics to arrive at the two charts above - only a few lines of code. How then could the HP trend be a measure of potential GDP?
To measure potential GDP requires a model. The model will define for us what "feasible economic policies" and "aggregate economic welfare" are. If we used Kydland and Prescott's procedure, above, we might construct a model, calibrate and simulate it, and argue that the model produces time series that fit the actual data. We might then feel confident that we have a good model, and use that model to measure potential output. Maybe the model we fit to the data is a Keyesian model, which implies an active role for monetary and fiscal policy. Maybe it's a model with a well-articulated banking and financial sector, with an explicit role for monetary policy.
If the model is Kydland and Prescott's, there is a clear answer to what potential is - it's actual GDP (and certainly not the HP trend). That model doesn't have a government in it, and was not intended for thinking about policy. What Kydland and Prescott's work does for us, though, is to allow us to consider the possibility that, for some or all business cycle events, there may be nothing we can or should do about them.
But how should we think about potential GDP in the current context? In the second chart above, one curious feature of the deviations from the HP trend is that the most recent recession (deviation from trend close to -4%) appears to be less severe than the 1981-82 recession (deviation from trend close to -5%). This may not be consistent with what we know about the last recession from looking at other data. The next chart shows the log of real GDP and the HP trend since 2000.
In its attempt to fit the actual time series, the HP filter has done away with part of what we might want to think of as the recession, and real GDP in the first quarter of 2012 was more than 1% above trend.
You can see we have to be careful with the HP filter, if we are looking at highly persistent events. You can see this even more clearly for the Great Depression. This next chart is from a revision I am doing for my textbook, showing annual real GDP per capita, with an HP trend (L=100) fit to the actual time series.
You can see how the trend moves around substantially in response to the GDP data during the Great Depression and World War II - probably more than you might want it to. Of course that depends on how the smoothing parameter L is chosen. Look at the chart in Krugman's blog post.
He's misusing the HP filter here in two ways (though of course what he wants to do is make people who use it look stupid). First, he's using a value for L that's just too small. Second, he's using it to fit a highly persistent event.
Back to recent events. What happens if we fit a linear trend to the post-1947 real GDP data? The next chart shows actual real GDP and the linear trend, post-2000.
Here, real GDP falls below trend in early 2006, and is about 14% below trend in first quarter 2012. Remember that the HP trend is about 1% below actual GDP.
Do either of these trend measures (linear, HP) correspond to official measures of potential output? The next chart shows the Congressional Budget Office's measure of potential GDP, along with actual GDP, both in natural logs.
According to the CBO measure, real GDP is currently below potential by 5.5% - somewhere between what the HP trend and linear trend give you. But does CBO potential output do any better than trend-fitting in capturing what we should be measuring? Absolutely not. The CBO does not have a fully-articulated macroeconomic model that captures the role of economic policy. At best, what they seem to be doing is estimating potential based on an aggregate production function and long-term trends in the labor and capital inputs, and in total factor productivity. What we need, in the current context, are measures of the inefficiencies caused by various frictions, and a representation of how fiscal and monetary policies may or may not be able to work against those frictions.
Here's another way of looking at the data. The next two charts show the paths of real GDP and employment (CPS data) during the 1981-82 recession and the 2008-09 recession. In each chart, I normalize the observation at the NBER peak to 100.
What's interesting here (if you didn't already know) is the slow recovery in the last recession relative to the earlier one, and the decrease in employment in the recent recession. In the 1981-82 recession, employment falls by a small amount, then resumes robust growth after 6 quarters. In the recent recession, employment falls by much more, and is still in the toilet after 12 quarters.
Here is a set of explanations that I have heard for the recent behavior of economic time series:
(i) Wages and prices are sticky.
(ii) There is a debt overhang. Consumers accumulated a lot of debt post-2000, the recession has compromised their ability to service that debt, and they have reduced consumption expenditures substantially.
(iii) Consumers and firms are anticipating higher taxes in the future.
(iv) Sectoral reallocation has caused mismatch in the labor market.
(v) Capacity has been reduced by a loss of wealth, or perhaps more specifically, collateralizable wealth.
Sticky wages and prices: Come on. The recession began in fourth quarter 2007, according to the NBER. How can we be suffering the effects of stuck wages and prices in mid-2012? The 1981-82 recession occurred in the midst of a rapid disinflation, from close to 15% (CPI inflation) in early 1980 to 2.5%, post-recession. If there was a time when wage and price stickiness would matter, that would be it. But, as you can see from the last two charts, the 1981-82 recession was short compared to the recent one, with a robust recovery.
Debt Overhang: Again, think about the 1981-82 recession. The unanticipated disinflation would have made a lot of debts much higher in real terms than anticipated. If you weren't seeing the debt overhang effect in the 1981-82 recession, why are you seeing it now?
Higher future taxes: Look at Canada. There may be a Conservative government there, but they seem committed to social insurance and relatively high taxes. And Canada is gaining ground on the US in the GDP per capita competition.
Sectoral Reallocation: This paper by Sahin and coauthors
measures mismatch unemployment. They find it's significant, though it's not explaining all of the increased unemployment in the US (maybe a third).
Capacity from wealth (collateral): I like this one. Jim Bullard talked about this,
though I think the correct story has to do with collateral specifically, rather than wealth. For example, the value of the housing stock is important, as it not only supports mortgage lending, but a stock of mortgage-backed securities that are (or were) widely-used as collateral in financial markets. One dollar in real estate value could support a multiple of that in terms of credit contracts in various markets.
Thus, the factors that I think potentially can give us the most mileage in explaining what is going on are ones which are not well-researched. We know a little bit about the mismatch problem, but have really only scratched the surface. What makes credit markets dysfunctional is still not well-understood. We have plenty of different models, and a lot to sort out.
Here's a summary of an interview with Jeff Lacker, President of the Richmond Fed.
Given what’s happened to this economy, I think we’re pretty close to maximum employment right now.
The "dual mandate" the Fed operates under includes language to the effect that the Fed should try to achieve maximum employment. Lacker says we're there, and I'm inclined to agree with him.
The Fed should feel free to interpret the Humphrey Hawkins Act in whatever way makes the most economic sense. If I define potential GDP as I did above, then maximum employment is whatever level of employment can be achieved if optimal economic policies are pursued, within feasibility constraints. From the point of view of the central bank, there is nothing to be done. Even if you thought that all the factors (i)-(v) above are important, fiscal policy is a constraint for the central bank, and there is nothing to be done on the monetary policy front, for reasons discussed here.
Whether real GDP is above or below some trend measure, or above or below CBO potential output is currently irrelevant to how the Fed should think about "maximum employment." We're there.