Hodrick-Prescott Filter

The Hodrick-Prescott filter is a smoothing method applied to a time series to determine long-term trends. The method was first used to analyze business cycles of US post-war economy.

The filter is a two-sided linear filter that calculates smoothed series S for the time series Y by minimizing the spread of S series elements around Y provided that the sum of elements of twice differentiated S series is minimum.

Mathematically, elements of the smoothed series S are selected to minimize the following function:

The λ parameter controls the measure of smoothness for the S series. The greater is λ value, the smoother is the series S. When λ → ∞, the series S becomes a linear trend, when λ = 0, the series S matches the source series Y.

The λ value should be selected depending on the frequency of the studied series. For example, recommended λ for annual data is 100, for quarterly data - λ = 1600, for monthly data - λ = 14400.

The λ parameter can also be calculated depending on series frequency and value of the Power power using the following formula:

where Frequency - the number of periods in a year. Recommended parameter value is two.

See also:

Modeling Container: The Hodrick-Prescott Filter Model | Time Series Analysis: Hodrick-Prescott Filter Model | IModelling.Hpf | IModelling.Hpfp | ISmHodrickPrescottFilter