Accelerating the pace of engineering and science

# garchma

Convert ARMA model to MA model

## Syntax

InfiniteMA = garchma(AR,MA,NumLags)

## Description

InfiniteMA = garchma(AR,MA,NumLags) computes the coefficients of an infinite-order MA model, using the coefficients of the equivalent univariate, stationary, invertible, finite-order ARMA(R,M) model as input. garchma truncates the infinite-order MA coefficients to accommodate the number of lagged MA coefficients you specify in NumLags.

This function is useful for calculating the standard errors of minimum mean square error forecasts of univariate ARMA models.

## Arguments

 AR R-element vector of autoregressive coefficients associated with the lagged observations of a univariate return series modeled as a finite-order, stationary, invertible ARMA(R,M) model. MA M-element vector of moving-average coefficients associated with the lagged innovations of a finite-order, stationary, invertible, univariate ARMA(R,M) model. NumLags (optional) Number of lagged MA coefficients that garchma includes in the approximation of the infinite-order MA representation. NumLags is an integer scalar and determines the length of the infinite-order MA output vector. If NumLags = [] or is unspecified, the default is 10.

## Output Arguments

 InfiniteMA Vector of coefficients of the infinite-order MA representation associated with the finite-order ARMA model specified by AR and MA. InfiniteMA is a vector of length NumLags. The jth element of InfiniteMA is the coefficient of the jth lag of the innovations noise sequence in an infinite-order MA representation. Box, Jenkins, and Reinsel refer to the infinite-order MA coefficients as the "ψ weights."

In the following ARMA(R,M) model,{yt} is the return series of interest and {εt} the innovations noise process.

${y}_{t}=\sum _{i=1}^{R}{\varphi }_{i}{y}_{t-1}+{\epsilon }_{t}\sum _{j=1}^{M}{\theta }_{j}{\epsilon }_{j-1}$

If you write this model equation as

${y}_{t}={\varphi }_{1}{y}_{t-1}+...+{\varphi }_{R}{y}_{t-R}+{\epsilon }_{t}+{\theta }_{1}{\epsilon }_{t-1}+...+{\theta }_{M}{\epsilon }_{t-M}$

you can specify the garchma input coefficient vectors, AR and MA, as you read them from the model. In general, the jth elements of AR and MA are the coefficients of the jth lag of the return series and innovations processes yt-j and εt-j, respectively. garchma assumes that the current-time-index coefficients of yt and εt are 1 and are not part of AR and MA.

In theory, you can use the ψ weights returned in InfiniteMA to approximate yt as a pure MA process.

${y}_{t}={\epsilon }_{t}+\sum _{i=1}^{\infty }{\psi }_{i}{\epsilon }_{t-i}$

The jth element of the truncated infinite-order moving-average output vector, ψj or InfiniteMA(j), is consistently the coefficient of the jth lag of the innovations process, εt-j, in this equation. See Box, Jenkins, and Reinsel [15], Section 5.2.2, pages 139-141.

## Examples

### Convert an ARMA Model to an MA Model

Calculate a forecast horizon of 10 periods for the following ARMA(2,2) model:

${y}_{t}=0.5{y}_{t-1}-0.8{y}_{t-2}+{\epsilon }_{t}-0.6{\epsilon }_{t-1}+0.08{\epsilon }_{t-2}$

To obtain probability limits for these forecasts, use garchma to compute the first 9 (that is, 10 - 1) weights of the infinite order MA approximation.

```PSI = garchma([0.5 -0.8], [-0.6 0.08], 9)'
```
```PSI =

-0.1000
-0.7700
-0.3050
0.4635
0.4758
-0.1329
-0.4471
-0.1172
0.2991

```

From the model, AR = [0.5 -0.8] and MA = [-0.6 0.08].

 Note:   Since the current-time-index coefficients of yt and εt are 1, the example omits them from AR and MA. This saves time and effort when you specify parameters via dot notation on a garch model.

## References

[1] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.