楼主: zjyxw
1004 0

[数据求助] 我用Eviews写代码跑非对角线BEKK模型时,出现了点问题 [推广有奖]

  • 0关注
  • 0粉丝

硕士生

93%

还不是VIP/贵宾

-

威望
0
论坛币
10 个
通用积分
10.7052
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
823 点
帖子
90
精华
0
在线时间
230 小时
注册时间
2017-3-20
最后登录
2025-11-8

楼主
zjyxw 发表于 2017-11-2 08:28:23 |AI写论文
1论坛币
smpl @all
series y1=dlog(usdcny_spot)
series y2=dlog(usdcnh_spot)
sample s0 8/11/2015 10/23/2017
sample s1 8/11/2015 10/23/2017
smpl s0
equation eq1.arch(m=100,c=1e-5) y1 c
equation eq2.arch(m=100,c=1e-5) y2 c
coef(2) mu
mu(1) = eq1.c(1)
mu(2)= eq2.c(1)
coef(3) omega
omega(1)=(eq1.c(2))^.5
omega(2)=0
omega(3)=eq2.c(2)^.5
coef(2) alpha
alpha(1) = (eq1.c(3))^.5
alpha(2) = (eq2.c(3))^.5
coef(2) beta
beta(1)= (eq1.c(4))^.5
beta(2)= (eq2.c(4))^.5
!mlog2pi = 2*log(2*@acos(-1))
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))

logl bvgarch
bvgarch.append @logl logl
bvgarch.append sqres1 = (y1-mu(1))^2
bvgarch.append sqres2 = (y2-mu(2))^2
bvgarch.append res1res2 = (y1-mu(1))*(y2-mu(2))
bvgarch.append var_y1  =  omega(1)^2 + beta(1)^2*var_y1(-1) + alpha(1)^2*sqres1(-1)
bvgarch.append var_y2  = omega(3)^2+omega(2)^2 + beta(2)^2*var_y2(-1) + alpha(2)^2*sqres2(-1)
bvgarch.append cov_y1y2 = omega(1)*omega(2) + beta(2)*beta(1)*cov_y1y2(-1) + alpha(2)*alpha(1)*res1res2(-1)
bvgarch.append deth = var_y1*var_y2 - cov_y1y2^2
bvgarch.append invh1 = var_y2/deth
bvgarch.append invh3 = var_y1/deth
bvgarch.append invh2 = -cov_y1y2/deth
bvgarch.append logl =-0.5*(!mlog2pi + (invh1*sqres1+2*invh2*res1res2+invh3*sqres2) + log(deth))
smpl s1
bvgarch.ml(showopts, m=100,c=le-5)
做到这步时他一直报!mlog2pi  is not defined inlogl =-0.5*(!mlog2pi + (invh1*sqres1+2*invh2*res1res2+invh3*sqres2) + log(deth))这是出现了什么问题呢!求助


关键词:BEKK模型 EVIEWS Eview Views view
已有 1 人评分论坛币 收起 理由
zhuosn + 5 精彩帖子

总评分: 论坛币 + 5   查看全部评分

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2025-12-9 03:52