using Vegarch on Rats 8.3

Discussions of ARCH, GARCH, and related models
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

using Vegarch on Rats 8.3

Unread post by adrangi »

Hi Tom. I've modified the program vegarch.rpf for two variables. It works until the last stop using simplex. I got the following error message
## SX11. Identifier SPILLOVER is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>ARIANCES=SPILLOVER,<<<<

I ran as variance=spillover, then variance = EGARCHSpillover, still I get to this point and error messages stopped the program from completing the final EGARCH estimation. Any help will be greatly appreciated since I need to present the results shortly!! Thanks. Bahram Adrangi
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: using Vegarch on Rats 8.3

Unread post by TomDoan »

If you're getting that message with VARIANCES=SPILLOVER, then you're not running RATS 8.3. That was added with 8.0.
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: using Vegarch on Rats 8.3

Unread post by adrangi »

Hi. Thanks. I'm pretty sure my latest version is 8.3. I'll check to make sure again. I deleted that option and got error free results. By the way, I also have the beta version 9. would you recommend running on that version? Thanks. Bahram
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: using Vegarch on Rats 8.3

Unread post by TomDoan »

The beta version 9 shouldn't work any longer---it had a drop-dead date of October 24. The whole program is massively simplified with version 9 because we added VARIANCES=KOUTMOS to do the specific multivariate E-GARCH model. Since the version 9 GARCH instruction can estimate the model directly, the added example of the "closest" model that GARCH can do is moot.

This is the version 9 recoding:

Code: Select all

*
* Replication file for the multivariate EGARCH model with mean and
* asymmetric volatility spillovers from Koutmos(1996) "Modeling the
* Dynamic Interdependence of Major European Stock Markets", Journal of
* Business Finance and Accounting, vol 23, 975-988.
*
* The original RATS program was provided by Prof. Koutmos and revised by
* Tom Doan, Estima.
*
* This example is discussed in detail as part of the RATS "ARCH/GARCH and
* Volatility Models" e-course.
*
* This is updated to use the VARIANCE=KOUTMOS option added to GARCH with version 9.
*
cal(d) 1986:1:2
all 1991:12:31
open data stock9.rat
*
* The data file is format=rats and contains stock prices for 9 countries.
* Here we retrieve the stock prices for France, Germany, Italy and
* Germany.
*
data(format=rats) / fra ger ita uki
*
compute n=4
*
* Define the return series
*
dec vect[series] y(n)
set y(1) = 100*log(fra/fra{1})
set y(2) = 100*log(ger/ger{1})
set y(3) = 100*log(ita/ita{1})
set y(4) = 100*log(uki/uki{1})
*
* This is the period of estimation, allowing for the lost data point for
* converting to returns, and the loss for the lags in the VAR.
*
compute gstart=1986:1:4,gend=1991:12:31
*
* Table 1
*
dec vect[labels] vl(4)
compute vl=||"France","Germany","Italy","UK"||
report(action=define,title="Preliminary Statistics")
report(atrow=1,atcol=1,fillby=cols) "Statistics" "$\mu$" "$\sigma$" "S" "K" "D" $
  "$LB(12) for R_t" "$LB(12) for R_t^2$"
do i=1,n
   stats(noprint) y(i) gstart gend
   report(atrow=1,atcol=i+1,fillby=cols) vl(i) %mean sqrt(%variance) %skewness %kurtosis
   @adtest(noprint) y(i) gstart gend
   report(atrow=6,atcol=i+1) %cdstat
   corr(noprint,number=12,qstats) y(i) gstart gend
   report(atrow=7,atcol=i+1) %qstat
   @mcleodli(noprint,number=12) y(i) gstart gend
   report(atrow=8,atcol=i+1) %cdstat
end do i
report(action=format,picture="*.####")
report(action=show)
*
* Table 2 - AR(1) EGARCH without spillover. This can be done with the
* GARCH instruction.
*
dec vect[equation] ar1eq(n)
do i=1,n
   equation ar1eq(i) y(i)
   # constant y(i){1}
end do i
group ar1model ar1eq(1) ar1eq(2) ar1eq(3) ar1eq(4)
garch(model=ar1model,mv=cc,variance=exp,asymmetric) gstart gend
*
system(model=var1)
variables y
lags 1
det constant
end(system)
*
garch(model=var1,mv=cc,iters=500,variance=koutmos,$
   pmethod=simplex,piters=10,trace) gstart gend
*
* Diagnostics
*
dec vect[series] ustd(n)
*
report(action=define)
report(atrow=2,atcol=1,fillby=cols) "$E(z_{i,t})$" "$E(z^2_{i,t})$" "$LB(12);z_{i,t}$" "$LB(12);z^2_{i,t}$"
do i=1,n
   report(atrow=1,atcol=i+1,align=center) vl(i)
   set ustd(i) %regstart() %regend() = u(i)/sqrt(hh(t)(i,i))
   set ustdsq = ustd(i)^2
   sstats(mean) %regstart() %regend() ustd(i)>>eustd ustdsq>>eustdsq
   report(atrow=2,atcol=i+1,fillby=cols) eustd eustdsq
   corr(number=12,qstats,noprint) ustd(i)
   report(atrow=4,atcol=i+1,special=1+fix(%qsignif<.05)) %qstat
   corr(number=12,qstats,noprint) ustdsq
   report(atrow=5,atcol=i+1,special=1+fix(%qsignif<.05)) %qstat
end do i
report(action=format,atrow=2,atcol=2,picture="*.####",align=decimal)
report(action=show)
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: using Vegarch on Rats 8.3

Unread post by adrangi »

OK.Thanks much. I'll first go back and see if I inadvertently ran this on my old versions. They're still on my machine. Thanks. BA
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: using Vegarch on Rats 8.3

Unread post by adrangi »

Mea culpa! Was using 7.3!

After getting the final results I tried to run some diagnostics and was planning to do some sign bias tests. However could not sort out the residual series and variances. I had written a program for the older version of the MV-Egarch that cranked out the sign bias tests, residual q stats, etc. Any hints would be appreciated. Thanks. BA
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: using Vegarch on Rats 8.3

Unread post by adrangi »

Hi Tom. I figured the diagnostics. Thanks. Ba
Post Reply