MV-EGARCH with spillovers

Discussions of ARCH, GARCH, and related models
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

MV-EGARCH with spillovers

Unread post by TomDoan »

The following estimates a multivariate E-GARCH models with a VAR(1) mean model and spillovers in the GARCH specification. This is from Koutmos G. (1996) "Modeling the Dynamic Interdependence of Major European Stock Markets", Journal of Business Finance and Accounting,
Vol. 23, pp. 975-988.

An updated version of this is available at http://www.estima.com/forum/viewtopic.php?f=8&t=1940
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

Dear Tom,

I have problem executing this program something like this appeared after I executed the program

## SX11. Identifier LT is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>race,iters=200) Lt <<<<

Can you help with this problem? I really need VAR-EGARCH modelling for my dissertation. I have tried to use another software but it only estimates the conditional variance and not the direction of the spillover (because it only provides diagonal VECH, diagonal BEKK, and CCC model). I want to start learning RATS as well. Can you tell me what books should I read? Or anything to get familiarized with this software. Appreciate your help so much. Thank you!
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

Dear Tom,

I tried the program and data you attached and succeeded to get the proper result. But, when I modified the program by using only 3 variables and VAR(2), I got this message

## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points

Can you tell me what's wrong with the modified program? And how can I plot the conditional variance, covariance? Thank you, Tom!
Attachments
period1.xls
(93.5 KiB) Downloaded 1332 times
var-egarch.PRG
(3.23 KiB) Downloaded 1599 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MV-EGARCH with spillovers

Unread post by TomDoan »

You're losing one data point taking returns and two from lags, so you can't start estimation from start+1. Adjusting the start point will fix it:

Code: Select all

maximize(pmethod=simplex,piters=2,method=bfgs,trace,iters=200) Lt start+3 end
To save the conditional covariance matrix, you can change the definition of frml lt to:

Code: Select all

dec series[symm] hh
gset hh start end = %zeros(n,n)
frml Lt = hh=EGARCHSpillover(t),%logdensity(hh,%xt(u,t))
You can then analyze that to get the running correlations, etc. as is done in the GARCHMV.PRG example.
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

Dear Tom,

Thank you for fixing the code. I have my variance equation now. But I have another question. As I need to compute the covariance matrix and the running correlation from the VAR-EGARCH, I have tried to follow garchmv.prg but failed to get a lot of error messages. I am so sorry, I am a novice in RATS. This is my first time using it.

I believe that the code I should modify is

Code: Select all

* Compute the covariance matrix of the standardized residuals from
* the diagonal GARCH
*
set z1 = rd(t)(1)/sqrt(hd(t)(1,1))
set z2 = rd(t)(2)/sqrt(hd(t)(2,2))
set z3 = rd(t)(3)/sqrt(hd(t)(3,3))
vcv(matrix=cc)
# z1 z2 z3
*
* Compute the correlations from the multivariate GARCH
*
set rho12 = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2))
set rho13 = hh(t)(1,3)/sqrt(hh(t)(1,1)*hh(t)(3,3))
set rho23 = hh(t)(2,3)/sqrt(hh(t)(2,2)*hh(t)(3,3))
graph(header="Correlation of JPN with FRA",vgrid=||cc(1,2)||)
# rho12
graph(header="Correlation of JPN with SUI",vgrid=||cc(1,3)||)
# rho13
graph(header="Correlation of FRA with SUI",vgrid=||cc(2,3)||)
# rho23
*
Yet, I don't understand how to get the rd and hh, and the cc (this is of course not in the previous code because I didn't use CC model for the MVGARCH). The example for all MVGARCH in garchmv.prg are straightforward,

garch(p=1,q=1,iters=200,hmatrices=hh) / xjpn xfra xsui
garch(p=1,q=1,mv=bekk,method=bfgs,iters=200,pmethod=simplex,piters=10) / xjpn xfra xsui
garch(p=1,q=1,mv=diag,hmatrices=hd,rvectors=rd) / xjpn xfra xsui
garch(p=1,q=1,mv=cc) / xjpn xfra xsui
garch(p=1,q=1,mv=dcc,method=bfgs) / xjpn xfra xsui

but with VAR-EGARCH, I am a bit confused. I am still trying to understand the whole line of vegarch.prg you posted. Can you explain to me a bit about this? So sorry for the trouble. Thank you very much!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MV-EGARCH with spillovers

Unread post by TomDoan »

Since there is no "CC", anything that computes it or uses it isn't applicable. The "HH" is being computed by the code I posted. What you would want is the following, which computes the time-varying correlations and graphs them. (Obviously, you'll need to relabel them). This is the same as what you had but without attempting to include the cc value.

Code: Select all

set rho12 = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2))
set rho13 = hh(t)(1,3)/sqrt(hh(t)(1,1)*hh(t)(3,3))
set rho23 = hh(t)(2,3)/sqrt(hh(t)(2,2)*hh(t)(3,3))
graph(header="Correlation of JPN with FRA")
# rho12
graph(header="Correlation of JPN with SUI")
# rho13
graph(header="Correlation of FRA with SUI")
# rho23
The variances are hh(t)(1,1), hh(t)(2,2) and hh(t)(3,3). To graph those, you would do something like:

Code: Select all

set v1 = hh(t)(1,1)
set v2 = hh(t)(2,2)
set v3 = hh(t)(3,3)
graph(header="Conditional Variance of ....")
# v1
etc.
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

