Autoregressive moving average model

Jump to navigation Jump to search

Editor-In-Chief: C. Michael Gibson, M.S., M.D. [1]


Overview

In statistics, autoregressive moving average (ARMA) models, sometimes called Box-Jenkins models after the iterative Box-Jenkins methodology usually used to estimate them, are typically applied to time series data.

Given a time series of data Xt, the ARMA model is a tool for understanding and, perhaps, predicting future values in this series. The model consists of two parts, an autoregressive (AR) part and a moving average (MA) part. The model is usually then referred to as the ARMA(p,q) model where p is the order of the autoregressive part and q is the order of the moving average part (as defined below).

Autoregressive model

The notation AR(p) refers to the autoregressive model of order p. The AR(p) model is written

<math> X_t = c + \sum_{i=1}^p \varphi_i X_{t-i}+ \varepsilon_t .\,</math>

where <math>\varphi_1, \ldots, \varphi_p</math> are the parameters of the model, <math>c</math> is a constant and <math>\varepsilon_t</math> is an error term (see below). The constant term is omitted by many authors for simplicity.

An autoregressive model is essentially an infinite impulse response filter with some additional interpretation placed on it.

Some constraints are necessary on the values of the parameters of this model in order that the model remains stationary. For example, processes in the AR(1) model with |φ1| > 1 are not stationary.

Example: An AR(1)-process

An AR(1)-process is given by:

<math>X_t = c + \varphi X_{t-1}+\varepsilon_t,\,</math>

where <math>\varepsilon_t</math> is a white noise process with zero mean and variance <math>\sigma^2</math>. (Note: The subscript on <math>\varphi_1</math> has been dropped.) The process is covariance-stationary if <math>|\varphi|<1</math>. If <math>\varphi=1</math> then <math>X_t</math> exhibits a unit root and can also be considered as a random walk, which is not covariance-stationary. Otherwise, the calculation of the expectation of <math>X_t</math> is straightforward. Assuming covariance-stationarity we get

<math>\mbox{E}(X_t)=\mbox{E}(c)+\varphi\mbox{E}(X_{t-1})+\mbox{E}(\varepsilon_t)\Rightarrow \mu=c+\varphi\mu+0.</math>

thus:

<math>\mu=\frac{c}{1-\varphi},</math>

where <math>\mu</math> is the mean. For c = 0, then the mean = 0 and the variance is found to be:

<math>\textrm{var}(X_t)=E(X_t^2)-\mu^2=\frac{\sigma^2}{1-\varphi^2}.</math>

The autocovariance is given by

<math>B_n=E(X_{t+n}X_t)-\mu^2=\frac{\sigma^2}{1-\varphi^2}\,\,\varphi^{|n|}.</math>

It can be seen that the autocovariance function decays with a decay time of <math>\tau=-1/\ln(\varphi)</math> [to see this, write <math>B_n=K\phi^{|n|}</math> where <math>K</math> is independent of <math>n</math>. Then note that <math>\phi^{|n|}=e^{|n|\ln\phi}</math> and match this to the exponential decay law <math>e^{-n/\tau}</math>] The spectral density function is the Fourier transform of the autocovariance function. In discrete terms this will be the discrete-time Fourier transform:

<math>\Phi(\omega)=

\frac{1}{\sqrt{2\pi}}\,\sum_{n=-\infty}^\infty B_n e^{-i\omega n} =\frac{1}{\sqrt{2\pi}}\,\left(\frac{\sigma^2}{1+\varphi^2-2\varphi\cos(\omega)}\right). </math>

This expression contains aliasing due to the discrete nature of the <math>X_j</math>, which is manifested as the cosine term in the denominator. If we assume that the sampling time (<math>\Delta t=1</math>) is much smaller than the decay time (<math>\tau</math>), then we can use a continuum approximation to <math>B_n</math>:

<math>B(t)\approx \frac{\sigma^2}{1-\varphi^2}\,\,\varphi^{|t|}</math>

which yields a Lorentzian profile for the spectral density:

<math>\Phi(\omega)=

=\frac{1}{\sqrt{2\pi}}\,\frac{\sigma^2}{1-\varphi^2}\,\frac{\gamma}{\pi(\gamma^2+\omega^2)}</math>

where <math>\gamma=1/\tau</math> is the angular frequency associated with the decay time <math>\tau</math>.

An alternative expression for <math>X_t</math> can be derived by first substituting <math>c+\varphi X_{t-2}+\varepsilon_{t-1}</math> for <math>X_{t-1}</math> in the defining equation. Continuing this process N times yields

