No convergence in Bivariate GARCH in Mean

Discussions of ARCH, GARCH, and related models
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi,
I am trying to estimate a Bivariate GARCH in mean model. However, on running my code I receive warnings about non-convergence. I tried changing the NLPAR DERIVE option, but that does not help either. I do obtain some results that seem reasonable. However, I am worried that results of a procedure that did not converge cannot be trusted. Does this mean my model is mis-specified and I should not attempt this any further? Or are there other techniques I could try to see if converge might be possible?
I am a beginner with Estima and time series analysis. I really appreciate your help!

Here is my code and results follow:

Code: Select all

* Declare the series to store conditional variances
dec symm[series] hh(2,2)
clear(zeroes) hh

* wholesale mz equation
equation(ar=1,ma=1,constant,regressors) eq_whol lretwhol
#  jan feb mar apr may jun jul aug sep oct nov hh(1,1) hh(2,2)

* retail mz equation
equation(ar=1,ma=1,constant,regressors) eq_retail lretretail
# jan feb mar apr may jun jul aug sep oct nov hh(1,1) hh(2,2)

group meanmodel eq_whol eq_retail

* Bivariate GARCH in mean

garch(model=meanmodel,p=1,q=1,robusterrors,mvhseries=hh,pmethod=simplex,piters=10)
Results:
MV-GARCH - Estimation by BFGS
NO CONVERGENCE IN 31 ITERATIONS. FINAL NORMED GRADIENT 8.18552e+06
SUBITERATIONS LIMIT EXCEEDED.
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY DIFFERENT SETTING FOR EXACTLINE, DERIVES OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES/PMETHOD OPTION MIGHT ALSO WORK

With Heteroscedasticity/Misspecification Adjusted Standard Errors
Monthly Data From 1994:03 To 2012:03
Usable Observations 217
Log Likelihood 308.7726

Variable Coeff Std Error T-Stat Signif
************************************************************************************
Mean Model(LRETWHOL)
1. Constant 0.016795929 0.005943597 2.82589 0.00471500
2. LRETWHOL{1} 0.843657376 0.092240734 9.14626 0.00000000
3. JAN -0.018657679 0.043054799 -0.43335 0.66476251
4. FEB -0.061768898 0.002458309 -25.12658 0.00000000
5. MAR -0.043817700 0.004232173 -10.35348 0.00000000
6. APR -0.178501023 0.084978859 -2.10053 0.03568185
7. MAY -0.036835938 0.021144052 -1.74214 0.08148362
8. JUN 0.066045570 0.056060967 1.17810 0.23875572
9. JUL 0.037410851 0.014751110 2.53614 0.01120826
10. AUG 0.034110637 0.012366412 2.75833 0.00580976
11. SEP -0.028987974 0.019682424 -1.47278 0.14080907
12. OCT 0.016778320 0.060089462 0.27922 0.78007420
13. NOV -0.004088396 0.053538906 -0.07636 0.93913023
14. HH(1,1) 0.044017910 0.049533632 0.88865 0.37419286
15. HH(2,2) -0.037047509 0.058280055 -0.63568 0.52498453
16. Mvg Avge{1} -1.039173631 0.035188864 -29.53132 0.00000000
Mean Model(LRETRETAIL)
17. Constant 0.071590141 0.003703160 19.33217 0.00000000
18. LRETRETAIL{1} 0.015752674 0.280699939 0.05612 0.95524680
19. JAN -0.038112598 0.090585776 -0.42073 0.67394867
20. FEB -0.033556303 0.039514021 -0.84923 0.39575599
21. MAR -0.067200707 0.036495555 -1.84134 0.06557182
22. APR -0.200183210 0.030196695 -6.62931 0.00000000
23. MAY -0.252802905 0.067919895 -3.72207 0.00019759
24. JUN -0.108717566 0.094968789 -1.14477 0.25230381
25. JUL -0.089065842 0.023421454 -3.80275 0.00014310
26. AUG -0.002311902 0.024483050 -0.09443 0.92476864
27. SEP -0.079614313 0.038456514 -2.07024 0.03842963
28. OCT -0.023089596 0.027946924 -0.82619 0.40869375
29. NOV -0.023471318 0.060267552 -0.38945 0.69694181
30. HH(1,1) 0.046407525 0.171942298 0.26990 0.78723585
31. HH(2,2) -0.110233626 0.354073360 -0.31133 0.75554984
32. Mvg Avge{1} 0.036228203 0.045175139 0.80195 0.42258188

