The Hodrick-Prescott (HP) filter is the optimal estimator of the trend component in a smooth trend model with signal-to-noise ratio parameter fixed at 1/1600. It gives the detrended observations, , for large samples and t not near the beginning or end of the series
Bear in mind that if the smooth trend model was believed to be the true model there would be no reason to apply the HP filter. The filtered data of a smooth trend model contain nothing more than white noise. The belief here is clearly different.
We can easily show that the gain from the detrending filter is given by:
Note that the smaller the the more the filter concentrates on removing low frequencies.
Suppose the series are integrated e.g. then
Then the autocovariance generating function of the series is given by:
Hence if is a random walk the spectrum of the detrended series is given by
This spectrum has got a peak at which for signal-to-noise ratio fixed at 1/1600 corresponds to a period of about thirty. Thus applying the HP filter to a random walk generates detrended observations which have the characteristics of a business cycle for quarterly observations!
#Simulates random walk x<- cumsum(rnorm(80)) # Plots Trend and Cyclical of HP - requires package mFilter plot(hpfilter(x,type="lambda",freq=1600))
Harvey, A. C. and Jaeger, A. (1993), Detrending, stylized facts and the business cycle. Journal of Applied Econometrics, 8: 231–247