<math>X_t=c\sum_{k=0}^{N-1}\varphi^k+\varphi^NX_{t-N}+\sum_{k=0}^{N-1}\varphi^k\varepsilon_{t-k}.</math>

For N approaching infinity, <math>\varphi^N</math> will approach zero and:

<math>X_t=\frac{c}{1-\varphi}+\sum_{k=0}^\infty\varphi^k\varepsilon_{t-k}.</math>

It is seen that <math>X_t</math> is white noise convolved with the <math>\varphi^k</math> kernel plus the constant mean. By the central limit theorem, the <math>X_t</math> will be normally distributed as will any sample of <math>X_t</math> which is much longer than the decay time of the autocorrelation function.

Calculation of the AR parameters

The AR(p) model is given by the equation

<math> X_t = \sum_{i=1}^p \varphi_i X_{t-i}+ \varepsilon_t.\,</math>

It is based on parameters <math>\varphi_i</math> where i = 1, ..., p. Those parameters may be calculated using least squares regression or the Yule-Walker equations:

<math>

\gamma_m = \sum_{k=1}^p \varphi_k \gamma_{m-k} + \sigma_\varepsilon^2\delta_m </math>

where m = 0, ... , p, yielding p + 1 equations. <math>\gamma_m</math> is the autocorrelation function of X, <math>\sigma_\varepsilon</math> is the standard deviation of the input noise process, and δm is the Kronecker delta function.

Because the last part of the equation is non-zero only if m = 0, the equation is usually solved by representing it as a matrix for m > 0, thus getting equation

<math>\begin{bmatrix}

\gamma_1 \\ \gamma_2 \\ \gamma_3 \\ \vdots \\ \end{bmatrix}

=

\begin{bmatrix} \gamma_0 & \gamma_{-1} & \gamma_{-2} & \dots \\ \gamma_1 & \gamma_0 & \gamma_{-1} & \dots \\ \gamma_2 & \gamma_{1} & \gamma_{0} & \dots \\ \dots & \dots & \dots & \dots \\ \end{bmatrix}

\begin{bmatrix} \varphi_{1} \\ \varphi_{2} \\ \varphi_{3} \\

\vdots \\

\end{bmatrix}

</math>

solving all <math>\varphi</math>. For m = 0 have

<math>

\gamma_0 = \sum_{k=1}^p \varphi_k \gamma_{-k} + \sigma_\varepsilon^2 </math>

which allows us to solve <math>\sigma_\varepsilon^2</math>.

Derivation

The equation defining the AR process is

<math> X_t = \sum_{i=1}^p \varphi_i\,X_{t-i}+ \varepsilon_t.\,</math>

Multiplying both sides by Xt − m and taking expected value yields

<math>E[X_t X_{t-m}] = E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]+ E[\varepsilon_t X_{t-m}].</math>

Now, E[XtXt − m] = γm by definition of the autocorrelation function. The values of the noise function are independent of each other, and Xt − m is independent of εt where m is greater than zero. For m > 0, E[εtXt − m] = 0. For m = 0,

<math>E[\varepsilon_t X_{t}]

= E\left[\varepsilon_t \left(\sum_{i=1}^p \varphi_i\,X_{t-i}+ \varepsilon_t\right)\right] = \sum_{i=1}^p \varphi_i\, E[\varepsilon_t\,X_{t-i}] + E[\varepsilon_t^2] = 0 + \sigma_\varepsilon^2, </math>

Now we have, for m ≥ 0,

<math>\gamma_m = E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right] + \sigma_\varepsilon^2 \delta_m.</math>

Furthermore,

<math>E\left[\sum_{i=1}^p \varphi_i\,X_{t-i} X_{t-m}\right]

= \sum_{i=1}^p \varphi_i\,E[X_{t} X_{t-m+i}] = \sum_{i=1}^p \varphi_i\,\gamma_{m-i}, </math>

which yields the Yule-Walker equations:

<math>\gamma_m = \sum_{i=1}^p \varphi_i \gamma_{m-i} + \sigma_\varepsilon^2 \delta_m.</math>

for m ≥ 0. For m < 0,

<math>\gamma_m = \gamma_{-m} = \sum_{i=1}^p \varphi_i \gamma_{|m|-i} + \sigma_\varepsilon^2 \delta_m.</math>

Moving average model

The notation MA(q) refers to the moving average model of order q:

<math> X_t = \varepsilon_t + \sum_{i=1}^q \theta_i \varepsilon_{t-i}\,</math>

