# Forecasting with ARMA models - how do you estimate the error terms for use with the MA coefficients?

I've seen versions of this asked before, but haven't seen a satisfactory answer.

Lets say you have fitted an ARMA model:

$$Z_t = \psi_1Z_{t-1}+\psi_2Z_{t-2}+\theta_1\varepsilon_{t-1}+\theta_2\varepsilon_{t-2}+\varepsilon_{t}$$

We know the coefficients and we know the $Z_t$ time series values. However, we don't know the error terms $\varepsilon_i$.

My confusion is how to actually use the above model to make forecasts when I cannot plug in the $\varepsilon$ values?

How would I forecast $Z_t$ using this model given a set of prior observations $Z_q, q<t$?

By assuming you process start at time $t$, You only don't know the initial errors erros ( $\varepsilon_{t-1}$ and $\varepsilon_{t-2}$).However you know they are zero mean process so you can set them to zero.

To obtain $\varepsilon_{t}$ you compute :

$$\hat{\varepsilon}_{t} = Z_t - \psi_1Z_{t-1}-\psi_2Z_{t-2}-\theta_1\varepsilon_{t-1}-\theta_2\varepsilon_{t-2}$$ $$\hat{\varepsilon}_{t} = Z_t - \psi_1Z_{t-1}-\psi_2Z_{t-2}$$ Next you plug it in the process:

$$Z_{t+1} = \psi_1Z_{t}+\psi_2Z_{t-1}+\theta_1\hat{\varepsilon}_{t}+\theta_2\varepsilon_{t-1}+\varepsilon_{t+1}$$

and you obtain $\varepsilon_{t+1}$ in the same way :

$$\hat{\varepsilon}_{t+1} = Z_{t+1} - \psi_1Z_{t}-\psi_2Z_{t-1}-\theta_1\hat{\varepsilon}_{t}-\theta_2\varepsilon_{t-1}$$ $$\hat{\varepsilon}_{t+1} = Z_{t+1} - \psi_1Z_{t}-\psi_2Z_{t-1}-\theta_1\hat{\varepsilon}_{t}$$ And you continue the recursion. (Starting from $t+2$ you will know the erros $\varepsilon_{t +1}$ and $\varepsilon_{t}$)

• Ah, so you initialize the initial $n$ errors/white noise values to zero and then proceed from there to calculate forward-looking errors. – user75138 Dec 1 '15 at 21:03