33. C(1,1) 0.002942715 0.002517999 1.16867 0.24253584
34. C(2,1) 0.002261555 0.001002961 2.25488 0.02414103
35. C(2,2) 0.002640079 0.002503963 1.05436 0.29171808
36. A(1,1) 0.215992843 0.130728865 1.65222 0.09848972
37. A(2,1) -0.028035274 0.209533807 -0.13380 0.89356205
38. A(2,2) 0.180931544 0.067079669 2.69726 0.00699119
39. B(1,1) 0.677695570 0.036928152 18.35173 0.00000000
40. B(2,1) -0.338726114 0.621624229 -0.54490 0.58581890
41. B(2,2) 0.592921252 0.101640357 5.83352 0.00000001
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

Why are you doing ARMA mean models in addition to everything else going on? The LRETWHOL model is showing strong signs of cancellation in the ARMA terms.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
Thanks for the reply. I was exploring the simplest mean models that would provide no serial correlation in residuals for a reasonable number of lags (6-12 for my work). I wanted to keep the same mean model for both variables and ARMA(1,1) with monthly dummies appeared to be the best. I am primarily interested in seeing if the conditional variances of these variables have an affect on the price returns.
I hear your concern about the cancellation of the AR and MA terms. I re-ran this model with AR(1) for the lertwhol mean model. Still no convergence. Please could you advise about the validity of these results? Should I not depend on these estimates at all? Or can I use them with some caveats? How can I better understand these warnings about the convergence? Can something be done to achieve convergence?

Thanks a lot for the help!
Aakanksha

Here are my results:
MV-GARCH - Estimation by BFGS
NO CONVERGENCE IN 23 ITERATIONS. FINAL NORMED GRADIENT 338828.35063
SUBITERATIONS LIMIT EXCEEDED.
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT
TRY DIFFERENT SETTING FOR EXACTLINE, DERIVES OR ALPHA ON NLPAR
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES/PMETHOD OPTION MIGHT ALSO WORK

With Heteroscedasticity/Misspecification Adjusted Standard Errors
Monthly Data From 1994:03 To 2012:03
Usable Observations 217
Log Likelihood 301.3444

Variable Coeff Std Error T-Stat Signif
************************************************************************************
Mean Model(LRETWHOL)
1. Constant 0.067665168 0.006457111 10.47917 0.00000000
2. LRETWHOL{1} -0.085631786 0.052394998 -1.63435 0.10218529
3. JAN 0.011380000 0.037972005 0.29969 0.76441022
4. FEB -0.145617093 0.042803178 -3.40202 0.00066891
5. MAR -0.139133287 0.073041583 -1.90485 0.05679952
6. APR -0.250125735 0.030422534 -8.22173 0.00000000
7. MAY -0.296595233 0.038206845 -7.76288 0.00000000
8. JUN -0.182889269 0.029875155 -6.12178 0.00000000
9. JUL -0.106575760 0.050184525 -2.12368 0.03369710
10. AUG -0.053657968 0.053911793 -0.99529 0.31959434
11. SEP -0.066747294 0.036489183 -1.82924 0.06736440
12. OCT -0.019007611 0.050402215 -0.37712 0.70608550
13. NOV -0.003043993 0.051916002 -0.05863 0.95324439
14. HH(1,1) 1.574492919 0.496490973 3.17124 0.00151789
15. HH(2,2) -1.162457340 0.639974186 -1.81641 0.06930706
Mean Model(LRETRETAIL)
16. Constant 0.071037623 0.005499470 12.91718 0.00000000
17. LRETRETAIL{1} 0.046201178 0.081121922 0.56953 0.56899811
18. JAN -0.009603895 0.036380851 -0.26398 0.79179369
19. FEB -0.039883902 0.026733418 -1.49191 0.13572228
20. MAR -0.091296716 0.028927406 -3.15606 0.00159914
21. APR -0.210647680 0.012844146 -16.40029 0.00000000
22. MAY -0.261823842 0.019011223 -13.77207 0.00000000
23. JUN -0.115650000 0.035777624 -3.23247 0.00122726
24. JUL -0.078311781 0.015510710 -5.04888 0.00000044
25. AUG -0.018166422 0.020993083 -0.86535 0.38684522
26. SEP -0.091929622 0.027068770 -3.39615 0.00068341
27. OCT -0.013123817 0.024621793 -0.53302 0.59402230
28. NOV -0.022251537 0.018909473 -1.17674 0.23929921
29. HH(1,1) 0.276692376 0.172497639 1.60404 0.10870618
30. HH(2,2) 0.327581435 0.344015387 0.95223 0.34098085
31. Mvg Avge{1} 0.085704835 0.034769794 2.46492 0.01370430

