资源简介
RT。虽然MATLAB中存在GARCH模块,但在编程实际操作中需要进行一些自主设计。本程序就是因为这样的目的而存在的。
代码片段和文件信息
function [LCLCL] = jumpgarch(uhlambdadeltatheta)
% Jump GARCH function evaluation procedures. jumpGARCH is a function for a
% standard jump GARCH while ARJIGARCH is for the ARJI-Garch model of Chan and
% Maheu(2002) “Conditional Jump Dynamics in Stock Market Returns“ JBES vol 20
% no. 3 377-389. The names of the components are taken from that paper.
%
% kmax which is the maximum value of jumps to be used in the infinite sum is a
% global variable which needs to be set before using either of these procedures.
% The default is 20.
%
% Note that in evaluating the likelihood rather than use the standard
% exp(-lambda) integrating constant for the Poisson this sums the kernels of the
% Poisson into wt and divides by that. In effect this computes the log likelihood
% conditional on the number of jumps being <= kmax. This should make the
% estimation less sensitive to the choice of kmax. (Even if the final converged
% likelihood is unaffected by a slight change in kmax it‘s possible for function
% evaluations for large test values of lambda to produce misleading results if the
%standard integrating constant is used).
%
% Revision Schedule:
% 08/2008 Written by Tom Doan Estima
% 本程序根据Tom Doan(2008)的Rats程序改编,在此感谢Tom Doan!
% u = current residual
% h = base GARCH variance (before jumps)
% lambda = Poisson intensity for jumps
% deltasq = variance of Normal jump process
% theta = mean of Normal jump process
% 09/2011 Written by Yu Cong Hunan University
% 设置最大累加次数
kmax=20;
T=size(u1);
% 初始化 wt CL
wt=0.0;
CL=zeros(T1);
% 计算似然函数值
for k=0:kmax
jsd = sqrt(h+k*delta.^2);
jp = exp(k*log(lambda)-gammaln(k+1));
wt = wt+jp;
CL = CL + jp*(2*pi)^(-0.5)*exp(-0.5*((u-k*theta)./jsd).^2)./jsd;
end
CL = log(CL/wt);
LCL = sum(CL);
LCL = -LCL;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1531 2012-02-10 13:11 jumpgarchfun.m
文件 2017 2011-09-15 13:54 jumpgarch.m
----------- --------- ---------- ----- ----
3548 2
- 上一篇:F2T 计算高斯窄带功率谱子函数
- 下一篇:颜色迁移的matlab代码
评论
共有 条评论