Page 1 of 3

VARMA GARCH Model

Posted: Mon Mar 05, 2012 2:44 pm
by TomDoan
This is an example which estimates a multivariate GARCH model with VARMA mean models. It actually does both VAR-GARCH and VARMA-GARCH. This requires RATS version 8.1 or later for the simple coding using GARCH, as it makes use of the UADJUST option.

Note that this is only intended to show the process of estimating such a model. The VARMA(1,1) on this data set is almost certainly overparameterized, as the log likelihood gain (versus the simpler VAR-GARCH) is only about 11 for 9 extra parameters.
varmagarch.rpf
Program file
(1.75 KiB) Downloaded 2748 times
exrates(daily).xls
Data file
(365.5 KiB) Downloaded 1977 times

Re: VARMA GARCH Model

Posted: Wed Mar 28, 2012 8:11 am
by IRJ
Is there any reference to a paper/textbook that uses the VARMA GARCH model?

Re: VARMA GARCH Model

Posted: Wed Mar 28, 2012 1:05 pm
by TomDoan
See Rahman and Serletis(2012), "Oil price uncertainty and the Canadian economy: Evidence from a VARMA, GARCH-in-Mean, asymmetric BEKK model", Energy Economics, Volume 34, Issue 2, March 2012, 603–610. Looks like it was done with RATS.

Note, BTW, that VARMA-GARCH is used for two completely different ideas. This is for a VARMA mean model. There's also the VARMA-GARCH variance process of Ling and McAleer, which is implemented in RATS using the options MV=CC and VARIANCES=VARMA. That allows use of the simpler CC model but with spillovers in the variances.

Re: VARMA GARCH Model

Posted: Fri Mar 30, 2012 7:09 pm
by lumengobobo46
Dear Tom

I would assume that the option hmatrices=hh should be included in the GARCH model, especially in the case of a GARCH-M where the mean equation should include hh. therefore I have two questions: 1. what is the meaning of unadjust=%pt(u,t,rv(t)). 2. How to include the variance in the mean equation in the absence of hmatrices as option in the GARCH programme?

Re: VARMA GARCH Model

Posted: Sat Mar 31, 2012 10:07 am
by TomDoan
lumengobobo46 wrote:Dear Tom

I would assume that the option hmatrices=hh should be included in the GARCH model, especially in the case of a GARCH-M where the mean equation should include hh. therefore I have two questions: 1. what is the meaning of uadjust=%pt(u,t,rv(t)).
It takes the RV element just computed and splits it into the VEC[SERIES] u so lagged u's will be available to evaluate the mean at future values of t.
lumengobobo46 wrote: 2. How to include the variance in the mean equation in the absence of hmatrices as option in the GARCH programme?
You use the HADJUST option, as in the following, which is a VARMA(2,1)-BEKK-GARCH-M (square root) model.

Code: Select all

dec vect[series] sqrth(2)
dec vect[series] eps(2)
*
system(model=varmah)
variables ipg infl
lags 1 2
det constant eps(1){1} eps(2){1} eps(1){2} eps(2){2} sqrth(1) sqrth(2)
end(system)
*
clear(zeros) sqrth eps
*
* Do three iterations on the VARMA part to get an initial value for the
* covariance matrix.
*
do iters=1,3
   estimate(noprint,resids=resids)
   set eps(1) %regstart() * = resids(1)
   set eps(2) %regstart() * = resids(2)
end do iters
*
compute cv0=%sigma
*
garch(model=varmah,mv=bekk,asymmetric,rvectors=rv,hmatrices=hh,presample=cv0,$
  uadjust=%pt(eps,t,rv(t)),hadjust=%pt(sqrth,t,%sqrt(%xdiag(hh(t)))),$
  pmethod=simplex,piters=20)

Re: VARMA GARCH Model

