全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
3412 3
2009-03-26
各位大虾好啊!
最近在做关于volatility transmission的研究。看了不少文献(如KOUTMOS and Booth (1995)),想自己动手操作一下,无奈怎么样都找不到多变量EGARCH模型的code,自己编了半天也找不到方向。请问谁有或者写过,借小妹观摩一下:)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-1-15 10:13:47
楼主弄的怎么样了,我最近也在做这个~
想向楼主讨教一下~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-1-15 11:07:46
ifallasleepjing 发表于 2010-1-15 10:13
楼主弄的怎么样了,我最近也在做这个~
想向楼主讨教一下~
Here is the univariate case using simulated data with SAS

%let var2 = 2.5;
%let nobs = 1000 ;
%let arch0 = 0.1 ;
%let arch1 = 0.2 ;
%let garch1 = 0.75 ;
%let intercept = 0.5 ;


data egarch ;
   lu = &var2 ;
   lh = &var2 ;
   theta = .65 ;
   lz = lu/sqrt(lh) ;
   lg = theta*lz + abs(lz)-sqrt(2/3.14159) ;
   do i = -500 to &nobs ;
          /* EGARCH */
      h = exp( &arch0 + &arch1*lg + &garch1*log(lh)) ;
      u = sqrt(h)*rannor(12346) ;
      z = u/sqrt(h) ;
      g = theta*z + abs(z) -sqrt(2/3.14159) ;
      y = &intercept + u ;
      lu = u ;
      lh = h ;
      lg = g ;
      if i > 0 then output ;
   end ;
run ;   


/* Estimate EGARCH Model with PROC AUTOREG */
proc autoreg data= egarch ;
   model y =  / garch=( q=1, p=1 , type = exp) ;
run;
quit;

/* Estimate EGARCH Model with PROC MODEL */     
proc model data = egarch ;
   parms  earch0 .1 earch1 .2 egarch1 .75 theta .65 ;
   /* mean model */
   y = intercept ;
   /* variance model */
   if (_obs_ = 1 ) then
      h.y = exp( earch0 + egarch1 * log(mse.y)  );
   else h.y = exp(earch0 + earch1*zlag(g) + egarch1*log(zlag(h.y))) ;
   g = theta*(-nresid.y) + abs(-nresid.y) - sqrt(2/constant('pi')) ;
   /* fit the model */
   fit y / fiml method = marquardt ;
run;
quit;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-1-15 20:47:31
谢谢呢,还想问问多元的怎么办呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群