MATLAB Examples

# Nonmodifiable Properties

Not all model properties are modifiable. You cannot change these properties in an existing model:

• P. This property updates automatically when the lag corresponding to the largest nonzero GARCH term changes.
• Q. This property updates automatically when the lag corresponding to the largest nonzero ARCH or leverage term changes.

Not all name-value pair arguments you can use for model creation are properties of the created model. Specifically, you can specify the arguments GARCHLags and ARCHLags (and LeverageLags for EGARCH and GJR models) during model creation. These are not, however, properties of garch, egarch, or gjr model. This means you cannot retrieve or modify them in an existing model.

The ARCH, GARCH, and leverage lags update automatically if you add any elements to (or remove from) the coefficient cell arrays GARCH, ARCH, or Leverage.

For example, specify an EGARCH(1,1) model:

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

The model output shows nonzero GARCH, ARCH, and leverage coefficients at lag 1.

Add a new GARCH coefficient at lag 3:

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

The nonzero GARCH coefficients at lags 1 and 3 now display in the model output. However, the cell array assigned to GARCH returns three elements:

garchCoefficients = Mdl.GARCH 
garchCoefficients = 1x3 cell array {[NaN]} {[0]} {[NaN]} 

GARCH has a zero coefficient at lag 2 to maintain consistency with traditional MATLAB® cell array indexing.