# Multi-steps direct forecasting in AR(2) model through bayesian estimation of the model

I'm estimating an AR(2) model using Bayesian methods through Gibbs sampling and I want to perform 4 step ahead multi-steps direct forecasts. Inside the MCMC loop in each iteration I'm drawing the variance and the vector of coefficients (the intercept and the coefficients for the first and the second lag). Hence I can easily perform iterated forecasting, but what about multi-steps direct forecasting? Does somebody have a reference on this?

Forecasting an AR(2) model simply uses an iterative approach.

Your first point forecast $$\hat{y}_{T+1}$$ relies on your last two historical observations $$y_T$$ and $$y_{T-1}$$ (since your AR order is 2). So plug these two in to get your point forecast $$\hat{y}_{T+1}$$.

Now, your next forecast $$\hat{y}_{T+2}$$ relies on $$y_T$$ (which you have, it's your last historical observation) and $$y_{T+1}$$ (which you don't have, it's your first forecast period). So instead of $$y_{T+1}$$, we simply use the forecast $$\hat{y}_{T+1}$$ which we just calculated above.

And so forth for $$\hat{y}_{T+t}$$. Since you have a posterior distribution for your coefficients, just perform this within each MCMC run and take the average at the end. For quantile forecasts, draw additional noise terms $$\epsilon_{T+t}$$, add these to your forecasts and finally take quantiles.

More information can be found in this free online open forecasting textbook.

• Yes but this is iterated forecasting; I'm asking about direct multi-steps forecasting. – Giorgetto Apr 21 '20 at 18:07
• Iteration is how you do multi-step forecasting in AR models. Alternatively, of course, you can express $\hat{y}_{T+1}$ as a function of $y_T$ and $y_{T-1}$ and substitute this expression into the formula for $\hat{y}_{T+2}$. Which amounts to precisely the same thing. – Stephan Kolassa Apr 22 '20 at 6:07
• google.com/url?sa=t&source=web&rct=j&url=https://… – Giorgetto Apr 22 '20 at 9:30
• That is something different. The authors use horizon-specific models, fitting one model for one-step ahead forecasts, another one for two-step ahead forecasts and so forth. If you have a dedicated model for two-step ahead forecasts, then you simply evaluate this model to obtain a two-step ahead forecast. Of course you can do the same thing: simply fit a model directly to your four steps horizon, and then evaluate it. (I would then expect the optimum model not to be AR(2) any more - that would translate into an AR(5) model with only $\phi_5\neq 0$ and $\phi_4\neq 0$, unrealistic.) – Stephan Kolassa Apr 22 '20 at 9:37
• Yes, this is called multi-step DIRECT forecasting (which is what I'm asking from the beginning). My problem is that inside the MCMC loop I draw the coefficients for the first and second lag which are not the coefficients I need to perform the direct multistep forecast. – Giorgetto Apr 22 '20 at 9:51