Matrix of Loadings in VECM-GARCH

Discussions of ARCH, GARCH, and related models
klaus86
Posts: 6
Joined: Fri Apr 24, 2015 3:20 am

Matrix of Loadings in VECM-GARCH

Unread post by klaus86 »

Dear all,

I would like to estimate a bivariate VECM-BEKK model and then compute the orthogonal vector to the error correction coefficients which I need for the calculation of information shares. However, I run into problems when I try to do this in RATS.
I have done this procedure before in the framework of a standard VECM without GARCH errors:

Code: Select all

set logspot = log(spot)
set logfutures = log(futures)
*
*
*Restrict cointegrating relationship:
equation(coeffs=||1.0,-1.0||) eqxy
# logfutures logspot
*
system(model=vecm)
variables logfutures logspot
lags 1 to 3
det constant
ect eqxy
end(system)
estimate
*Compute orthogonal vector to error correction coefficients:
compute alphaperp=%perp(%vecmalpha)
This works fine. However, it does not work when I try to estimate the above model with GARCH errors (in my case a standard BEKK-model) by replacing the command "estimate" with the following instruction:

Code: Select all

garch(model=vecm,mv=bekk,hmatrices=h, MVHSERIES=bekkHmatrix, rvectors=r,pmethod=simplex,piters=5,method=bfgs,iters=400)
Apparently the error correction term is somewhat ignored in this estimation as it is not displayed in the output. Consequently, the calculation of the orthogonal vector to %vecmalpha is also ignored. I managed to reformulate the VECM-BEKK so that it includes the error correction term:

Code: Select all

set retspot = log(spot)-log(spot{1})
set retfutures = log(futures)-log(futures{1})
set ect = log(futures)-log(spot)
*
system(model=vecm)
variables retspot retfutures
lags 1 to 3
det constant ect{1}
end(system)
*
* Estimate by GARCH-BEKK
*
garch(model=vecm,mv=bekk,hmatrices=h, MVHSERIES=bekkHmatrix, rvectors=r,pmethod=simplex,piters=5,method=bfgs,iters=400)
Yet when I try to calculate the orthogonal vector to the error correction coefficients, i.e.:

Code: Select all

compute alphaperp=%perp(%vecmalpha) 
I get the error:
## I1. Expected Instruction - ALP Is Not Recognizable As One
>>>>alphaperp=<<<<
Any suggestions how I can solve this issue?
Thanks a lot.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Matrix of Loadings in VECM-GARCH

Unread post by TomDoan »

%VECMALPHA also only gets defined by ESTIMATE, not by GARCH. As you have this set up, you can fetch the alpha's with

compute vecmco=%modelgetcoeffs(vecm)
compute alpha=tr(%xrow(vecmco,8))

which will be a 2 x 1 vector. You can then do

compute alphaperp=%perp(alpha)
klaus86
Posts: 6
Joined: Fri Apr 24, 2015 3:20 am

Re: Matrix of Loadings in VECM-GARCH

Unread post by klaus86 »

Thanks Tom. This works fine.
ad15
Posts: 2
Joined: Thu Dec 10, 2015 5:54 am

Re: Matrix of Loadings in VECM-GARCH

Unread post by ad15 »

Hi Tom,
I am able to fetch alpha's from this code. Please help me
I used the following command
set retspot = log(spot)-log(spot{1})
set retfutures = log(futures)-log(futures{1})
set ect = log(futures)-log(spot)
system(model=vecm)
variables retspot retfutures
lags 1 to 3
det constant ect{1}
end(system)
garch(model=vecm,mv=bekk,hmatrices=h, MVHSERIES=bekkHmatrix, rvectors=r,pmethod=simplex,piters=5,method=bfgs,iters=400)
compute vecmco=%modelgetcoeffs(vecm)
compute alpha=tr(%xrow(vecmco,8))
compute alphaperp=%perp(alpha)

Please help. Thanks.



%VECMALPHA also only gets defined by ESTIMATE, not by GARCH. As you have this set up, you can fetch the alpha's with

compute vecmco=%modelgetcoeffs(vecm)
compute alpha=tr(%xrow(vecmco,8))

which will be a 2 x 1 vector. You can then do

compute alphaperp=%perm(alpha)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Matrix of Loadings in VECM-GARCH

Unread post by TomDoan »

Sorry. What's the question? alpha will have the alpha's. The previous poster needed its "perp" for further calculations, but if you just need the loadings, you already have that.
ad15
Posts: 2
Joined: Thu Dec 10, 2015 5:54 am

Re: Matrix of Loadings in VECM-GARCH

Unread post by ad15 »

Dear Tom.
I am not able to extract alpha. When I am writing the code as
garch(model=vecm,mv=bekk,hmatrices=h, MVHSERIES=bekkHmatrix, rvectors=r,pmethod=simplex,piters=5,method=bfgs,iters=400)
compute vecmco=%modelgetcoeffs(vecm)
compute alpha=tr(%xrow(vecmco,8))
compute alphaperp=%perp(alpha)
print
I see only one ECT term and VCVs of MGARCH.
compute vecmco=%modelgetcoeffs(vecm)
compute alpha=tr(%xrow(vecmco,8))
compute alphaperp=%perp(alpha)
I am not getting alpha perpendicular. How to get that. Please help thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Matrix of Loadings in VECM-GARCH

Unread post by TomDoan »

Yes, you have. The loadings are in alpha and the perp of that is in alphaperp. If you want to see them, use a DISPLAY instruction---COMPUTE computes, it doesn't show.
Post Reply