Hodrick–Prescott filter

From HandWiki
Short description: Mathematical tool used in macroeconomics

The Hodrick–Prescott filter (also known as Hodrick–Prescott decomposition) is a mathematical tool used in macroeconomics, especially in real business cycle theory, to remove the cyclical component of a time series from raw data. It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations. The adjustment of the sensitivity of the trend to short-term fluctuations is achieved by modifying a multiplier [math]\displaystyle{ \lambda }[/math].

The filter was popularized in the field of economics in the 1990s by economists Robert J. Hodrick and Nobel Memorial Prize winner Edward C. Prescott,[1] though it was first proposed much earlier by E. T. Whittaker in 1923.[2] The Hodrick-Prescott filter is a special case of a smoothing spline.[3]

The equation

The reasoning for the methodology uses ideas related to the decomposition of time series. Let [math]\displaystyle{ y_t\, }[/math] for [math]\displaystyle{ t = 1, 2, ..., T\, }[/math] denote the logarithms of a time series variable. The series [math]\displaystyle{ y_t\, }[/math] is made up of a trend component [math]\displaystyle{ \tau_t }[/math], a cyclical component [math]\displaystyle{ c_t }[/math], and an error component [math]\displaystyle{ \epsilon_t }[/math] such that [math]\displaystyle{ y_t\ = \tau_t\ + c_t\ + \epsilon_t\, }[/math].[4] Given an adequately chosen, positive value of [math]\displaystyle{ \lambda }[/math], there is a trend component that will solve

[math]\displaystyle{ \min_{\tau}\left(\sum_{t = 1}^T {(y_t - \tau _t )^2 } + \lambda \sum_{t = 2}^{T - 1} {[(\tau _{t+1} - \tau _t) - (\tau _t - \tau _{t - 1} )]^2 }\right).\, }[/math]

The first term of the equation is the sum of the squared deviations [math]\displaystyle{ d_t=y_t-\tau_t }[/math], which penalizes the cyclical component. The second term is a multiple [math]\displaystyle{ \lambda }[/math] of the sum of the squares of the trend component's second differences. This second term penalizes variations in the growth rate of the trend component. The larger the value of [math]\displaystyle{ \lambda }[/math], the higher is the penalty. Hodrick and Prescott suggest 1600 as a value for [math]\displaystyle{ \lambda }[/math] for quarterly data. Ravn and Uhlig (2002) state that [math]\displaystyle{ \lambda }[/math] should vary by the fourth power of the frequency observation ratio; thus, [math]\displaystyle{ \lambda }[/math] should equal 6.25 (1600/4^4) for annual data and 129,600 (1600*3^4) for monthly data;[5] in practice, [math]\displaystyle{ \lambda = 100 }[/math] for yearly data and [math]\displaystyle{ \lambda = 14,400 }[/math] for monthly data are commonly used, however.

The Hodrick–Prescott filter is explicitly given by

[math]\displaystyle{ \mathit{HP} = \left[ \lambda L^2 - 4\lambda L + (1 + 6\lambda) - 4\lambda L^{-1} + \lambda L^{-2} \right]^{-1} }[/math]

where [math]\displaystyle{ L }[/math] denotes the lag operator, as can be seen from the first-order condition for the minimization problem.

Drawbacks to the Hodrick–Prescott filter

The Hodrick–Prescott filter will only be optimal when:[6]

  • Data exists in a I(2) trend.
    • If one-time permanent shocks or split growth rates occur, the filter will generate shifts in the trend that do not actually exist.
  • Noise in data is approximately normally distributed.
  • Analysis is purely historical and static (closed domain). The filter causes misleading predictions when used dynamically since the algorithm changes (during iteration for minimization) the past state (unlike a moving average) of the time series to adjust for the current state regardless of the size of [math]\displaystyle{ \lambda }[/math] used.

The standard two-sided Hodrick–Prescott filter is non-causal as it is not purely backward looking. Hence, it should not be used when estimating DSGE models based on recursive state-space representations (e.g., likelihood-based methods that make use of the Kalman filter). The reason is that the Hodrick–Prescott filter uses observations at [math]\displaystyle{ t+i, i\gt 0 }[/math] to construct the current time point [math]\displaystyle{ t }[/math], while the recursive setting assumes that only current and past states influence the current observation. One way around this is to use the one-sided Hodrick–Prescott filter.[7]

