Moving Average Models

Quick Summary

Moving Average Models

Once the data is made stationary (or if the data is stationary by default) we can move into a class of models called stationary models. One of the other common stationary models beyond AR models is the moving average (MA) model.

Often you can forecast a series based solely on the past error values of the data. This kind of model is better for describing events whose effect last for only a short period of time. We are going to start by focusing on the most basic case with only one error lag value of \(e_t\), called the MA(1) model:

\[ Y_t = \omega + \theta e_{t-1} + e_t \]

where \(e_t\) is the error remaining in the model and assumed to by white noise as defined in the previous section on stationarity.

With the MA(1) model, this relationship between t and t-1 exists for all one time period differences across the dataset. However, we can write out a series of these models to see the individual “shocks” only last for a short period of time. Let’s look at three consecutive models:

\[ Y_{t-1} = \omega + \theta e_{t-2} + e_{t-1} \]

\[ Y_{t} = \omega + \theta e_{t-1} + e_{t} \]

\[ Y_{t+1} = \omega + \theta e_{t} + e_{t+1} \]

We can see that the effect of shocks that happened in the previous time point are no longer felt by the next future time point. Notice how the impact of \(e_{t-1}\) is gone by \(Y_{t+1}\) in the MA(1) model. This goes back to our idea of this being a stationary model. The dependence of previous “shocks” disappear over time.

Correlation Functions

For data that follows an MA(1) structure, there are specific patterns we see in the autocorrelation and partial autocorrelation function. For a review of these functions, please see the previous section on correlation functions. With an MA(1) structure to our data, the autocorrelation function (ACF) has a significant spike at the number one lag in the model, followed by nothing after. The partial autocorrelation function (PACF) decreases exponentially as the number of lags increases.

Let’s imagine our data follows the following MA(1) process:

\[ Y_t = 0 + 0.8 e_{t-1} + e_t \]

The following plots would be be the ACF and PACF of the data that follows the above structure.

In the ACF plot on the left above, the first lag takes a value of \(0.8\) followed by nothing afterwards because the following lags have no impact on the current period. For the PACF plot, the values of the correlation decrease as time goes on.

MA(q) Model

This moving average model can be extended to include \(q\) lags instead of just one lag:

\[ Y_t = \omega + \theta_1 e_{t-1} + \theta_2 e_{t-2} + \cdots + \theta_p e_{t-q} + e_t \]

With a moving average structure to our data, the partial autocorrelation function (PACF) decreases exponentially in the long run as the number of lags increases but with a variety of patterns. The autocorrelation function (ACF) has a significant spike up to \(q\) lags in the model, followed by nothing after.

The stationarity assumption still holds for this model as well because the impacts of error lags do not last forever.

Let’s see how to build this in each of our softwares!