32. C(1,1) 0.005082214 0.000716667 7.09145 0.00000000
33. C(2,1) 0.006405008 0.000994213 6.44229 0.00000000
34. C(2,2) 0.003330506 0.000164703 20.22124 0.00000000
35. A(1,1) 0.254922712 0.024242266 10.51563 0.00000000
36. A(2,1) -0.205522273 0.001448312 -141.90466 0.00000000
37. A(2,2) 0.196013095 0.058300977 3.36209 0.00077355
38. B(1,1) 0.581165085 0.032134485 18.08540 0.00000000
39. B(2,1) -0.764632030 0.010250007 -74.59820 0.00000000
40. B(2,2) 0.533632528 0.039560709 13.48895 0.00000000
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

Have you successfully fit univariate GARCH models to either? Assuming that those are in straight logs (not 100xlog(..)), the seasonals are really strong. I don't know how easy it will be to do a GARCH model with monthly data on data like that.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
Apologies for the late reply on this. Yes, I have been able to fit the univariate models for both. I am considering setting initial values with help of the estimates of the univariate model. Would you suggest that as a potential solution? Thanks so much for the help!

Here are the codes and results:

Code: Select all

* U-GARCH for wholesale mz
* Initial anaylsis to obtain starting values of time varying var-covar
garch(p=1, q=1,hseries=hh) / lretwhol

* Set variable for conditional variance of wholesale maize
set wholhh = hh

* Mean eq
equation(ar=1, ma=1, constant,regressors) eq_whol lretwhol
# jan feb mar apr may jun jul aug sep oct nov wholhh

garch(equation=eq_whol, p=1, q=1,hseries=hh,hadjust=(wholhh=hh),robusterrors)
Here are the results:

GARCH Model - Estimation by BFGS
Convergence in 42 Iterations. Final criterion was 0.0000012 <= 0.0000100

With Heteroscedasticity/Misspecification Adjusted Standard Errors
Dependent Variable LRETWHOL
Monthly Data From 1994:03 To 2012:03
Usable Observations 217
Log Likelihood 96.4057

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.079475252 0.039995849 1.98709 0.04691270
2. LRETWHOL{1} 0.414743194 0.222661991 1.86266 0.06251036
3. JAN -0.083389957 0.058259403 -1.43136 0.15232816
4. FEB -0.148169951 0.059519658 -2.48943 0.01279485
5. MAR -0.112818468 0.084424755 -1.33632 0.18144478
6. APR -0.275096411 0.055539446 -4.95317 0.00000073
7. MAY -0.178363664 0.087648615 -2.03499 0.04185233
8. JUN -0.110013689 0.116018278 -0.94824 0.34300502
9. JUL -0.084210999 0.108404780 -0.77682 0.43726499
10. AUG -0.049187690 0.033566449 -1.46538 0.14281656
11. SEP -0.084069991 0.043879032 -1.91595 0.05537158
12. OCT -0.047619447 0.052628302 -0.90483 0.36555766
13. NOV -0.068994982 0.043932823 -1.57047 0.11630686
14. WHOLHH 0.628582813 0.811859376 0.77425 0.43878246
15. Mvg Avge{1} -0.558019387 0.159252814 -3.50398 0.00045835

16. C 0.006250223 0.003666322 1.70477 0.08823796
17. A 0.405828551 0.464423959 0.87383 0.38220971
18. B 0.436334538 0.258668260 1.68685 0.09163221
TEST(ZEROS)
# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Chi-Squared(18)= 1291.279681 or F(18,*)= 71.73776 with Significance Level 0.00000000

Similarly for the other variable:

Code: Select all