I have erase the "CC" and relabel the graph yet I found something strange on the conditional correlation graph, Tom. The code gives me constant conditional correlation between two series. The hh is 3 x 3 matrix right? Are there any restrictions you put on the previous code? I tried to modify the hh component to be

set rho12 = hh(t)(1,2)/sqrt(hh(t)(1,2)*hh(t)(2,2))

and get the (seemingly right) correlation graph. Then, I tried to compute the LB Q-statistics according to tsayp452.prg but it's not working at all and I always got message

## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 0411 of REGCORRS
Line 38 of REGCORRS

Would you kindly review my code? And also how to show correlation structure of the model as in Koutmos (1996)? Thanks a trillion, Tom!
Attachments
period2.xls
(98 KiB) Downloaded 1246 times
period2.PRG
(211.27 KiB) Downloaded 1509 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MV-EGARCH with spillovers

Unread post by TomDoan »

Sorry about that. This is a CC model - the spillovers affect the variance, but the correlations are constant. Thus the uninteresting correlation graphs.

Towards the end, you're trying to do an analysis of standardized residuals without the residuals. The following saves both the covariance matrices (into the SERIES[SYMM] hh) and the residuals (into the SERIES[VECT] rd).

Code: Select all

dec series[symm] hh
dec series[vect] rd
gset hh start end = %zeros(n,n)
gset rd start end = %zeros(n,1)
frml Lt = hh=EGARCHSpillover(t),rd=%xt(u,t),%logdensity(hh,rd)
Your standardized residuals will then be something like:

Code: Select all

set stdsp500 = rd(t)(1)/sqrt(hh(t)(1,1))
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

Dear Tom,

Everything works except the unappealing correlation graph :(

Btw, is it correct to check the validity of the assumption of constant conditional correlations by using

@mvqstat(lags=12)
#stdsp500 stdidx
etc

for checking the serial correlation in the cross product of the standardized residuals? Is there any way to not restrict the conditional correlation? Thank you, Tom!
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

I also used the code

set stdsp500 = rd(t)(1)/sqrt(hh(t)(1,1))
set stdidx = rd(t)(2)/sqrt(hh(t)(2,2))
set stdxr = rd(t)(3)/sqrt(hh(t)(3,3))
vcv(matrix=RR)
#stdsp500 stdidx stdxr

to get the correlation matrix. Is this code correct? Thank you!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MV-EGARCH with spillovers

Unread post by TomDoan »

sekar2010 wrote:Dear Tom,

Everything works except the unappealing correlation graph :(

Btw, is it correct to check the validity of the assumption of constant conditional correlations by using

@mvqstat(lags=12)
#stdsp500 stdidx
etc

for checking the serial correlation in the cross product of the standardized residuals? Is there any way to not restrict the conditional correlation? Thank you, Tom!
That wouldn't be testing for CCC, just for serial correlation. The MVQSTAT has a null of a fixed correlation matrix with no serial correlation. The Tse test is a formal LM test for CC against a specific alternative. I would think you could also do a fluctuations test on the standardized residuals.
sekar2010

Re: MV-EGARCH with spillovers

Unread post by sekar2010 »

Does this mean that the code

@mvqstat(lags=12)
#stdsp500 stdidx

is a valid test for testing serial correlation (standarized residual of the 2 series)? Because Koutmos (1996) says that the validity of the assumption of constant conditional correlations can be assessed by testing for serial correlation in the cross product of the standardized residuals.Is it the same when I the test for the whole series with code

@mvqstat(lags=12)
# stdsp500 stdidx stdxr

as I modified from tsayprg452.prg. If it's not valid, then to get xd in tse.prg, do I have to estimate e new system starting from

dec symm qcinv(n,n)
compute nslot=0+3*n
ewise qcinv(i,j)=%if(i==j,1,%beta(nslot=nslot+1))
compute qcinv=inv(qcinv)
dec symm[series] xd(n-1,n-1)
dec symm uux
dec vect ux

Kindly be patient as I'm novice in this. Thank you, Tom.
gorgorm
Posts: 14
Joined: Mon Apr 05, 2010 9:19 am

Re: MV-EGARCH with spillovers and Correlation coefficients

Unread post by gorgorm »

Dear Tom,

I have estimated the MVAR-EGARCH due Koutmos and I tried to check whether the correlation between the variables are significant.

the RATS command

cmoment( corr, print )
# r1 r2 r3 r4 ---------- for the vaiables


cmoment( corr, print )
# xi xii xiii xiv ------------ for the standardized residuals


do not give me the T-statistics. How can I modify the code to get the T-stats in addition to the coefficients?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MV-EGARCH with spillovers

Unread post by TomDoan »

Since you just estimated a CC model, wouldn't the t-statistics on the "R" coefficients be the way to test whether the correlation is non-zero?
gorgorm
Posts: 14
Joined: Mon Apr 05, 2010 9:19 am

Re: MV-EGARCH with spillovers

Unread post by gorgorm »

Dear Tom,

Thanks for the reply. I need further help.

I am working with time series return data which I have also adjusted for nonsynchronous trading.

I want to run a correlation test between the return data and the adjusted data to find out if the correlation between them is statistically significant.

The command "cmoment( corr, print )" do not give me the t-stats.

Tom, I want your help in this regard

Thanks a lot
Post Reply