Exact algebraic formulas are available for the two-sided Hodrick–Prescott filter in terms of its signal-to-noise ratio [math]\displaystyle{ \lambda }[/math].[8]

A working paper by James D. Hamilton at UC San Diego titled "Why You Should Never Use the Hodrick-Prescott Filter"[9] presents evidence against using the HP filter. Hamilton writes that:

  1. The HP filter produces series with spurious dynamic relations that have no basis in the underlying data-generating process.
  2. A one-sided version of the filter reduces but does not eliminate spurious predictability and moreover produces series that do not have the properties sought by most potential users of the HP filter.
  3. A statistical formalization of the problem typically produces values for the smoothing parameter vastly at odds with common practice, e.g., a value for λ far below 1600 for quarterly data.
  4. There's a better alternative. A regression of the variable at date t+h on the four most recent values as of date t offers a robust approach to detrending that achieves all the objectives sought by users of the HP filter with none of its drawbacks."

A working paper by Robert J. Hodrick titled "An Exploration of Trend-Cycle Decomposition Methodologies in Simulated Data"[10] examines whether the proposed alternative approach of James D. Hamilton is actually better than the HP filter at extracting the cyclical component of several simulated time series calibrated to approximate U.S. real GDP. Hodrick finds that for time series in which there are distinct growth and cyclical components, the HP filter comes closer to isolating the cyclical component than the Hamilton alternative.

See also

References

  1. Hodrick, Robert; Prescott, Edward C. (1997). "Postwar U.S. Business Cycles: An Empirical Investigation". Journal of Money, Credit, and Banking 29 (1): 1–16. doi:10.2307/2953682. http://www.kellogg.northwestern.edu/research/math/papers/451.pdf. 
  2. Whittaker, E. T. (1923). "On a New Method of Graduation". Proceedings of the Edinburgh Mathematical Association 41: 63–75. doi:10.1017/S0013091500077853.  - as quoted in Philips 2010
  3. Paige, Robert L.; Trindade, A. Alexandre (2010). "The Hodrick-Prescott Filter: A special case of penalized spline smoothing". Electronic Journal of Statistics 4: 856–874. doi:10.1214/10-EJS570. ISSN 1935-7524. https://projecteuclid.org/journals/electronic-journal-of-statistics/volume-4/issue-none/The-Hodrick-Prescott-Filter--A-special-case-of-penalized/10.1214/10-EJS570.full. 
  4. Kim, Hyeongwoo. "Hodrick–Prescott Filter" March 12, 2004
  5. Ravn, Morten; Uhlig, Harald (2002). "On adjusting the Hodrick–Prescott filter for the frequency of observations". The Review of Economics and Statistics 84 (2): 371. doi:10.1162/003465302317411604. https://www.econstor.eu/bitstream/10419/75742/1/cesifo_wp479.pdf. 
  6. French, Mark W. (2001). "Estimating Changes in Trend Growth of Total Factor Productivity: Kalman and H-P Filters versus a Markov-Switching Framework". FEDS Working Paper No. 2001-44. 
  7. Stock; Watson (1999). "Forecasting Inflation". Journal of Monetary Economics 44 (2): 293–335. doi:10.1016/s0304-3932(99)00027-6. 
  8. McElroy (2008). "Exact Formulas for the Hodrick-Prescott Filter". Econometrics Journal 11: 209–217. doi:10.1111/j.1368-423x.2008.00230.x. 
  9. Hamilton, James D. (2017). "Why You Should Never Use the Hodrick-Prescott Filter". Working Paper. http://econweb.ucsd.edu/~jhamilto/hp.pdf. 
  10. Hodrick, Robert J. (2020). "An Exploration of Trend-Cycle Decomposition Methodologies in Simulated Data". Working Paper. https://www0.gsb.columbia.edu/mygsb/faculty/research/pubfiles/26120/Hodrick.Filtering%20Cycles.NBERw26750.2020.pdf. 

Further reading

External links