Posted: Thu Aug 23, 2012 8:40 am
by Bella
dear Tom,
I'd like to ask for a code for Wald test and likelihood ratio test within a VARMA(2,1)-asymmetric BEKK-GARCH-M (square root) model
for a12=b12=d12=a21=b21=d21=0, that is testing whether all coefficients including a12、b12、d12、a21、b21and d21 equal to 0?
the variance equation is showed in the following picture. I have tried to compile the code by myself but I don't know how to start it.
I would be very grateful for your instructions.

regards

Bella

Re: VARMA GARCH Model

Posted: Thu Aug 23, 2012 8:55 am
by Bella
dear Tom
I mean the null Hypothesis is: all the coefficients including a11、a12、b12、d12、a21、b21、d21are simultaneously zero
that is Null Hypothesis: a12=b12=d12=a21=b21=d21=0.

Re: VARMA GARCH Model

Posted: Thu Aug 23, 2012 12:18 pm
by TomDoan
You can do a Wald test using

TEST(ZEROS)
# list of positions that you want to test

It would probably be easiest to just look at the output from the GARCH instruction to figure out what positions you want to test. For maximum likelihood, you would have to estimate the DBEKK model using MAXIMIZE to do the comparison. (Note: MV=DBEKK was added to GARCH with RATS 8.3).

Re: VARMA GARCH Model

Posted: Thu Aug 23, 2012 8:29 pm
by Bella
I am sorry that i have another question. Are the coefficients from the variance model of a GARCH model stored in a vector like %BETA? How can i get the coefficients in A(1,2)、A(2,1)、B(1,2)、B(2,1)、D(1,2) and D(2,1).

The following is the output of a VARMA-GARCH-BEKK model.
regards
Bella

Code: Select all

MV-GARCH, BEKK - Estimation by BFGS
NO CONVERGENCE IN 59 ITERATIONS
LAST CRITERION WAS  0.0000000
SUBITERATIONS LIMIT EXCEEDED.
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
Monthly Data From 1995:03 To 2011:12
Usable Observations                       202
Log Likelihood                       971.6380

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  SZ{1}                        -0.117936006  0.042492735     -2.77544  0.00551272
2.  SZ{2}                         0.141955468  0.011608641     12.22843  0.00000000
3.  CPI{1}                       -0.589937420  0.051885908    -11.36990  0.00000000
4.  CPI{2}                       -0.035847550  0.176604592     -0.20298  0.83914912
5.  Constant                     -0.012676657  0.004790693     -2.64610  0.00814256
6.  EPS(1){1}                     0.167128638  0.028361500      5.89280  0.00000000
7.  EPS(2){1}                     1.161043728  0.075180334     15.44345  0.00000000
8.  EPS(1){2}                     0.006151929  0.021264000      0.28931  0.77234267
9.  EPS(2){2}                     0.958279096  0.270894842      3.53746  0.00040400
10. SQRTH(1)                      0.118908118  0.047816686      2.48675  0.01289161
11. SQRTH(2)                      1.575369594  0.633793325      2.48562  0.01293258
12. SZ{1}                        -0.014364113  0.001753380     -8.19224  0.00000000
13. SZ{2}                        -0.074823279  0.001158599    -64.58081  0.00000000
14. CPI{1}                        0.086281249  0.003676484     23.46841  0.00000000
15. CPI{2}                       -0.878388590  0.012013064    -73.11945  0.00000000
16. Constant                      0.007155170  0.000417686     17.13052  0.00000000
17. EPS(1){1}                    -0.007189545  0.001427283     -5.03722  0.00000047
18. EPS(2){1}                     0.217551239  0.004243445     51.26760  0.00000000
19. EPS(1){2}                     0.064254898  0.001542754     41.64949  0.00000000
20. EPS(2){2}                     0.993663770  0.020914492     47.51078  0.00000000
21. SQRTH(1)                      0.065441274  0.004677328     13.99117  0.00000000
22. SQRTH(2)                     -1.305522046  0.073720331    -17.70912  0.00000000
23. C(1,1)                        0.006132869  0.003087594      1.98629  0.04700069
24. C(2,1)                        0.002469577  0.000314131      7.86162  0.00000000
25. C(2,2)                        0.003664780  0.000322173     11.37520  0.00000000
26. A(1,1)                        0.332852470  0.051451335      6.46927  0.00000000
27. A(1,2)                        0.008766603  0.003843537      2.28087  0.02255622
28. A(2,1)                        2.929005849  0.698602279      4.19267  0.00002757
29. A(2,2)                        0.421650503  0.033092739     12.74148  0.00000000
30. B(1,1)                        0.909580947  0.017822438     51.03572  0.00000000
31. B(1,2)                       -0.002947026  0.003228065     -0.91294  0.36127467
32. B(2,1)                       -2.720891012  0.532671316     -5.10801  0.00000033
33. B(2,2)                        0.277304168  0.028687648      9.66633  0.00000000
34. D(1,1)                       -0.177803372  0.110317189     -1.61175  0.10701706
35. D(1,2)                       -0.060930740  0.004176135    -14.59022  0.00000000
36. D(2,1)                       -0.004553960  1.497792448     -0.00304  0.99757408
37. D(2,2)                        0.455855798  0.044716865     10.19427  0.00000000