* U-GARCH for retail mz
* Initial anaylsis to obtain values of time varying var-covar
clear(zeroes) hh
garch(p=1,q=1,hseries=hh) / lretretail

* Set initial value of conditional vars
set rethh = hh

* Mean eq
equation(ar=1,ma=1,constant,regressors) eq_ret lretretail
# jan feb mar apr may jun jul aug sep oct nov rethh

garch(equation=eq_ret, p=1,q=1,hseries=hh,hadjust=(rethh=hh),robusterrors)

Results:

GARCH Model - Estimation by BFGS
Convergence in 44 Iterations. Final criterion was 0.0000036 <= 0.0000100

With Heteroscedasticity/Misspecification Adjusted Standard Errors
Dependent Variable LRETRETAIL
Monthly Data From 1994:02 To 2012:03
Usable Observations 218
Log Likelihood 203.6778

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.057239832 0.021824120 2.62278 0.00872160
2. JAN -0.035416803 0.026723849 -1.32529 0.18507557
3. FEB -0.032904967 0.030131134 -1.09206 0.27480730
4. MAR -0.045342582 0.028005766 -1.61904 0.10543768
5. APR -0.184231956 0.036932684 -4.98832 0.00000061
6. MAY -0.226575814 0.032356791 -7.00242 0.00000000
7. JUN -0.098783901 0.023406082 -4.22044 0.00002438
8. JUL -0.067354826 0.032447394 -2.07582 0.03791095
9. AUG 0.015195722 0.028923608 0.52537 0.59932297
10. SEP -0.069767985 0.033716113 -2.06928 0.03852008
11. OCT -0.013574840 0.024619850 -0.55138 0.58137467
12. NOV -0.027461420 0.025112439 -1.09354 0.27415742
13. RETHH 0.335364277 1.435114857 0.23368 0.81522982
14. Mvg Avge{1} 0.024237714 0.084779824 0.28589 0.77496228

15. C 0.000030370 0.000073698 0.41208 0.68027896
16. A 0.046256256 0.051181002 0.90378 0.36611321
17. B 0.944794298 0.047463449 19.90572 0.00000000
TEST(ZEROS)
# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Chi-Squared(17)= 44758.226757 or F(17,*)= 2632.83687 with Significance Level 0.00000000
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

There is no reason for the mean models of the two variables to take the same form, and I've seen almost no convincing examples of the use on an ARMA mean model for a GARCH. (Offhand, it looks like it's a common choice to be "different", but being different for the sake of being different isn't really justifiable).

One thing that you have to remember when you go to bivariate model is that the assumption now is that the residuals form a vector white noise process, which means that in addition to each process being serially uncorrelated, they also need to have zero cross correlations (E u1(t)u2(s)=0 if t <> s). That's why you often see the use of VAR's rather than simple AR's in multivariate GARCH models.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
Thank you for that very useful insight. I had also wondered if a VAR model would be more suitable to my analysis but could not find a solid reason behind it. This was very helpful.
As for the ARMA mean model- it does not have to be the same for each variable and I am not doing it just to be different. My dependent variables showed some memory even after taking logs of first differences and including seasonal dummies. Including AR(1) and MA(1) resolved the issue. However, it is also true that this differed across each variable (I have 4 different dependent variables). And so might make more sense to first determine each variable's specification in a univariate mode and then use that specification in the bivariate model.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

Are these log price changes? (Retail and wholesale?) I can't imagine where two "return" series would have such strong seasonality.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
Yes these are log(p{t}-p{t-1}). They are prices of wholesale and retail maize in Zambia. Agricultural prices often show strong seasonality, more so in developing countries where markets are often incomplete and inter-temporal price arbitrage not as efficient in stabilizing seasonal price fluctuations. In this study I am testing if conditional variance of the price series have any effect on the price levels.

Do you have any advice on what method I should use here? I looked into Structural VAR. I doubt I want to go that direction right now since I have constraints of time. A reduced form vector error correction might be more practical. But I am saying this completely out of a practical perspective given time and resource limitations at my end, and admit that I have not done enough reading to make an informed decision. I am also considering stopping myself at the univariate analysis. I understand the univariate GARCH model conceptually and I can test my hypothesis using it (although it would be so much better if I could do a bi- or tri-variate analysis). Still I feel much more comfortable doing less but doing it correctly rather than trying to do more and doing it wrong. Hope I am making sense here.
Thanks for your help!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

