# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# egarch

Create EGARCH conditional variance model object

Create an `egarch` model object to represent an exponential generalized autoregressive conditional heteroscedastic (EGARCH) model. The EGARCH(P,Q) conditional variance model includes P past log conditional variances composing the GARCH polynomial, and Q past standardized innovations composing the ARCH and leverage polynomials.

Use `egarch` to create a model with known or unknown coefficients, and then estimate any unknown coefficients from data using `estimate`. You can also simulate or forecast conditional variances from fully specified models using `simulate` or `forecast`, respectively.

For more information about `egarch` model objects, see `egarch`.

## Syntax

``Mdl = egarch``
``Mdl = egarch(P,Q)``
``Mdl = egarch(Name,Value)``

## Description

example

````Mdl = egarch` creates a zero-degree conditional variance EGARCH model object.```

example

````Mdl = egarch(P,Q)` creates an EGARCH model with GARCH polynomial degree `P`, and ARCH and leverage polynomials having degree `Q`.```

example

````Mdl = egarch(Name,Value)` creates an EGARCH model with additional options specified by one or more `Name,Value` pair arguments. For example, you can specify a conditional variance model constant, the number of ARCH polynomial lags, and the innovation distribution.```

## Examples

collapse all

Create a default `egarch` model object and specify its parameter values using dot notation.

Create an EGARCH(0,0) model.

`Mdl = egarch`
```Mdl = EGARCH(0,0) Conditional Variance Model: ----------------------------------------- Distribution: Name = 'Gaussian' P: 0 Q: 0 Constant: NaN GARCH: {} ARCH: {} Leverage: {} ```

`Mdl` is an `egarch` model. It contains an unknown constant, its offset is `0`, and the innovation distribution is `'Gaussian'`. The model does not have GARCH, ARCH, or leverage polynomials.

Specify two unknown ARCH and leverage coefficients for lags one and two using dot notation.

```Mdl.ARCH = {NaN NaN}; Mdl.Leverage = {NaN NaN}; Mdl```
```Mdl = EGARCH(0,2) Conditional Variance Model: ----------------------------------------- Distribution: Name = 'Gaussian' P: 0 Q: 2 Constant: NaN GARCH: {} ARCH: {NaN NaN} at Lags [1 2] Leverage: {NaN NaN} at Lags [1 2] ```

The `Q`, `ARCH`, and `Leverage` properties update to `2`, `{NaN NaN}`, `{NaN NaN}`, respectively. The two ARCH and leverage coefficients are associated with lags 1 and 2.

Create an `egarch` model object using the shorthand notation `egarch(P,Q)`, where `P` is the degree of the GARCH polynomial and `Q` is the degree of the ARCH and leverage polynomial.

Create an EGARCH(3,2) model.

`Mdl = egarch(3,2)`
```Mdl = EGARCH(3,2) Conditional Variance Model: ----------------------------------------- Distribution: Name = 'Gaussian' P: 3 Q: 2 Constant: NaN GARCH: {NaN NaN NaN} at Lags [1 2 3] ARCH: {NaN NaN} at Lags [1 2] Leverage: {NaN NaN} at Lags [1 2] ```

`Mdl` is an `egarch` model object. All properties of `Mdl`, except `P`, `Q`, and `Distribution`, are `NaN` values. By default, the software:

• Includes a conditional variance model constant

• Excludes a conditional mean model offset (i.e., the offset is `0`)

• Includes all lag terms in the GARCH polynomial up to lag `P`

• Includes all lag terms in the ARCH and leverage polynomials up to lag `Q`

`Mdl` specifies only the functional form of an EGARCH model. Because it contains unknown parameter values, you can pass `Mdl` and time-series data to `estimate` to estimate the parameters.

Create an `egarch` model object using name-value pair arguments.

Specify an EGARCH(1,1) model. By default, the conditional mean model offset is zero. Specify that the offset is `NaN`. Include a leverage term.

`Mdl = egarch('GARCHLags',1,'ARCHLags',1,'LeverageLags',1,'Offset',NaN)`
```Mdl = EGARCH(1,1) Conditional Variance Model with Offset: ----------------------------------------------------- Distribution: Name = 'Gaussian' P: 1 Q: 1 Constant: NaN GARCH: {NaN} at Lags [1] ARCH: {NaN} at Lags [1] Leverage: {NaN} at Lags [1] Offset: NaN ```