where the θ1, ..., θq are the parameters of the model and the εt, εt-1,... are again, the error terms. The moving average model is essentially a finite impulse response filter with some additional interpretation placed on it.

Autoregressive moving average model

The notation ARMA(p, q) refers to the model with p autoregressive terms and q moving average terms. This model contains the AR(p) and MA(q) models,

<math> X_t = \varepsilon_t + \sum_{i=1}^p \varphi_i X_{t-i} + \sum_{i=1}^q \theta_i \varepsilon_{t-i}.\,</math>

Note about the error terms

The error terms εt are generally assumed to be independent identically-distributed random variables (i.i.d.) sampled from a normal distribution with zero mean: εt ~ N(0,σ2) where σ2 is the variance. These assumptions may be weakened but doing so will change the properties of the model. In particular, a change to the i.i.d. assumption would make a rather fundamental difference.

Specification in terms of lag operator

In some texts the models will be specified in terms of the lag operator L. In these terms then the AR(p) model is given by

<math> \varepsilon_t = \left(1 - \sum_{i=1}^p \varphi_i L^i\right) X_t = \varphi X_t\,</math>

where φ represents the polynomial

<math> \varphi = 1 - \sum_{i=1}^p \varphi_i L^i.\,</math>

The MA(q) model is given by

<math> X_t = \left(1 + \sum_{i=1}^q \theta_i L^i\right) \varepsilon_t = \theta \varepsilon_t\,</math>

where θ represents the polynomial

<math> \theta= 1 + \sum_{i=1}^q \theta_i L^i.\,</math>

Finally, the combined ARMA(p, q) model is given by

<math> \left(1 - \sum_{i=1}^p \varphi_i L^i\right) X_t = \left(1 + \sum_{i=1}^q \theta_i L^i\right) \varepsilon_t\,</math>

or more concisely,

<math> \varphi X_t = \theta \varepsilon_t.\,</math>

Fitting models

ARMA models in general can, after choosing p and q, be fitted by least squares regression to find the values of the parameters which minimize the error term. It is generally considered good practice to find the smallest values of p and q which provide an acceptable fit to the data. For a pure AR model the Yule-Walker equations may be used to provide a fit.

Applications

ARMA is appropriate when a system is a function of a series of unobserved shocks (the MA part) as well as its own behavior. For example, stock prices may be shocked by fundamental information as well as exhibiting technical trending and mean-reversion effects due to market participants.

Generalizations

The dependence of Xt on past values and the error terms εt is assumed to be linear unless specified otherwise. If the dependence is nonlinear, the model is specifically called a nonlinear moving average (NMA), nonlinear autoregressive (NAR), or nonlinear autoregressive moving average (NARMA) model.

Autoregressive moving average models can be generalized in other ways. See also autoregressive conditional heteroskedasticity (ARCH) models and autoregressive integrated moving average (ARIMA) models. If multiple time series are to be fitted then a vector ARIMA (or VARIMA) model may be fitted. If the time-series in question exhibits long memory then fractional ARIMA (FARIMA, sometimes called ARFIMA) modelling is appropriate. If the data is thought to contain seasonal effects, it may be modeled by a SARIMA (seasonal ARIMA) or a periodic ARMA model.

Another generalization is the multiscale autoregressive (MAR) model. A MAR model is indexed by the nodes of a tree, whereas a standard (discrete time) autoregressive model is indexed by integers. See multiscale autoregressive model for a list of references.


Autoregressive moving average model with exogenous inputs model (ARMAX model)

The notation ARMAX(p, q, b) refers to the model with p autoregressive terms, q moving average terms and b eXogenous inputs terms. This model contains the AR(p) and MA(q) models and a linear combination of the last b terms of a known and external time series <math>d_t</math>. It is given by:

<math> X_t = \varepsilon_t + \sum_{i=1}^p \varphi_i X_{t-i} + \sum_{i=1}^q \theta_i \varepsilon_{t-i} + \sum_{i=1}^b \eta_i d_{t-i}.\,</math>

where <math>\eta_1, \ldots, \eta_b</math> are the parameters of the exogenous input <math>d_t</math>.

See also

References

  • George Box, Gwilym M. Jenkins, and Gregory C. Reinsel. Time Series Analysis: Forecasting and Control, third edition. Prentice-Hall, 1994.
  • Mills, Terence C. Time Series Techniques for Economists. Cambridge University Press, 1990.
  • Percival, Donald B. and Andrew T. Walden. Spectral Analysis for Physical Applications. Cambridge University Press, 1993.

External links


Template:WikiDoc Sources