function varargout = garchfit(spec, y, X, e0, s0, y0)
%GARCHFIT Univariate GARCH process parameter estimation.
% Given an observed univariate return series, estimate the parameters of a
% conditional mean specification of ARMAX form and conditional variance
% specification of GARCH, EGARCH, or GJR form. The estimation process infers
% the innovations from the return series and fits the model specification
% to the return series by maximum likelihood.
%
% [Coeff,Errors,LLF,Innovations,Sigmas,Summary] = garchfit(Series)
%
% [Coeff,Errors,LLF,Innovations,Sigmas,Summary] = garchfit(Spec, Series)
% [Coeff,Errors,LLF,Innovations,Sigmas,Summary] = garchfit(Spec, Series, X,
% PreInnovations, PreSigmas, PreSeries)
%
% garchfit(...)
%
% Optional Input: Spec, X, PreInnovations, PreSigmas, PreSeries
%
% The first calling syntax is strictly a convenience form, modeling a return
% series as a constant plus GARCH(1,1) conditionally Gaussian innovations.
% For any models beyond this default (yet common) model, a specification
% structure, Spec, must be provided.
%
% The second and third calling syntaxes allow the specification of much more
% elaborate models for the conditional mean and variance processes.
%
% The last calling syntax (with no output arguments) will perform identical
% estimation procedures as the first three, but will print the iterative
% optimization information to the MATLAB command window along with the final
% parameter estimates and standard errors. It will also produce a tiered plot
% of the original return series as well as the innovations (i.e., residuals)
% inferred, and the corresponding conditional standard deviations.
%
% Inputs:
% Series - Time series column vector of observations of the underlying
% univariate return series of interest. Series is the response variable
% representing the time series fit to conditional mean and variance
% specifications. The last row of Series holds the most recent observation.
%
% Optional Inputs:
% Spec - Structure specification for the conditional mean and variance models,
% and optimization parameters. Spec is a structure with fields created by
% calling the function GARCHSET or GARCHFIT. Type "help garchset" for details.
%
% X - Time series regression matrix of explanatory variable(s). Typically, X
% is a regression matrix of asset returns (e.g., the return series of an
% equity index). Each column of X is an individual time series used as an
% explanatory variable in the regression component of the conditional mean.
% In each column of X, the first row contains the oldest observation and
% the last row the most recent. If X is specified, the most recent number
% of valid (non-NaN) observations in each column of X must equal or exceed
% the most recent number of valid observations in Series. When the number
% of valid observations in each column of X exceeds that of Series, only
% the most recent observations of X are used. If empty or missing, the
% conditional mean will have no regression component.
%
% PreInnovations - Time series column vector of pre-sample innovations (i.e.,
% residuals) upon which the recursive mean and variance models are
% conditioned. This vector may have any number of rows, provided sufficient
% observations exist to initialize the mean and variance equations. Thus, if
% M and Q are the number of lagged innovations required by the conditional
% mean and variance equations, respectively, then the PreInnovations vector
% must have at least max(M,Q) rows. If the number of rows exceeds max(M,Q),
% then only the last (i.e., most recent) max(M,Q) rows are used as pre-sample
% observations.
%
% PreSigmas - Time series column vector of positive pre-sample conditional
% standard deviations upon which the recursive variance model is conditioned.
% This vector may have any number of rows, provided sufficient observations
% exist to initialize the conditional variance equation. Thus, if P and Q
% are the number of lagged conditional standard deviations and lagged
% innovations required by the conditional variance equation, respectively,
% then the PreSigmas vector must have at least P rows for GARCH and GJR
% models, and at least max(P,Q) rows for EGARCH models. If the number of
% rows exceeds the requirement, then only the last (i.e., most recent) rows
% are used as pre-sample observations.
%
% PreSeries - Time series column vector of pre-sample observations of the
% return series of interest upon which the recursive mean model is
% conditioned. This vector may have any number of rows, provided sufficient
% observations exist to initialize the conditional mean equation. Thus, if
% R is the number of lagged observations of the return series required by
% the conditional mean equation, then the PreSeries vector must have at
% least R rows. If the number of rows exceeds R, then only the last (i.e.,
% most recent) R rows are used as pre-sample observations.
%
% Outputs:
% Coeff - Structure containing the estimated coefficients. Coeff is of the
% same form as the Spec input structure, which allows other GARCH Toolbox
% functions (e.g., GARCHSET, GARCHGET, GARCHSIM, GARCHPRED, GARCHINFER) to
% accept either Spec or Coeff seamlessly.
%
% Errors - Structure containing the estimation errors (i.e., the standard
% errors) of the coefficients. Errors is of the same form as the Spec and
% Coeff structures. In the event an error occurs calculating the standard
% errors, all fields associated with estimated coefficients are set to NaN.
%
% LLF - Optimized log-likelihood objective function value associated with the
% parameter estimates found in Coeff. Optimization is performed by the
% FMINCON function of the Optimization Toolbox.
%
% Innovations - Innovations (i.e., residuals) time series column vector
% inferred from the input Series. The size of Innovations is the same as
% the size of Series. In the event of an error, Innovations will be a
% vector of NaN's.
%
% Sigmas - Conditional standard deviation time series column vector
% corresponding to Innovations. The size of Sigmas is the same as the size
% of Series. In the event of an error, Sigmas will be a vector of NaN's.
%
% Summary - Structure of summary information about the optimization process,
% including convergence information, iterations, objective function calls,
% active constraints, and the covariance matrix of coefficient estimates.
%
% Notes:
% (1) When specified, the PreInnovations, PreSigmas, and PreSeries time series
% column vectors contain user-specified pre-sample observations used to
% infer the outputs Innovations and Sigmas. When these vectors are specified
% and necessary, they MUST be specified together. This is an all-or-nothing
% approach. In other words, if a user chooses to provide pre-sample data,
% then ALL necessary pre-sample data for ALL 3 vectors must be specified.
% (2) Although PreInnovations, PreSigmas, and PreSeries are companion inputs,
% there are circumstances in which one or more may be empty. For example, a
% GARCH(0,Q) (i.e., an ARCH(Q)) model does not require lagged conditional
% variances, and thus PreSigmas could be empty ([]). Similarly, PreSeries
% is only necessary when the mean equation has an auto-regressive component.
% (3) If the conditional mean and/or conditional variance equation is not
% recursive in any way, then certain pre-sample information is unnecessary
% to jump-start the model(s). However, specifying redundant pre-sample
% information is NOT an error, and any pr
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
matlab garch工具箱.rar (45个子文件)
garch
gjrllf.mexw32.csf 1KB
info.xml 900B
garchllfn.m 20KB
lbqtest.m 8KB
garchinfer.m 27KB
lratiotest.m 7KB
gjrllf.mexw32 10KB
ppARDTest.m 27KB
garchllf.mexw32 11KB
gjrllfn.m 18KB
dfARTest.m 28KB
unitRootCheck.m 6KB
ppARTest.m 27KB
lagmatrix.m 4KB
ppTSTest.m 27KB
autocorr.m 8KB
egarchllfn.m 19KB
garchdisp.m 10KB
dfARDTest.m 38KB
garchfit.m 116KB
presamplecheck.m 4KB
ret2price.m 7KB
garchpred.m 35KB
garchma.m 6KB
ja
info.xml 895B
parcorr.m 9KB
garchget.m 12KB
price2ret.m 6KB
egarchllft.m 20KB
Contents.m 2KB
aicbic.m 5KB
garchllft.m 21KB
archtest.m 8KB
garchplot.m 4KB
garchsim.m 57KB
gjrllft.m 19KB
garchcount.m 4KB
crosscorr.m 6KB
egarchllf.mexw32 10KB
dfTSTest.m 38KB
egarchllf.mexw32.csf 1KB
hpfilter.m 6KB
garchar.m 6KB
garchllf.mexw32.csf 1KB
garchset.m 53KB
共 45 条
- 1
xiaotian9988
- 粉丝: 2
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页