`Mdl` is an `egarch` model object. The software sets all parameters to `NaN`, except `P`, `Q`, and `Distribution`.

Since `Mdl` contains `NaN` values, `Mdl` is appropriate for estimation only. Pass `Mdl` and time-series data to `estimate`. For a continuation of this example, see Estimate EGARCH Model.

Create an EGARCH(1,1) model with mean offset,

where

and is an independent and identically distributed standard Gaussian process.

```Mdl = egarch('Constant',0.0001,'GARCH',0.75,... 'ARCH',0.1,'Offset',0.5,'Leverage',{-0.3 0 0.01})```
```Mdl = EGARCH(1,3) Conditional Variance Model with Offset: ----------------------------------------------------- Distribution: Name = 'Gaussian' P: 1 Q: 3 Constant: 0.0001 GARCH: {0.75} at Lags [1] ARCH: {0.1} at Lags [1] Leverage: {-0.3 0.01} at Lags [1 3] Offset: 0.5 ```

`egarch` assigns default values to any properties you do not specify with name-value pair arguments. An alternative way to specify the leverage component is `'Leverage',{-0.3 0.01},'LeverageLags',[1 3]`.

## Input Arguments

collapse all

Number of past consecutive, logged conditional variance terms to include in the GARCH polynomial, specified as a nonnegative integer. That is, `P` is the degree of the GARCH polynomial, where the polynomial includes each lag term from t – 1 to t`P`.

You can specify `P` using the `egarch``(P,Q)` shorthand syntax only. You cannot specify `P` in conjunction with `Name,Value` pair arguments.

If `P` > 0, then you must specify `Q` as a positive integer.

Example: `egarch(3,2)`

Data Types: `double`

Number of past consecutive standardized innovation terms to include in the ARCH and leverage polynomials, specified as a nonnegative integer. That is, `Q` is the degree of the ARCH and leverage polynomials, where each polynomial includes each lag term from t – 1 to t`Q`. Also, `Q` specifies the minimum number of presample innovations the software requires to initiate the model.

You can specify this property when using the `egarch``(P,Q)` shorthand syntax only. You cannot specify `Q` in conjunction with `Name,Value` pair arguments.

If `P` > 0, then you must specify `Q` as a positive integer.

Example: `egarch(3,2)`

Data Types: `double`

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside single quotes (`' '`). You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: `'Constant',0.5,'ARCHLags',2,'Distribution',struct('Name','t','DoF',5)` specifies a conditional variance model constant of 0.5, two standardized innovation terms at lags 1 and 2 of the ARCH polynomial (but no leverage terms), and a t distribution with 5 degrees of freedom for the innovations.

collapse all

Conditional variance model constant, specified as the comma-separated pair consisting of `'Constant'` and a scalar.

Example: `'Constant',-0.5`

Data Types: `double`

Coefficients corresponding to the past logged conditional variance terms that compose the GARCH polynomial, specified as the comma-separated pair consisting of `'GARCH'` and a cell vector of scalars.

If you specify `GARCHLags`, then `GARCH` is an equivalent-length cell vector of coefficients associated with the lags in `GARCHLags`. Otherwise, `GARCH` is a P-element cell vector of coefficients corresponding to lags 1, 2,..., P.

The coefficients must compose a stationary GARCH polynomial. For details, see EGARCH Model.

By default, `GARCH` is a cell vector of `NaN`s of length P (the degree of the GARCH polynomial) or `numel(GARCHLags)`.

Example: `'GARCH',{0.1 0 0 0.02}`

Data Types: `cell`

Coefficients corresponding to the magnitude of the past standardized innovation terms that compose the ARCH polynomial, specified as the comma-separated pair consisting of `'ARCH'` and a cell vector of scalars.

If you do not specify `ARCHLags`, then `ARCH` is a cell vector of coefficients corresponding to lags 1 through the number of elements in `ARCH`.

If you specify `ARCHLags`, then `ARCH` is an equivalent-length cell vector of coefficients associated with the lags in `ARCHLags`.