Given the strong seasonal, I would suggest using 100*log(p{t}-p{t-12}) (that is, the year over year price changes) as your two variables. That would likely eliminate the need for the seasonal dummies (which aren't particularly good for dealing with weather-related seasonality). You will then almost certainly have some short-run serial correlation, and because you have wholesale and retail, which are likely to have wholesale changes leading retail, you probably use a full VAR for the mean model. Try a VAR(1) first and see if it works. The rest of your setup is fine for checking whether volatility affects mean price changes.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Thanks a lot, Tom.
Please could you elaborate on why seasonal dummies might not be a good way to account for weather related seasonality?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

The problem with the seasonal dummies is that they say that there's a constant shift with January because January is January, not that January is mid-summer (in Zambia). They tend to work better when the variation is due to the calendar (school year, holidays) rather than the weather. Seasonal differences are only modestly better (they give a stochastic rather than deterministic shift, but still treat different months independently of adjacent months), but a VAR on the seasonal differences should give you a better shot at a clean mean model.
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
Thanks so much for the advice. This helped and I was able to get to a converged model. Really appreciate your help!

I have a couple of related questions. The annual returns that I use now (100*log(p{t}/p{t-12})), do not 'look' like a GARCH process. Please see attached. Do you think this is a cause of concern (such as if my series is no longer trend stationary?)

Secondly, I ran this same analysis for another pair of series -- price of wholesale maize and a maize product (lets call it product A). My model fails to converge in that case. I figured that seasonality in product A is very subdued. So I used monthly returns and tried a VAR-GARCH in mean with seasonal dummies instead. This worked but I am not sure if I should trust these results. I am worried that one of variables, wholesale maize, has high seasonality while the other (product A) does not. Also using one approach for one pair (wholesale maize and retail maize) and another approach for other pair of variables (wholesale maize and product A), does not sound very consistent.
Do you have any insight on what could be the best way to deal with this problem?

Thanks again for your help!
Attachments
annualret.pdf
(21.81 KiB) Downloaded 1312 times
melkania
Posts: 8
Joined: Tue Jun 29, 2021 10:25 am

Re: No convergence in Bivariate GARCH in Mean

Unread post by melkania »

Hi Tom,
I figured that the annual returns are a AR(1) process, and so your previous advice makes complete sense. So please ignore my first question.
Could you please share any suggestions on the second question: dealing with a pair of variables when seasonality is high in one but not in another?

Thanks!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: No convergence in Bivariate GARCH in Mean

Unread post by TomDoan »

melkania wrote:Hi Tom,
Thanks so much for the advice. This helped and I was able to get to a converged model. Really appreciate your help!

I have a couple of related questions. The annual returns that I use now (100*log(p{t}/p{t-12})), do not 'look' like a GARCH process. Please see attached. Do you think this is a cause of concern (such as if my series is no longer trend stationary?)

Secondly, I ran this same analysis for another pair of series -- price of wholesale maize and a maize product (lets call it product A). My model fails to converge in that case. I figured that seasonality in product A is very subdued. So I used monthly returns and tried a VAR-GARCH in mean with seasonal dummies instead. This worked but I am not sure if I should trust these results. I am worried that one of variables, wholesale maize, has high seasonality while the other (product A) does not. Also using one approach for one pair (wholesale maize and retail maize) and another approach for other pair of variables (wholesale maize and product A), does not sound very consistent.
Do you have any insight on what could be the best way to deal with this problem?

Thanks again for your help!
200 monthly observations will never "look" anything like a more typical 4000 daily observations that are often used in GARCH analyses of financial data. First, even if you have something that has strong GARCH behavior on a daily basis, it will get much weaker as the data aggregate to weekly or (even more) monthly. Second, when you graph financial data, you are usually graphing financial returns, which would be expected to be very close to white noise---while people often include AR or ARMA terms in the mean model, they generally have small coefficients, possibly statistically significant due to the sheer number of observations, but still economically small. On the other hand, you have data on prices for an agricultural commodity which has costly storage, so you have both seasonality and (non-trivial) serial correlation. In particular, the data you graphed have much more serial correlation than financial returns would have and are thus much smoother---when you look at them, the correlation in the mean is more obvious than the correlation (if any) in the variance.
Post Reply