# Specify Conditional Variance Model Innovation Distribution

In Econometrics Toolbox™, the general form of the innovation process ${\epsilon }_{\mathit{t}}$ is

`${\epsilon }_{\mathit{t}}={\sigma }_{\mathit{t}}{\mathit{z}}_{\mathit{t}}.$`

A conditional variance model specifies the parametric form of the conditional variance process ${\sigma }_{\mathit{t}}^{2}$. The innovation distribution corresponds to the distribution of the iid process ${\mathit{z}}_{\mathit{t}}$.

For the distribution of ${\mathit{z}}_{\mathit{t}}$, you can choose a standardized Gaussian or standardized Student’s $\mathit{t}$ distribution with $\nu >2$ degrees of freedom. Note that if ${\mathit{z}}_{\mathit{t}}$ follows a standardized $\mathit{t}$ distribution,

${\mathit{z}}_{\mathit{t}}=\sqrt{\frac{\nu -2}{\nu }}{\mathit{T}}_{\nu }$,

where ${\mathit{T}}_{\nu }$ follows a Student’s $\nu$ distribution with $\nu >2$ degrees of freedom.

The $\mathit{t}$ distribution is useful for modeling time series with more extreme values than expected under a Gaussian distribution. Series with larger values than expected under normality are said to have excess kurtosis.

It is good practice to assess the distributional properties of model residuals to determine if a Gaussian innovation distribution (the default distribution) is appropriate for your data.

The property `Distribution` in a model stores the distribution name (and degrees of freedom for the $\mathit{t}$ distribution). The data type of `Distribution` is a struct array. For a Gaussian innovation distribution, the data structure has only one field: `Name`. For a Student’s $\mathit{t}$ distribution, the data structure must have two fields:

• `Name`, with value `"t"`

• `DoF`, with a scalar value larger than 2 (`NaN` is the default value)

If the innovation distribution is Gaussian, you do not need to assign a value to `Distribution`. `garch`, `egarch`, and `gjr` create the required data structure.

### Specify GARCH Model with Gaussian Innovations

Specify a GARCH(1,1) model by using the shorthand syntax of the `garch` function.

`Mdl = garch(1,1)`
```Mdl = garch with properties: Description: "GARCH(1,1) Conditional Variance Model (Gaussian Distribution)" SeriesName: "Y" Distribution: Name = "Gaussian" P: 1 Q: 1 Constant: NaN GARCH: {NaN} at lag [1] ARCH: {NaN} at lag [1] Offset: 0 ```

The model output shows that `Distribution` is a struct array containing the field `Name` with value `"Gaussian"`.

When you specify a Student’s $\mathit{t}$ innovation distribution, you can specify an unknown (`NaN`) or a real number greater than 2. If the degrees of freedom are unknown, you can assign `Distribution` the value `"t"`. By default, `Distribution` is a structure array with field `Name` equal to `"t"`, and field `DoF` equal to `NaN`. When you pass the model to the `estimate` function, MATLAB® estimates the degrees of freedom with all other unknown model parameters.

### Specify GJR Model with Student's t Innovations

Specify a GJR(2,1) model with an iid Student’s $\mathit{t}$ innovation distribution, with unknown degrees of freedom, by using the longhand syntax of the `gjr` function.

`GJRMdl = gjr(GARCHLags=1:2,ARCHLags=1,LeverageLags=1,Distribution="t")`
```GJRMdl = gjr with properties: Description: "GJR(2,1) Conditional Variance Model (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = NaN P: 2 Q: 1 Constant: NaN GARCH: {NaN NaN} at lags [1 2] ARCH: {NaN} at lag [1] Leverage: {NaN} at lag [1] Offset: 0 ```

The output shows that `Distribution` is a structure array with two fields. Field `Name` has the value `"t"` and field `DoF` has the value NaN.

If the degrees of freedom parameter is known, and you want to set an equality constraint during estimation, assign a structure array to `Distribution` with fields `Name` and `DoF`. In this case, if you pass the model to `estimate`, MATLAB does not estimate the degrees of freedom parameter (in other words, `estimate` honors the equality constraint).

### Specify GARCH Model with Student's t Innovations

Specify a GARCH(1,1) model with an iid Student’s t distribution, with eight degrees of freedom, by using the longhand syntax of `garch`.

```tdist = struct("Name","t","DoF",8); GARCHMdlT = garch(GARCHLags=1,ARCHLags=1,Distribution=tdist)```
```GARCHMdlT = garch with properties: Description: "GARCH(1,1) Conditional Variance Model (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = 8 P: 1 Q: 1 Constant: NaN GARCH: {NaN} at lag [1] ARCH: {NaN} at lag [1] Offset: 0 ```

The output shows the specified innovation distribution.

### Access or Change GARCH Model Innovation Distribution Values

When a model is in the workspace, you can modify its `Distribution` property using dot notation. You cannot modify the fields of the `Distribution` structure array directly. For example, `GARCHMdl.Distribution.DoF = 8` is not a valid assignment. However, you can get the values of the individual fields.

Change the distribution of the innovation process of the GARCH model `Mdl` to a Student’s $\mathit{t}$ distribution with unknown degrees of freedom.

`Mdl.Distribution = "t"`
```Mdl = garch with properties: Description: "GARCH(1,1) Conditional Variance Model (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = NaN P: 1 Q: 1 Constant: NaN GARCH: {NaN} at lag [1] ARCH: {NaN} at lag [1] Offset: 0 ```

Change the distribution of the GARCH model `Mdl` to a $\mathit{t}$ distribution with 8 degrees of freedom by setting a structure array to the `Distribution` property.

`Mdl.Distribution = struct("Name","t","DoF",8)`
```Mdl = garch with properties: Description: "GARCH(1,1) Conditional Variance Model (t Distribution)" SeriesName: "Y" Distribution: Name = "t", DoF = 8 P: 1 Q: 1 Constant: NaN GARCH: {NaN} at lag [1] ARCH: {NaN} at lag [1] Offset: 0 ```

Display the degrees of freedom of the innovation distribution of the GARCH model `Mdl`.

`tDoF = Mdl.Distribution.DoF`
```tDoF = 8 ```

Change the distribution of the GARCH model `Mdl` back to Gaussian.

`Mdl.Distribution = "Gaussian"`
```Mdl = garch with properties: Description: "GARCH(1,1) Conditional Variance Model (Gaussian Distribution)" SeriesName: "Y" Distribution: Name = "Gaussian" P: 1 Q: 1 Constant: NaN GARCH: {NaN} at lag [1] ARCH: {NaN} at lag [1] Offset: 0 ```

The `Name` field updates to `"Gaussian"`, and `DoF` field does not exist.