Accelerating the pace of engineering and science

# Documentation

## GARCH Model Specifications

### Default GARCH Model

This example shows how to use the shorthand garch(P,Q) syntax to specify the default GARCH(P, Q) model, with Gaussian innovation distribution and

By default, all parameters in the created model have unknown values.

Specify the default GARCH(1,1) model.

Mdl = garch(1,1)

Mdl =

GARCH(1,1) Conditional Variance Model:
--------------------------------------
Distribution: Name = 'Gaussian'
P: 1
Q: 1
Constant: NaN
GARCH: {NaN} at Lags [1]
ARCH: {NaN} at Lags [1]


The output shows that the created model, Mdl, has NaN values for all model parameters: the constant term, the GARCH coefficient, and the ARCH coefficient. You can modify the created model using dot notation, or input it (along with data) to estimate.

### GARCH Model with a Mean Offset

This example shows how to specify a GARCH(P, Q) model with a mean offset. Use name-value pair arguments to specify a model that differs from the default model.

Specify a GARCH(1,1) model with a mean offset,

where and

Mdl = garch('Offset',NaN,'GARCHLags',1,'ARCHLags',1)

Mdl =

GARCH(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]
Offset: NaN


The mean offset appears in the output as an additional parameter to be estimated or otherwise specified.

### GARCH Model with Nonconsecutive Lags

This example shows how to specify a GARCH model with nonzero coefficients at nonconsecutive lags.

Specify a GARCH(3,1) model with nonzero GARCH coefficients at lags 1 and 3. Include a mean offset.

Mdl = garch('Offset',NaN,'GARCHLags',[1,3],'ARCHLags',1)

Mdl =

GARCH(3,1) Conditional Variance Model with Offset:
--------------------------------------------------
Distribution: Name = 'Gaussian'
P: 3
Q: 1
Constant: NaN
GARCH: {NaN NaN} at Lags [1 3]
ARCH: {NaN} at Lags [1]
Offset: NaN


The unknown nonzero GARCH coefficients correspond to lagged variances at lags 1 and 3. The output shows only nonzero coefficients.

Display the value of GARCH.

Mdl.GARCH

ans =

[NaN]    [0]    [NaN]



The GARCH cell array returns three elements. The first and third elements have value NaN, indicating these coefficients are nonzero and need to be estimated or otherwise specified. By default, garch sets the interim coefficient at lag 2 equal to zero to maintain consistency with MATLAB® cell array indexing.

### GARCH Model with Known Parameter Values

This example shows how to specify a GARCH model with known parameter values. You can use such a fully specified model as an input to simulate or forecast.

Specify the GARCH(1,1) model

with a Gaussian innovation distribution.

Mdl = garch('Constant',0.1,'GARCH',0.7,'ARCH',0.2)

Mdl =

GARCH(1,1) Conditional Variance Model:
--------------------------------------
Distribution: Name = 'Gaussian'
P: 1
Q: 1
Constant: 0.1
GARCH: {0.7} at Lags [1]
ARCH: {0.2} at Lags [1]


Because all parameter values are specified, the created model has no NaN values. The functions simulate and forecast don't accept input models with NaN values.

### GARCH Model with t Innovation Distribution

This example shows how to specify a GARCH model with a Student's t innovation distribution.

Specify a GARCH(1,1) model with a mean offset,

where and

Assume follows a Student's t innovation distribution with eight degrees of freedom.

tdist = struct('Name','t','DoF',8);
Mdl = garch('Offset',NaN,'GARCHLags',1,'ARCHLags',1,...
'Distribution',tdist)

Mdl =

GARCH(1,1) Conditional Variance Model with Offset:
--------------------------------------------------
Distribution: Name = 't', DoF = 8
P: 1
Q: 1
Constant: NaN
GARCH: {NaN} at Lags [1]
ARCH: {NaN} at Lags [1]
Offset: NaN


The value of Distribution is a struct array with field Name equal to 't' and field DoF equal to 8. When you specify the degrees of freedom, they aren't estimated if you input the model to estimate.