%% Access EGARCH Model Properties
% Access the properties of a created egarch model object using dot notation.
% Create an egarch model object.

Mdl = egarch(3,2)

%
% Remove the second GARCH term from the model. That is, specify that the GARCH coefficient of the second lagged conditional variance is 0.

Mdl.GARCH{2} = 0

% The GARCH polynomial has two unknown parameters corresponding to lags 1 and 3.
%
% Display the distribution of the disturbances.

Mdl.Distribution

% The disturbances are Gaussian with mean 0 and variance 1.
%
% Specify that the underlying disturbances have a t distribution with five degrees of freedom.

Mdl.Distribution = struct('Name','t','DoF',5)

%
% Specify that the ARCH coefficients are 0.2 for the first lag and 0.1 for the second lag.

Mdl.ARCH = {0.2 0.1}

% To estimate the remaining parameters, you can pass Mdl and your data to estimate and use the specified parameters as equality constraints. Or, you can specify the rest of the parameter values, and then simulate or forecast conditional variances from the GARCH model by passing the fully specified model to simulate or forecast, respectively.
% Copyright 2015 The MathWorks, Inc.