VARMA-GARCH-BEKK. no convergence in Rats 9.1

Discussions of ARCH, GARCH, and related models
h2do
Posts: 3
Joined: Tue Sep 13, 2016 11:48 pm

VARMA-GARCH-BEKK. no convergence in Rats 9.1

Unread post by h2do »

Dear Tom

Previously, I used Rats 8.3 and I had a convergence but no-convergence in the Rats 9.1. Could you please explain and help to get a convergence?
In addition, in other estimations, estimates from these two versions are little bit different. Why is the case?

Code: Select all

* VARMA-MGARCH-asymmetry BEKK model.

OPEN DATA "C:\oilgas.xlsx"
CALENDAR(D) 2000:1:4
Allocate 2014:1:31
DATA(FORMAT=XLSX,ORG=COLUMNS) 2000:1:4 2014:1:31 rogindo rogmalay rogphil rogsing rogthai rogviet rogus rogasia
dec vect[series] sqrth(2)
dec vect[series] eps(2)

* VARMA (1,1)
system(model=varmah)
variables rogsing rogus
lags 1
det constant eps(1){1} eps(2){1} 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, variances=spillover, 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)
/*
asymmetric,
*/
set z1 = rv(t)(1)/sqrt(hh(t)(1,1))
set z2 = rv(t)(2)/sqrt(hh(t)(2,2))
set z1sq = z1**2
set z2sq = z2**2
@bdindtests z1
@bdindtests z2
dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
compute %pt(zu,time,%solve(%decomp(hh(time)),rv(time)))
end do time


*Ljung-Box Q-statistics of joint standardized residuals
@mvqstat(lag=5)
# zu
*Ljung-Box Q-statistics of joint standardized residual
@mvqstat(lags=10)
# zu

*Ljung-Box Q-statistics of square of joint standardized residuals
@mvarchtest (lags=5)
#zu
*Ljung-Box Q-statistics of square of joint standardized residuals
@mvarchtest (lags=10)
#zu

@regcorrs(report,number=10) z1
@regcorrs(report,number=10) z1sq

@regcorrs(report,number=10) z2
@regcorrs(report,number=10) z2sq

/*
corr(number=6,qstats) z1sq
corr(number=6,qstats) z2sq
*/
Attachments
OG_sing_us_out.RPF
(5.95 KiB) Downloaded 944 times
oilgas.xlsx
(415.37 KiB) Downloaded 649 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VARMA-GARCH-BEKK. no convergence in Rats 9.1

Unread post by TomDoan »

9.1 uses better guess values for the variance constant in the BEKK model. You can get convergence in 9.1 by cutting the SIMPLEX iterations down to 10. (It actually is converged without the change, but doesn't fully pass the diagnostics for convergence).

Your "VARMA" model is grossly overparameterized. Three of the four pairs show signs of cancellation (the AR and MA are almost equal and of opposite signs) and the other one has two rather small coefficients. The near cancellation means that even fairly large simultaneous changes to both will have almost no effect on the likelihood. Fix your mean model and the model will work better.
h2do
Posts: 3
Joined: Tue Sep 13, 2016 11:48 pm

Re: VARMA-GARCH-BEKK. no convergence in Rats 9.1

Unread post by h2do »

Dear Tom

Thank you very much for your prompt response and advice. I'd like to eliminate autocorrelation in residual at 5% up to lag 5 so I add some AR and MA terms that could make overparameterization. Could you please suggest how could I fix the mean model?

In addition, I ran the same model for another series but It could not converge although I set iteration=10 or, 5, or remove "symmetric". You can see that I tried with 4 different VARMA models. The data is the same as the file I uploaded in my first post.

Code: Select all

* VARMA-MGARCH-asymmetry BEKK model.

OPEN DATA "C:\BasicM.xlsx"
CALENDAR(D) 2000:1:4
Allocate 2014:1:31
DATA(FORMAT=XLSX,ORG=COLUMNS) 2000:1:4 2014:1:31 rogindo rogmalay rogphil rogsing rogthai rogviet rogus rogasia
dec vect[series] sqrth(2)
dec vect[series] eps(2)

/*
* VARMA (1,1)
system(model=varmah)
variables rogindo rogus
lags 1
det constant eps(1){1} eps(2){1} sqrth(1) sqrth(2)
end(system)
*/

/*
* VARMA (2,1)
system(model=varmah)
variables rogindo rogus
lags 1 2
det constant eps(1){1} eps(2){1} sqrth(1) sqrth(2)
end(system)
*/
/*
* VARMA (1,2)
system(model=varmah)
variables rogindo rogUS
lags 1
det constant eps(1){1} eps(2){1} eps(1){2} eps(2){2}sqrth(1) sqrth(2)
end(system)
*
*/
/*
* VARMA (2,2)
system(model=varmah)
variables rogindo rogus
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, variances=spillover, 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)
/*
asymmetric,
*/
set z1 = rv(t)(1)/sqrt(hh(t)(1,1))
set z2 = rv(t)(2)/sqrt(hh(t)(2,2))
set z1sq = z1**2
set z2sq = z2**2
@bdindtests z1
@bdindtests z2
dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
compute %pt(zu,time,%solve(%decomp(hh(time)),rv(time)))
end do time


*Ljung-Box Q-statistics of joint standardized residuals
@mvqstat(lag=5)
# zu
*Ljung-Box Q-statistics of joint standardized residual
@mvqstat(lags=10)
# zu

*Ljung-Box Q-statistics of square of joint standardized residuals
@mvarchtest (lags=5)
#zu
*Ljung-Box Q-statistics of square of joint standardized residuals
@mvarchtest (lags=10)
#zu

@regcorrs(report,number=10) z1
@regcorrs(report,number=10) z1sq

@regcorrs(report,number=10) z2
@regcorrs(report,number=10) z2sq

/*
corr(number=6,qstats) z1sq
corr(number=6,qstats) z2sq
*/
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VARMA-GARCH-BEKK. no convergence in Rats 9.1

Unread post by TomDoan »

  1. Why are you only looking at VARMA models for the mean? It's the "MA" in the VARMA that causes the parameterization problems. I'm not sure I'm ever seen a VARMA-GARCH model where there was any compelling reason to do a VARMA rather than a simpler VAR, other than to do something different.
  2. With 3500+ data points, you are unlikely to ever come up with a mean model which passes a Q test at even the .01 level. If you look, you'll see that the correlations themselves are trivially small---they're only "significant" because of the huge number of data points.
h2do
Posts: 3
Joined: Tue Sep 13, 2016 11:48 pm

Re: VARMA-GARCH-BEKK. no convergence in Rats 9.1

Unread post by h2do »

Dear TomDoan

Thank you very much for your reply.

Best regards,
h2do
Post Reply