Hodrick–Prescott filter

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

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 reasoning for the methodology uses ideas related to the decomposition of time series.

denote the logarithms of a time series variable.

, there is a trend component that will solve The first term of the equation is the sum of the squared deviations

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.

should vary by the fourth power of the frequency observation ratio; thus,

denotes the lag operator, as can be seen from the first-order condition for the minimization problem.

The Hodrick–Prescott filter will only be optimal when:[6] 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).

to construct the current time point

, while the recursive setting assumes that only current and past states influence the current observation.

[7] Exact algebraic formulas are available for the two-sided Hodrick–Prescott filter in terms of its signal-to-noise ratio

[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: 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.