Hello everyone,
I modified the GARCH example file in eviews 6 to be able to estimate a realized garch model. The model is defined as:
with rt=returns
ht=conditional variance
xt=realized kernel (high frequency data variable)
zt~nid(0,1)
ut~nid(0,sig.u)
and zt uncorrelated with ut
After running the program I get the following error:
OUTPUT is not a valid view for LOGL1 in "SHOW LOGL1.OUTPUT"
plus it gives my loglikelihood a value > zero, which shows that my program isn't correct.
What does this mean? I've uploaded the workfile as well.
Any suggestions and comments would be much appreciated.
here's the code:
Code: Select all
%path = @runpath
cd %path
load realizedlibrary
sample s0 7/02/1999 7/02/1999
sample s1 7/05/1999 2/27/2009
smpl s1
'declaration of coefficient vectors to use in RealGARCH likelihood
coef(1) omega = 0.1
coef(1) beta = 0.1
coef(1) gamma = 0.1
coef(1) xi = 0.1
coef(1) phi = 0.1
coef(2) tau = 0.1
'starting values
smpl s0
series sig = -0.000319459705762157
series nl_rk = 0.00003463251778157428
'set up Realized GARCH likelihood
logl logl1
logl1.append @logl logl
logl1.append sig = omega(1)+beta(1)*sig(-1)+gamma(1)*nl_rk(-1)
logl1.append stdz = nl_returns/@sqrt(sig)
logl1.append res = nl_rk-xi(1)-phi(1)*sig-tau(1)*stdz-tau(2)*(stdz^2-1)
logl1.append ressig = res^2
logl1.append logl = -0.5*(log(ressig)+res^2/ressig+log(sig)+nl_returns^2/sig)
'estimate and display results
smpl s1
logl1.ml(showopts, m=1000, c=1e-5)
show logl1.ouput
thanks in advance