Thank you very much. The following program is fine for other data (more than 3000 observations) but it report ##MAT15 as shown in the output below. Could you please advise the reason and solution? Is is problem come from 1325 observations for this program?
Thank you
Hung.
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,2)
system(model=varmah)
variables rogviet rogus
lags 1
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)
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
Code: Select all
MV-GARCH, BEKK - Estimation by BFGS
Convergence in 186 Iterations. Final criterion was 0.0000000 <= 0.0000100
Daily(5) Data From 2009:01:05 To 2014:01:31
Usable Observations 1325
Log Likelihood -4859.3586
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. ROGVIET{1} -2.738396734 1.209987132 -2.26316 0.02362571
2. ROGUS{1} -2.853725728 0.981046127 -2.90886 0.00362749
3. Constant 1.154269013 0.507851850 2.27285 0.02303547
4. EPS(1){1} 2.788587596 1.212052832 2.30071 0.02140777
5. EPS(2){1} 3.058551651 0.975575983 3.13512 0.00171781
6. EPS(1){2} 0.126313112 0.112760344 1.12019 0.26263242
7. EPS(2){2} 0.587871904 0.300989229 1.95313 0.05080387
8. SQRTH(1) -0.014794419 0.153268254 -0.09653 0.92310258
9. SQRTH(2) -0.675674909 0.313069010 -2.15823 0.03090996
10. ROGVIET{1} 2.865050231 1.347163702 2.12673 0.03344272
11. ROGUS{1} 2.897280167 1.108791147 2.61301 0.00897492
12. Constant -0.826555134 0.462079904 -1.78877 0.07365170
13. EPS(1){1} -2.864615392 1.346329210 -2.12772 0.03336007
14. EPS(2){1} -2.873769480 1.102642238 -2.60626 0.00915376
15. EPS(1){2} -0.138278161 0.117261187 -1.17923 0.23830575
16. EPS(2){2} -0.633469586 0.326450995 -1.94047 0.05232214
17. SQRTH(1) -0.015669925 0.118387563 -0.13236 0.89469857
18. SQRTH(2) 0.522904535 0.262990349 1.98830 0.04677817
19. C(1,1) 0.656860634 0.090670926 7.24445 0.00000000
20. C(2,1) -0.051489018 0.051416212 -1.00142 0.31662572
21. C(2,2) 0.154841648 0.030491157 5.07825 0.00000038
22. A(1,1) 0.393865616 0.038810071 10.14854 0.00000000
23. A(1,2) 0.019908753 0.022344926 0.89097 0.37294300
24. A(2,1) -0.040764790 0.043373191 -0.93986 0.34728864
25. A(2,2) 0.092651099 0.041889948 2.21177 0.02698228
26. B(1,1) 0.853747395 0.031396878 27.19211 0.00000000
27. B(1,2) 0.001017815 0.016230305 0.06271 0.94999680
28. B(2,1) 0.024290642 0.015043845 1.61466 0.10638510
29. B(2,2) 0.951992102 0.008101793 117.50387 0.00000000
30. D(1,1) -0.028890267 0.113369388 -0.25483 0.79885205
31. D(1,2) 0.026287471 0.029676964 0.88579 0.37573228
32. D(2,1) -0.017947745 0.054973976 -0.32648 0.74406340
33. D(2,2) 0.356511012 0.033911363 10.51303 0.00000000
## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 1