By default, `ARCH` is a cell vector of `NaN`s with the same length as the ARCH polynomial degree or `numel(ARCHLags)`.

Example: `'ARCH',{0.5 0 0.2}`

Data Types: `cell`

Coefficients corresponding to the past standardized innovation terms that compose the leverage polynomial, specified as the comma-separated pair consisting of `'Leverage'` and a cell vector of scalars.

If you specify `LeverageLags`, then `Leverage` is an equivalent-length cell vector of coefficients associated with the lags in `LeverageLags`. Otherwise, `Leverage` is a cell vector of coefficients corresponding to lags 1 through the number of elements in `Leverage`.

By default, `Leverage` is a cell vector of `NaN`s with the same length as the leverage polynomial degree or `numel(LeverageLags)`.

Example: `'Leverage',{-0.1 0 0 0.03}`

Innovation mean model offset or additive constant, specified as the comma-separated pair consisting of `'Offset'` and a scalar.

Example: `'Offset',0.1`

Data Types: `double`

Lags associated with the GARCH polynomial coefficients, specified as the comma-separated pair consisting of `'GARCHLags'` and a vector of positive integers. The maximum value of `GARCHLags` determines P, the GARCH polynomial degree.

If you specify `GARCH`, then `GARCHLags` is an equivalent-length vector of positive integers specifying the lags of the corresponding coefficients in `GARCH`. Otherwise, `GARCHLags` indicates the lags of unknown coefficients in the GARCH polynomial.

By default, `GARCHLags` is a vector containing the integers 1 through P.

Example: `'GARCHLags',[1 2 4 3]`

Data Types: `double`

Lags associated with the ARCH polynomial coefficients, specified as the comma-separated pair consisting of `'ARCHLags'` and a vector of positive integers. The maximum value of `ARCHLags` determines the ARCH polynomial degree.

If you specify `ARCH`, then `ARCHLags` is an equivalent-length vector of positive integers specifying the lags of the corresponding coefficients in `ARCH`. Otherwise, `ARCHLags` indicates the lags of unknown coefficients in the ARCH polynomial.

By default, `ARCHLags` is a vector containing the integers 1 through the ARCH polynomial degree.

Example: `'ARCHLags',[3 1 2]`

Data Types: `double`

Lags associated with the leverage polynomial coefficients, specified as the comma-separated pair consisting of `'LeverageLags'` and a vector of positive integers. The maximum value of `LeverageLags` determines the leverage polynomial degree.

If you specify `Leverage`, then `LeverageLags` is an equivalent-length vector of positive integers specifying the lags of the corresponding coefficients in `LeverageLags`. Otherwise, `LeverageLags` indicates the lags of unknown coefficients in the leverage polynomial.

By default, `LeverageLags` is a vector containing the integers 1 through the leverage polynomial degree.

Example: `'LeverageLags',1:4`

Data Types: `double`

Conditional probability distribution of the innovation process, specified as the comma-separated pair consisting of `'Distribution'` and a value in this table.

DistributionValueStructure Array
Gaussian`'Gaussian'``struct('Name','Gaussian')`
Student’s t
 `'t'` By default, `DoF` is `NaN`.
 `struct('Name','t','DoF',DoF)` `DoF` > 2 or `DoF` = `NaN`

Example: `'Distribution',struct('Name','t','DoF',10)`

Data Types: `char` | `struct`

### Notes:

• All `GARCH`, `ARCH` and `Leverage` coefficients are subject to a near-zero tolerance exclusion test. That is, the software:

1. Creates lag operator polynomials for each of the `GARCH`, `ARCH` and `Leverage` components.

2. Compares each coefficient to the default lag operator zero tolerance, `1e-12`.

3. Includes a coefficient in the model if its magnitude is greater than `1e-12`, and excludes the coefficient otherwise. In other words, the software considers excluded coefficients to be sufficiently close to zero.

For details, see `LagOp`.

• The lengths of `ARCH` and `Leverage` might differ. The difference can occur because the software defines the property `Q` as the largest lag associated with nonzero `ARCH` and `Leverage` coefficients, or `max(ARCHLags,LeverageLags)`. Typically, the number and corresponding lags of nonzero `ARCH` and `Leverage` coefficients are equivalent, but this is not a requirement.

