# Detrending a time series

I have time series data from 1947-1971 for prices and quantity indices. In the original paper from 1975 which I obtained the data the authors did not detrend the data. Here is how I detrended the data:

1. I applied the Hodrick Prescott filter to each of the variables via Eviews
2. I obtained the residuals values from the Hodrick Prescott and examined them.
3. It was good because of no trend so I took the residuals and replaced them for each of the variables. Then I proceeded to the estimation of the model.

Would this be correct approach to detrend the data?

$$y_t=\beta t + \varepsilon_t$$
and then use the residuals $\varepsilon$ as your detrended series, just like you did with the HP estimation.
• Interesting, I had never heard of the HP filter before! It is essentially Tikhonov regression with a curvature penalty (e.g. as here). If you make the penalty coefficient $\lambda$ large, the HP result should converge to the linear fit, I would think (?) The issue in Hamilton seems to be "not appropriate for a random walk" (?), which could also apply to a purely linear trend. (Or is Hamilton only arguing against "certain values of $\lambda$?) May 29, 2017 at 3:57