MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Discussions of ARCH, GARCH, and related models

MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Mon Jan 23, 2012 1:40 pm

when i apply the code for the archtest, there is an error:

@ARCHTest(lags=5, dfc=1) r1 r2 r3 2004:01:07 2011:12:30

## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 0700 of ARCHTEST
Line 44 of ARCHTEST

but i checked all my data and there is definitely no missing value...

secondly, i would like to know whether there is any code for multivariate Jarque-Bera?
Attachments
archtest.src
(2.73 KiB) Downloaded 56 times
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby TomDoan » Mon Jan 23, 2012 10:17 pm

mmkubilay wrote:when i apply the code for the archtest, there is an error:

@ARCHTest(lags=5, dfc=1) r1 r2 r3 2004:01:07 2011:12:30

## SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
The Error Occurred At Location 0700 of ARCHTEST
Line 44 of ARCHTEST

but i checked all my data and there is definitely no missing value...

secondly, i would like to know whether there is any code for multivariate Jarque-Bera?


@ARCHTEST applies to one series at a time, so you want:

@ARCHTest(lags=5, dfc=1) r1 2004:01:07 2011:12:30
@ARCHTest(lags=5, dfc=1) r2 2004:01:07 2011:12:30
@ARCHTest(lags=5, dfc=1) r3 2004:01:07 2011:12:30

@MVARCHTEST (http://www.estima.com/forum/viewtopic.php?f=7&t=928) does a multivariate ARCH test.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Tue Jan 24, 2012 4:38 am

hej Tom,

i still have some problems for these two tests. :(
for MVARCHTest:

@MVARCHTest(lags=5) 2004:01:07 2011:12:30
## SX9. REPORT is not a Basic Data Type
>>>>local report <<<<
# resvar(1) resvar(2) resvar(3)

for MVJB:

@MVJB resvar(1) resvar(2) resvar(3) 2004:01:07 2011:12:30
## OP3. This Instruction Does Not Have An Option TIT
>>>>ction=define,title=<<<<
Attachments
mvarchtest.src
(2.68 KiB) Downloaded 37 times
MVJB.SRC
(2.17 KiB) Downloaded 53 times
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby TomDoan » Tue Jan 24, 2012 11:38 am

That's because you're running a version of RATS that's older than those procedures. You can take the TITLE="...." option off the REPORT line in MVJB to get that to work with what you have. To adjust MVARCHTEST, you would have to get rid of the LOCAL REPORT AREPORT line, and all the USE=AREPORT options. Of course, updating to a newer version of RATS would take care of all of that, since it would come with the newest versions of the procedures.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Tue Jan 24, 2012 12:57 pm

unfortunately, i still have a problem with MVJB test. :(
i have to use the option of sigma or factor. but when i insert them, the error messages occur. :(


@MVJB(factor=rectangular) resvar 2004:01:07 2011:12:30
## SX11. Identifier RECTANGULAR is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>factor=rectangular)<<<<
## SX11. Identifier SYMM is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>@MVJB(sigma=symm)<<<<
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby moderator » Tue Jan 24, 2012 1:31 pm

You've misunderstood the descriptions of the options. Options for procedures work just like options for instructions, so when you see a description of an option like this:

* FACTOR=RECTANGULAR factor of the covariance matrix of u.

you implement the option using the syntax:

FACTOR=matrixname

where "matrixname" is a matrix that you have created previously. In this case, you can use SIGMA to supply the name of your covariance matrix, or FACTOR to supply a factor matrix that you have computed.

For example, if your covariance matrix is called COVMAT, you could do:

@MVJB(sigma=covmat) resvar 2004:01:07 2011:12:30

Regards,
Tom Maycock
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Tue Jan 24, 2012 1:51 pm

thanks a lot, Tom & Tom :)

i have one final question. i would like to add some exogenous variable into VAR GARCH BEKK model. is there any easy direct way of inserting these exogenous variables in the form of X'X to protect covariance stantionarity while using GARCH instruction?
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby TomDoan » Wed Jan 25, 2012 11:43 am

It wouldn't be covariance stationary that you're trying to maintain, but positive definiteness. Yes. The variance shift variables in a BEKK operate like the intercept --- they're multiplied by a positive semi-definite matrix parameterized in Choleski factor form.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Wed Jan 25, 2012 4:16 pm

i still have 1 more question, i would be glad if you can help me. :)

to apply MVJB test, i need the covariance matrix of the residuals. these are the residuals of the multivariate GARCH and they are in the form of series[vector]. i have to convert them into vector[series] to apply the test. how is that conversion possible..?
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby moderator » Thu Jan 26, 2012 10:34 am

You can use SET instructions (after declaring the VECTOR of SERIES) to rearrange data from a series of arrays into an array of series. If you have version 8, see page 302 of the User;'s Guide for an example.

Regards,
Tom Maycock
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Thu Jan 26, 2012 2:30 pm

thanks Tom,

but i still have a problem with this. do you think that the reason is version 7 of RATS?
{ residual is the data in the form of series[vector]. it is the series of 3 resids of the MV GARCH model } { theta is the new name of residual in the form of vector[series] }

declare vector[series] theta
set theta 2004:01:07 2011:12:30 = residual
## SX22. Expected Type SERIES, Got VECTOR(SERIES) Instead
>>>>set theta <<<<

@MVJB(sigma=varcov2) theta 2004:01:07 2011:12:30
## MAT1. Matrix THETA Has Not Been Dimensioned
The Error Occurred At Location 0067 of MVJB
Line 14 of MVJB


by the way, thank you very much for helping to my questions so far. i am gonna remember "Tom Doan" and "Tom Maycock" at the acknowledgement part of my M.S. Thesis ;)
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby moderator » Thu Jan 26, 2012 5:05 pm

If you have version 7, see pages 433-435 for the comparable example of copy data out of an array of series into separate series. That example copies the data into regular series rather than elements of an array of series, but much of the information applies.

With respect to what you tried here:

declare vector[series] theta
set theta 2004:01:07 2011:12:30 = residual

You have at least two problems. First, you need to dimension THETA. Second, SET can only set one series, not an entire array of series, so you need to reference a particular element of THETA. Something like:

declare vector[series] theta(2)
set theta(1) 2004:01:07 2011:12:30 = ....
set theta(2) 2004:01:07 2011:12:30 = ....

I can't say what the right hand side should be without knowing exactly how "RESIDUAL" is defined or what you are trying to do.

Regards,
Tom
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Thu Jan 26, 2012 5:24 pm

thank you so much Tom, it worked perfectly :)