## Output Arguments

collapse all

EGARCH model, returned as an `egarch` model object.

For the property descriptions of `Mdl`, see Conditional Variance Model Properties.

If `Mdl` contains unknown parameters (indicated by `NaN`s), then you can specify them using dot notation. Alternatively, you can pass `Mdl` and time series data to `estimate` to obtain estimates.

If `Mdl` is fully specified, then you can simulate or forecast conditional variances using `simulate` or `forecast`, respectively.

collapse all

### EGARCH Model

An EGARCH model is an innovations process that addresses conditional heteroscedasticity. Specifically, the model posits that the current conditional variance is the sum of these linear processes:

• Past logged conditional variances (the GARCH component or polynomial)

• Magnitudes of past standardized innovations (the ARCH component or polynomial)

• Past standardized innovations (the leverage component or polynomial)

Consider the time series

`${y}_{t}=\mu +{\epsilon }_{t},$`
where ${\epsilon }_{t}={\sigma }_{t}{z}_{t}.$ The EGARCH(P,Q) conditional variance process, ${\sigma }_{t}^{2}$, has the form
`$\mathrm{log}{\sigma }_{t}^{2}=\kappa +\sum _{i=1}^{P}{\gamma }_{i}\mathrm{log}{\sigma }_{t-i}^{2}+\sum _{j=1}^{Q}{\alpha }_{j}\left[\frac{|{\epsilon }_{t-j}|}{{\sigma }_{t-j}}-E\left\{\frac{|{\epsilon }_{t-j}|}{{\sigma }_{t-j}}\right\}\right]+\sum _{j=1}^{Q}{\xi }_{j}\left(\frac{{\epsilon }_{t-j}}{{\sigma }_{t-j}}\right).$`
The table shows how the variables correspond to the properties of the `garch` model object.

VariableDescriptionProperty
μInnovation mean model constant offset`'Offset'`
κ > 0Conditional variance model constant`'Constant'`
γjGARCH component coefficients`'GARCH'`
αjARCH component coefficients`'ARCH'`
ξjLeverage component coefficients`'Leverage'`
ztSeries of independent random variables with mean 0 and variance 1`'Distribution'`

If zt is Gaussian, then

`$E\left\{\frac{|{\epsilon }_{t-j}|}{{\sigma }_{t-j}}\right\}=E\left\{|{z}_{t-j}|\right\}=\sqrt{\frac{2}{\pi }}.$`
If zt is t distributed with ν > 2 degrees of freedom, then
`$E\left\{\frac{|{\epsilon }_{t-j}|}{{\sigma }_{t-j}}\right\}=E\left\{|{z}_{t-j}|\right\}=\sqrt{\frac{\nu -2}{\pi }}\frac{\Gamma \left(\frac{\nu -1}{2}\right)}{\Gamma \left(\frac{\nu }{2}\right)}.$`
To ensure a stationary EGARCH model, all roots of the GARCH lag operator polynomial, $\left(1-{\gamma }_{1}L-\dots -{\gamma }_{P}{L}^{P}\right)$, must lie outside of the unit circle.

The EGARCH model is unique from the GARCH and GJR models because it models the logarithm of the variance. By modeling the logarithm, positivity constraints on the model parameters are relaxed. However, forecasts of conditional variances from an EGARCH model are biased, because by Jensen’s inequality,

`$E\left({\sigma }_{t}^{2}\right)\ge \mathrm{exp}\left\{E\left(\mathrm{log}{\sigma }_{t}^{2}\right)\right\}.$`

EGARCH models are appropriate when positive and negative shocks of equal magnitude do not contribute equally to volatility [1].

## Tips

• An EGARCH(1,1) specification is complex enough for most applications. Typically in these models, the GARCH and ARCH coefficients are positive, and the leverage coefficients are negative. If you get these signs, then large unanticipated downward shocks increase the variance. If you get signs opposite to those expected, you might encounter difficulties inferring volatility sequences and forecasting. A negative ARCH coefficient is particularly problematic. In this case, an EGARCH model might not be the best choice for your application.

## References

[1] Tsay, R. S. Analysis of Financial Time Series. 3rd ed. Hoboken, NJ: John Wiley & Sons, Inc., 2010.