请教各位大虾,小弟在做股指期货和股票市场间波动溢出效应的毕业论文,据说要用BEKK-GARCH模型,我用EVIEWS6自带的BV_GARCH.prg 做了之后出来一串错误,Missing values in @LOGL series at current coefficients at observation 1 in “DO_BVGARCH.ML(SHOWOPTS,M=100,C=1E-5)”,请各位大虾赐教啊,不胜感激!!!!!!
以下是我在BV_GARCH里头修改了自己的数据。
' BV_GARCH.PRG (3/30/2004)
' Revised for 6.0 (3/7/2007)
' example program for EViews LogL object
'
' restricted version of
' bi-variate BEKK of Engle and Kroner (1995):
'
' y = mu + res
' res ~ N(0,H)
'
' H = omega*omega' + beta H(-1) beta' + alpha res(-1) res(-1)' alpha'
'
' where
'
' y = 2 x 1
' mu = 2 x 1
' H = 2 x 2 (symmetric)
' H(1,1) = variance of y1 (saved as var_y1)
' H(1,2) = cov of y1 and y2 (saved as var_y2)
' H(2,2) = variance of y2 (saved as cov_y1y2)
' omega = 2 x 2 low triangular
' beta = 2 x 2 diagonal
' alpha = 2 x 2 diagonal
'
'change path to program path
%path = @runpath
cd %path
' load workfile
load untitled2
' dependent variables of both series must be continues
smpl @all
series y1 = dlog(if)
series y2 = dlog(hs)
' set sample
' first observation of s1 need to be one or two periods after
' the first observation of s0
sample s0 1 300
sample s1 1 300
' initialization of parameters and starting values
' change below only to change the specification of model
smpl s0
'get starting values from univariate GARCH
equation eq1.arch(m=100,c=1e-5) y1 c
equation eq2.arch(m=100,c=1e-5) y2 c
' declare coef vectors to use in bi-variate GARCH model
' see above for details
coef(2) mu
mu(1) = eq1.c(1)
mu(2)= eq2.c(1)
' constant adjustment for log likelihood
!mlog2pi = 2*log(2*@acos(-1))
' use var-cov of sample in "s1" as starting value of variance-covariance matrix
series cov_y1y2 = @cov(y1-mu(1), y2-mu(2))
series var_y1 = @var(y1)
series var_y2 = @var(y2)
series sqres1 = (y1-mu(1))^2
series sqres2 = (y2-mu(2))^2
series res1res2 = (y1-mu(1))*(y2-mu(2))
' ...........................................................
' LOG LIKELIHOOD
' set up the likelihood
' 1) open a new blank likelihood object (L.O.) name bvgarch
' 2) specify the log likelihood model by append
' ...........................................................