急求,我的汇率的GARCH(1,1)-t分布的蒙特卡洛模拟eviews的编程问题 10
汇率的价格服从GARCH(1,1)-t分布,要预测未来252天的价格走势,运行结果是如下,请问我下面的代码哪儿有问题?论文需要,时间紧迫,请高手赐教,万分感谢!'Thed...
汇率的价格服从GARCH(1,1)-t分布,要预测未来252天的价格走势,运行结果是如下,请问我下面的代码哪儿有问题?论文需要,时间紧迫,请高手赐教,万分感谢!
'The distribution of eu series
!N=10000
workfile simus5 u 1 10000
series r
series w
series z
scalar sum4=0
for !i=1 to 10000
smpl 1 252
scalar sum1=0.0000618032
scalar sum2=0
scalar sum3=log(1.045)
series e=@rtdist(7.526)
e(1)=0
series u
u(1)=0
series h
h(1)=0.0000618032
series ln
ln(1)=log(1.045)
for !counter=1 to 252
u( !counter)=sum2
h( !counter)=sum1
ln( !coumter)=sum3
sum1=0.000000642+0.054181*u( !counter)*u( !counter)+0.935995*h( !counter)
sum2=e( !counter)*(sum1)^0.5
sum3=0.999030*ln( !counter)+u( !counter)
if sum3<log(1.0351) or sum3=log(1.0351) then r=0.0861 else r=0
endif
next
if @min(r)=0.0861 then
w(!i)=1
else w(!i)=0
endif
sum4=sum4+w(!i)
z(!i)=sum4
next
show z 展开
'The distribution of eu series
!N=10000
workfile simus5 u 1 10000
series r
series w
series z
scalar sum4=0
for !i=1 to 10000
smpl 1 252
scalar sum1=0.0000618032
scalar sum2=0
scalar sum3=log(1.045)
series e=@rtdist(7.526)
e(1)=0
series u
u(1)=0
series h
h(1)=0.0000618032
series ln
ln(1)=log(1.045)
for !counter=1 to 252
u( !counter)=sum2
h( !counter)=sum1
ln( !coumter)=sum3
sum1=0.000000642+0.054181*u( !counter)*u( !counter)+0.935995*h( !counter)
sum2=e( !counter)*(sum1)^0.5
sum3=0.999030*ln( !counter)+u( !counter)
if sum3<log(1.0351) or sum3=log(1.0351) then r=0.0861 else r=0
endif
next
if @min(r)=0.0861 then
w(!i)=1
else w(!i)=0
endif
sum4=sum4+w(!i)
z(!i)=sum4
next
show z 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询