Re: VARMA GARCH Model

Posted: Thu Aug 23, 2012 9:14 pm
by TomDoan
Yes. %BETA. You can see the sequence numbers in the output. So %beta(31) is, for instance, B(1,2)

Re: VARMA GARCH Model

Posted: Fri Aug 31, 2012 5:35 am
by Bella
Dear Tom

When I run the code about a VARMA(2,2)-GARCH-BEKK, I get different results if I change the order of variables. How is it caused?
It's like
system(model=varmah)
variables mb zjz
lags 1 2
det constant eps(1){1} eps(2){1} eps(1){2} eps(2){2} sqrth(1) sqrth(2)
end(system)

But if I change the code into
system(model=varmah)
variables zjz mb
lags 1 2
det constant eps(1){1} eps(2){1} eps(1){2} eps(2){2} sqrth(1) sqrth(2)
end(system)

I get different estimated coefficients.
It is the code and data enclosed.

Re: VARMA GARCH Model

Posted: Fri Aug 31, 2012 9:41 am
by TomDoan
Note--you don't get different estimated coefficients, you get no estimated coefficients. Neither model converges.

Is there a reason that you're trying to estimate a VARMA(2,2)-Asymmetric-BEKK-GARCH-M model with this data set? You only have 168 data points, which is nowhere near enough to estimate such a complicated model, and neither of your time series has very convincing evidence of GARCH effects.

Re: VARMA GARCH Model

Posted: Sun Jun 02, 2013 2:45 pm
by abi
Hello,
i need the RATS code for article of Rahman and Serletis(2012), "Oil price uncertainty and the Canadian economy: Evidence from a VARMA, GARCH-in-Mean, asymmetric BEKK model", Energy Economics, Volume 34, Issue 2, March 2012, 603–610. could you pleas help me.

regards
abi

Re: VARMA GARCH Model

Posted: Wed Jun 05, 2013 10:12 am
by TomDoan
abi wrote:Hello,
i need the RATS code for article of Rahman and Serletis(2012), "Oil price uncertainty and the Canadian economy: Evidence from a VARMA, GARCH-in-Mean, asymmetric BEKK model", Energy Economics, Volume 34, Issue 2, March 2012, 603–610. could you pleas help me.

regards
abi
The authors are working on some extensions and would like to keep it private for now. The setup for the model (for different data) is covered in earlier posts in this thread. Is there some specific question you had?

Re: VARMA GARCH Model

Posted: Wed Jun 26, 2013 5:57 am
by abi
Dear Tom,
Thank you for quick reply. could you please tell me if i want to estimate VARMA model by using quasi maximum likelihood methods, how can i do this? indeed what code is necessary to run QML estimator? should i use MAXIMIZE instruction?

Regards,