2
$\begingroup$

I have many time series data at work. Some are annual, some are quarterly, and some are monthly. I am exploring Digital Signal Processing (DSP) as a complementary approach to ARIMA and other methods. As a first step I am taking Hodrick-Prescott filter (HP Filter) for trend removing and forecasting. I am using R for my work.

How do I use HP filter for forecasting? What are the drawbacks that I should be aware of? I read many positive and negative reviews of HP Filter. I would like to get a concrete suggestions.

$\endgroup$
  • $\begingroup$ You mean the Hodrick-Prescott filter... en.wikipedia.org/wiki/Hodrick%E2%80%93Prescott_filter $\endgroup$ – Mike Hunter Oct 21 '16 at 15:16
  • $\begingroup$ I am starting my exploration of DSP methods for time series with Hodrick-Prescott filter. Later, I plan to move on with other filters for many of the time series I will encounter. $\endgroup$ – Vasu Oct 21 '16 at 20:16
  • $\begingroup$ Thank you every one for your help. I will go through the sources. $\endgroup$ – Vasu Oct 21 '16 at 20:30
5
$\begingroup$

Short answer: Don't use the HP Smoother for forecasting.

Long answer: For a time series $\{y_t\}_{t=1}^T$, the HP Smoother computes trend and cycle components $\{\tau_t\}_{t=1}^T$ and $\{c_t\}_{t=1}^T$ from the solution to the optimization problem: $$ \min_{\{\tau_t\}_{t=1}^T} \left(\sum_{t=1}^T(y_t - \tau_t)^2 + \lambda \sum_{t=3}^{T} (\Delta^2 \tau_t) ^2 \right) $$ where $\Delta$ is the differencing operator and $\lambda$ a tuning parameter. Say that you computed trend and cycle components with the HP Filter and now you want to forecast $y_{T+1}$, the next observation out of sample. We have $y_{T+1} = c_{T+1} + \tau_{T+1}$, so you need to forecast both trend and cycle components. The cycle component can be forecasted through a dynamic model that you presumably fitted to $\{c_t\}_{t=1}^T$. But how do you forecast the trend? There is no obvious way of extrapolating the trend component that was computed from minimizing the criterion. The only way that I have seen the HP filter used in "forecasting" was to ex post apply the HP filter to a larger dataset $\{y_t\}_{t=1}^{T+1}$, then extract $\tau_{T+1}$ and $c_{T+1}$. This is however not a forecast since it requires data up to $T+1$. Besides, the in-sample trend and cycle components $\{\tau_t\}_{t=1}^T$ and $\{c_t\}_{t=1}^T$ that you get from applying the HP Smoother in $T+1$ are not the same as you would get when applying it in $T$, so this iterative application of the Smoother really does not make sense.

I also recommend this source.

$\endgroup$
  • 3
    $\begingroup$ As is explained in the Hamilton paper you reference, the HP filter is equivalent to specifying a certain state space model, fitting some of its parameters by MLE and fixing others (the conventional values of $\lambda$), and then applying the Kalman smoother. As such, you already have an implicitly assumed state space model which can be used for forecasting directly. However, since this implicit model is rarely appropriate, the forecasts are unlikely to be any good. HP filter also leaks information from the future, so is not sensible for forecasting anyway. $\endgroup$ – Chris Haug Oct 21 '16 at 17:22
  • $\begingroup$ Thanks for the comment. You summarized the method in terms of a state space framework better than I could! $\endgroup$ – Matthias Schmidtblaicher Oct 21 '16 at 17:43
  • 1
    $\begingroup$ Thank you every one for making it clear to me. I appreciate your help in this. $\endgroup$ – Vasu Oct 24 '16 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.