哪位高人能不能帮忙解决下,我用eviews做garch(1,1)模型时老遇见unmatched parenthesis in "DO_LL1.Ml(b,showopts,M=1000,c=1e-4),我用的是编程程序,由于用的是蒙特卡洛计算VaR所以必须编程。谢谢指导。部分程序代码
(garch(1,1)的扰动项是在正态分布下)
!i=470
for !i=470 to 532
load E:汇率
series ly=log(shuju)
series r=ly-ly(-1)
sample s0 !i-470+3 !i
sample s1 !i-470+4 !i
smpl s1
equation eq2
eq2.arch r c r(-1) r(-2)
coef(1) mu=eq2.c(1)
coef(1) beta=eq2.c(2)
coef(1) zeta=eq2.c(3)
coef(1) omega=eq2.c(4)
coef(1) alpha=eq2.c(5)
coef(1) theta=eq2.c(6)
coef(1) tdf=3
smpl s0
series sig2=@abs(omega(1))
series res=0
pi=@acos(-1)
logl ll1
ll1.append @logl logl1
ll1.append res=r-mu(1)-beta(1)*r(-1)-zeta(1)*r(-2)
ll1.append sig2=@abs(omega(1)+alpha(1)*res(-1)^2+theta(1)*sig2(-1)
ll1.append logl1=-(log(2*!pi))/2-log(sig2)/2-(res^2/sig2)/2
smpl s1
ll1.ml(b,showopts,m=10000,c=1e-3)
!df=tdf(1)
!muu=mu(1)
!h2=@abs(omega(1)+alpha(1)*res(!i)^2+theta(1)*sig2(!i]!h2=@abs(omega(1)+alpha(1)*res(!i)^2+theta(1)*sig2(!i))
close 汇率