now i should focus on how to decline LB and MV ARCH test statistics to have a better model. after that, i would be ready to conclude my thesis.

thank you very much again, take it easy ;)
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm

Re: MULTIVARIATE ARCH AND JARQUE-BERA TESTS

Postby mmkubilay » Tue Jan 31, 2012 4:32 pm

unfortunately i am here for a new question :(

when i would like to apply the same model to 2 subsamples (i created 2 new excel and rats files), i got the convergence in the first iteration and almost all parameters are 0. i have not got this problem for the entire sample and i still have a lot of observations for the subsamples (1250 for the first and 850 for the second subsample). to solve this problem i give up using robust standard errors, increase the number of piters and subiterations to 1000. the optimization method i use is bfgs and as a initial method simplex.

thats the code which i applied to whole sample and got the convergence...


garch(p=1, q=1, xregressors, model=VECMGARCHBEKK, mvhmatrices=covariance, hmatrices=h, rvectors=residual, mv=bekk, method=bfgs, pmethod=simplex, piters=100, iterations=10000, subiterations=1000, cvcrit=0.00000001, robusterrors)
# residsq4{1} residsq5{1} residsq6{1}
mmkubilay
 
Posts: 8
Joined: Thu Jan 19, 2012 3:03 pm


Return to ARCH and GARCH Models

Who is online

Users browsing this forum: No registered users and 1 guest