码迷,mamicode.com
首页 > 其他好文 > 详细

EViews-蒙特卡洛模型代码

时间:2019-07-30 10:42:38      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:const   ons   inf   conf   views   sum   ant   mamicode   image   

脚本 config.png 代码:


!b1=0
!b2=1
matrix(500,3) f

for !k=1 to 500

series u=nrnd
series y= !b1+!b2*temp+u
equation el.ls y=c(1)+c(2)*temp

series y1=constant-y/10.0
series y2=(y1>0)*y1+(y1<0)*0
series hdd=@sum(y2)

f(!k,1)=@sum(hdd)
f(!k,2)=500
f(!k,3)=exp(-0.15)/500*((f(!k,1)>f(!k,2))*(f(!k,1)-f(!k,2)) + ( f(!k,1)<f(!k,2))*0)

next

技术图片

 

EViews-蒙特卡洛模型代码

标签:const   ons   inf   conf   views   sum   ant   mamicode   image   

原文地址:https://www.cnblogs.com/laoketeng/p/11268370.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!