3

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:

$\hat{Y}_t=\frac{1}{2}\epsilon_t+\frac{1}{2}\epsilon_{t-1}$

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?

2 Answers2

3

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} $$

Example:
if
$\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} $$

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
  • 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$? – Ricardo Magalhães Cruz Aug 06 '15 at 15:50
  • 1
    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. – Richard Hardy Aug 06 '15 at 16:54
  • 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. – Richard Hardy Aug 06 '15 at 16:59
  • @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? – Mike May 13 '19 at 20:01
  • @Mike, I share your sentiment. Many textbooks and lecture notes on time series describe estimation of MA processes. Hamilton ["Time Series Analysis"](https://press.princeton.edu/titles/5386.html) is one of them. But that does not make it easy. For me, it is much more complicated than, say, OLS estimation. – Richard Hardy May 14 '19 at 05:13
  • @RichardHardy I found this video that was somewhat enlightening after commenting: https://www.youtube.com/watch?v=DlvWYKLM36U. However, I am still not sure on the 'physics' of the MA model and how to interpret a process that responds to its errors. Again, how does a physical process know what is the 'correct' way to behave and in the next time step make an adjustment to it based on how far off it has been in the past? I am certainly missing something. – Mike May 14 '19 at 14:12
  • @Mike, I think there are already some related questions on this site, try looking them up. Here are a couple I found: [1](https://stats.stackexchange.com/questions/45026/), [2](https://stats.stackexchange.com/questions/107834/). If you do not find them satisfactory, you may post your own. – Richard Hardy May 14 '19 at 14:29
0

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.

forecaster
  • 7,349
  • 9
  • 43
  • 81
IrishStat
  • 27,906
  • 5
  • 29
  • 55
  • 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. – whuber Aug 05 '15 at 21:16
  • 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. – Ricardo Magalhães Cruz Aug 05 '15 at 21:39
  • .5*8+-.5*(-4)=2 – IrishStat Aug 06 '15 at 00:04
  • 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. – forecaster Aug 06 '15 at 03:56