This forum is full of questions regarding MA processes; for instance: Confusion about Moving Average(MA) Process.

There seem to be a lot of confusion wrt MA processes. I think having a numerical example would help.

Let us say I want to model the following observations:

t  1  2  3  4  5  6
Y  5  6 -4  8 10 -2

I find that I can model it using the following MA(2) process:


The average is zero, so I guess the errors are equal to the observations, so that:

t   1   2   3  4  5  6
Y   5   6  -4  8 10 -2
e   5   6  -4  8 10 -2
e-1 NA  5   6 -4  8 10
Ŷ   NA  5.5 1  2  9  4

Is this how Y is forecast in a MA model?


Essentially, I agree with @IrishStat, but I would like to "rephrase" the answer a little.

If you assume that $Y_t$ follows an MA(2) process, then you have

$$Y_t = \varepsilon_t + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2}$$

(I assume no intercept for simplicity.) Note that this is not what you have in your equation.

Now if you are going to forecast $Y_t$ using the information available up to time $t-1$, $I_{t-1}$, the point forecast of $Y_t$ will be

$$ \begin{multline} \begin{split} \operatorname{E}(Y_t|I_{t-1}) &= \operatorname{E}(\varepsilon_t + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2}|I_{t-1}) \\ &= \operatorname{E}(\varepsilon_t|I_{t-1}) + \theta_1 \operatorname{E}(\varepsilon_{t-1}|I_{t-1}) + \theta_2 \operatorname{E}(\varepsilon_{t-2}|I_{t-1}) \\ &= 0 + \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2} \\ &= \theta_1 \varepsilon_{t-1} + \theta_2 \varepsilon_{t-2} \end{split} \end{multline} $$

$\varepsilon_1 = 5$,
$\varepsilon_2 = 6$,
$\theta_1 = 0.5$,
$\theta_2 = -0.25$,
then the point forecast of $Y_3$ given the information at time 2 is

$$ \begin{multline} \begin{split} \operatorname{E}(Y_3|I_2) &= \theta_1 \varepsilon_{3-1} + \theta_2 \varepsilon_{3-2} \\ &= \theta_1 \varepsilon_2 + \theta_2 \varepsilon_1 \\ &= 0.5 \cdot 6 - 0.25 \cdot 5 \\ &= 1.75 \end{split} \end{multline} $$

| cite | improve this answer | |
  • $\begingroup$ That was superb, thank you. But please confirm me where the epsilons come from: we have the actual $Y$ and the predicted $\hat{Y}$. $I_{t-1}$ comes from knowing the actual $Y$, right? Then $\varepsilon$ is whatever residue was not captured by the model, right? Would this not mean then that this model cannot forecast beyond one time period of the available data $Y$? $\endgroup$ – Ricardo Cruz Aug 6 '15 at 15:50
  • 1
    $\begingroup$ Epsilons are defined as follows: $\varepsilon_t:=Y_t-\operatorname{E}(Y_t|I_{t-1})$. $I_{t-1}$ includes everything up to time $t-1$. At time $t-1$ we know neither $Y_t$ nor $\varepsilon_t$. Given information available at time $t$, $I_t$, MA($q$) model can forecast as many steps ahead as you like. The first $q$ forecasts ($\operatorname{E}(Y_{t+1}|I_t),\dotsb,\operatorname{E}(Y_{t+q}|I_t)$) will generally be non-zero; forecasts for time periods beyond $t+q$ will be zero. $\endgroup$ – Richard Hardy Aug 6 '15 at 16:54
  • $\begingroup$ Note that estimation of MA($q$) model is quite involved. Epsilons are obtained only by estimating the model (using maximum likelihood estimation, for example). OLS estimation does not work as epsilons are not available before the model is estimated; in other words, there are no regressors to use on the right hand side of a regular multiple regression. More detailed discussion of this is beyond the topic here. $\endgroup$ – Richard Hardy Aug 6 '15 at 16:59
  • $\begingroup$ @RichardHardy For the longest time I have been searching for what you describe in your last comment, I believe this is what trips up most people when they misunderstand MA processes. They (and I) don't understand where the errors come from, since to get errors you must have made a model from which to have produced residues, but what model? I am not familiar with maximum likelihood estimation, I am still very curious how somebody can come up with an estimate for $y_t$ from which to get a residue $\epsilon_t$. Do you have any sources where MLE is done on a simple MA process for illustration? $\endgroup$ – Mike May 13 '19 at 20:01
  • $\begingroup$ @Mike, I share your sentiment. Many textbooks and lecture notes on time series describe estimation of MA processes. Hamilton "Time Series Analysis" is one of them. But that does not make it easy. For me, it is much more complicated than, say, OLS estimation. $\endgroup$ – Richard Hardy May 14 '19 at 5:13

The current error $e_t$ is never known until after the $Y_t$ is observed thus it is set to 0.0 . The MA(2) process is $Y_t= + .5 * e_{t-1}+ .5* e_{t-2} + e_t$ where $e_t= 0.0$. No forecast is possible until period 3.

| cite | improve this answer | |
  • $\begingroup$ Please check your formula for typographical errors. You will be pleasantly surprised at how good it looks (even if it's not correct!) when you delimit it with dollar signs to enable $\TeX$ markup. $\endgroup$ – whuber Aug 5 '15 at 21:16
  • $\begingroup$ Your formula seems to have a typographical error. Anyhow, my problem is what constitutes the error variable. Let's say that I have trained the model and I have obtained the formula as you and I stated. Please forecast me what will happen in period 4, for instance. $\endgroup$ – Ricardo Cruz Aug 5 '15 at 21:39
  • $\begingroup$ .5*8+-.5*(-4)=2 $\endgroup$ – IrishStat Aug 6 '15 at 0:04
  • $\begingroup$ Irishstat I have attempted to use $TEX$ to edit the equation as @whuber pointed out,please let me know if I messed up, I'll revert back. $\endgroup$ – forecaster Aug 6 '15 at 3:56

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.