%% Specify EGARCH Model with t Innovation Distribution
% This example shows how to specify an EGARCH model with a Student's t innovation distribution.
% Specify an EGARCH(1,1) model with a mean offset,
% y_t = \mu + \varepsilon_t,
% where \varepsilon_t = \sigma_t z_t and
% \log \sigma _t^2 = \kappa  + {\gamma _1}\log \sigma _{t - 1}^2 + {\alpha _1}\left[ {\frac{{\left| {{\varepsilon _{t - 1}}} \right|}}{{{\sigma _{t - 1}}}} - E\left\{ {\frac{{\left| {{\varepsilon _{t - 1}}} \right|}}{{{\sigma _{t - 1}}}}} \right\}} \right] + {\xi _1}\left( {\frac{{{\varepsilon _{t - 1}}}}{{{\sigma _{t - 1}}}}} \right).
% Assume z_{t} follows a Student's t innovation distribution with 10 degrees of freedom.

tDist = struct('Name','t','DoF',10);
Mdl = egarch('Offset',NaN,'GARCHLags',1,'ARCHLags',1,...
    'LeverageLags',1,'Distribution',tDist)

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