www.gusucode.com > econ 案例源码程序 matlab代码 > econ/GJRModelwithaMeanOffsetExample.m

    %% Specify GJR Model with Mean Offset  
% This example shows how to specify a GJR(_P_, _Q_) model with a mean offset.
% Use name-value pair arguments to specify a model that differs from the default
% model.   

% Copyright 2015 The MathWorks, Inc.


%% 
% Specify a GJR(1,1) model with a mean offset, 
%
% $$y_t = \mu + \varepsilon_t,$$
%
% where $\varepsilon_t = \sigma_t z_t$ and 
%
% $$\sigma _t^2 = \kappa  + {\gamma _1}\sigma _{t - 1}^2 + {\alpha _1}\varepsilon _{t - 1}^2 + {\xi _1}I\left[ {{\varepsilon _{t - 1}} < 0} \right]\varepsilon _{t - 1}^2.$$
%
Mdl = gjr('Offset',NaN,'GARCHLags',1,'ARCHLags',1,...
    'LeverageLags',1) 

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