Elder-Serletis(2010) VAR-GARCH-M

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

miao wrote:Hi, Tom,

Thanks for your reply. I found from Elder’s dissertation, which built the same model as in the 2010 paper, that he conducted the LM test for omitted ARCH. First all he estimated a homoscedastic VAR, and then find the residual vector u_t = B^{-1}\epsilon_t. The components of u_t ‘s are tested separately by LM ARCH test. Though this procedure is not emphasized in the 2010 paper, I think it is necessary in order to make the argument rigorous.

Elder’s dissertation, 65th page of the pdf file
http://lamar.colostate.edu/~jelder/pape ... tation.pdf

1. He does not consider the ARCH test for u_t vector as a whole but consider the components separately. Do these two tests generally provide similar results?
2. Should the ARCH test on the (univariate) AR model generally provide similar results to the above two tests? I am thinking of building a bivariate model following their 2010 paper, and now I just have one of the data series. The other series is relatively harder to obtain. I wonder if the ARCH test on the univariate AR model could provide some guideline on the adequacy of applying their model.

Thanks,

Miao
The univariate GARCH tests would be done with:

compute factor=%decomp(%sigma)
@structresids(factor=factor) u gstart gend vresids
@archtest vresids(1)
@archtest vresids(2)

done immediately after the original VAR is estimated. This transforms the OLS residuals (u) to the structural residuals (vresids) and tests for ARCH on each of the structural residuals. As written, this is specific to the Cholesky factor structural model used in the oil-GDP paper. With a different structural model, you would get a different factor matrix for the covariance matrix %SIGMA.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

miao wrote:Hi, Tom,

Following my last post:

1. Now I somehow understand why Elder 1995 consider the univariate tests instead of the multivariate test. Let us consider the 2010 paper case with oil (exogenous) and GDP. Since the impact of oil volatility on GDP is interested, one might need to conduct the ARCH test of oil residual in the bivariate VAR framework in order to justify the analysis of oil vol on GDP. The results of ARCH test on the bivariate model as a whole or on GDP are relatively uninterested. (Elder 2010 compares the BIC to justify the modeling.) Is it right?
No. The point is that the "structural" part of the VAR is supposed to create structural residuals which are uncorrelated contemporaneously, and individually and jointly uncorrelated across time. The structural residuals are modeled as separate univariate GARCH processes---this is testing whether there actually is a "GARCH" effect to model.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by miao »

Hi Tom,

Thank you very much for your reply. I try to fit the model to a bivariate dateset, but the model does not seem to converge.
1.
Is there anything I need to change in order to let it run, say, the starting guess of iterations? When I run the ARCH tests on the data, I find the ARCH effect insignificant at 5% level. I just want to see the model interpret such a dataset.

2.
Is it rigorous to choose between homoscedastic VAR and VAR-GARCH-M purely based on SIC (whichever has a lower SIC)?

Thanks,

Code: Select all

Non-Linear Optimization, Iteration 31. Function Calls 2499.
 Cosine of Angle between Direction and Gradient  0.0000000. Alpha used was 0.001000
 Direction vector adjusted.
 Adjusted squared norm of gradient 9981.976
 Diagnostic measure (0=perfect) 1.9438
 Exact Line Search. Distance scale 1.000000000e-010
Old Function = -1184.325079     New Function = -1184.317602
New Coefficients:
  90412.282009       0.404035      -0.141727       0.058004      -0.151319
-3.170405e-007  1.185620e-007 -2.485172e-007 -2.447951e-007       0.000217
      0.000000   -8126.682429    8991.823657  -10982.398570   11688.690849
      0.001813       0.048872       0.058153       0.023748     869.075993
 -11751.974225       0.000122       0.018877       0.000000 13900938.023559
     -0.007949       0.361078

MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 31 ITERATIONS
LAST CRITERION WAS  0.0000000
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 1998:05 To 2012:12
Usable Observations                          176
Function Value                        -1184.3176

    Variable                          Coeff        Std Error      T-Stat      Signif
****************************************************************************************
1.  B                               90412.282009  34454.490868      2.62411  0.00868764
2.  BVEC(1)(1)                          0.404035      0.086089      4.69322  0.00000269
3.  BVEC(1)(2)                         -0.141727      0.080285     -1.76531  0.07751221
4.  BVEC(1)(3)                          0.058004      0.070335      0.82469  0.40954714
5.  BVEC(1)(4)                         -0.151319      0.057806     -2.61771  0.00885233
6.  BVEC(1)(5)                         -0.000000      0.000000     -1.25820  0.20831785
7.  BVEC(1)(6)                          0.000000      0.000000      0.70797  0.47896230
8.  BVEC(1)(7)                         -0.000000      0.000000     -1.55348  0.12030937
9.  BVEC(1)(8)                         -0.000000      0.000000     -1.16290  0.24486968
10. BVEC(1)(9)                          0.000217      0.000914      0.23746  0.81229994
11. BVEC(1)(10)                         0.000000      0.000000      0.00000  0.00000000
12. BVEC(2)(1)                      -8126.682429  18789.008144     -0.43252  0.66536117
13. BVEC(2)(2)                       8991.823657  49284.257040      0.18245  0.85523101
14. BVEC(2)(3)                     -10982.398570  35121.031888     -0.31270  0.75450747
15. BVEC(2)(4)                      11688.690849  43382.150356      0.26944  0.78759458
16. BVEC(2)(5)                          0.001813      0.011157      0.16252  0.87089638
17. BVEC(2)(6)                          0.048872      0.124523      0.39247  0.69471094
18. BVEC(2)(7)                          0.058153      0.160451      0.36243  0.71702876
19. BVEC(2)(8)                          0.023748      0.153334      0.15488  0.87691959
20. BVEC(2)(9)                        869.075993    237.450797      3.66003  0.00025219
21. BVEC(2)(10)                    -11751.974225  22022.529424     -0.53363  0.59359466
22. GARCHP(1)(1)                        0.000122      0.000013      9.58190  0.00000000
23. GARCHP(1)(2)                        0.018877      0.120642      0.15647  0.87566306
24. GARCHP(1)(3)                        0.000000      0.000000      0.00000  0.00000000
25. GARCHP(2)(1)                 13900938.023559 236595.862026     58.75394  0.00000000
26. GARCHP(2)(2)                       -0.007949      0.000136    -58.60969  0.00000000
27. GARCHP(2)(3)                        0.361078      0.003699     97.61112  0.00000000

SIC for VAR    2486.16077
SIC for GARCH-M    2497.89730
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

miao wrote:Hi Tom,

Thank you very much for your reply. I try to fit the model to a bivariate dateset, but the model does not seem to converge.
1.
Is there anything I need to change in order to let it run, say, the starting guess of iterations? When I run the ARCH tests on the data, I find the ARCH effect insignificant at 5% level. I just want to see the model interpret such a dataset.

2.
Is it rigorous to choose between homoscedastic VAR and VAR-GARCH-M purely based on SIC (whichever has a lower SIC)?
You would probably benefit from rescaling your second variable, which is many orders of magnitude different from the first. That would bring the coefficients down to similar magnitudes.

Are your data series at all similar to the ones in Elder and Serletis? This was not a model designed to apply to any two variables, but was specifically for oil prices and a macroeconomic aggregate. Comparing with SIC is fine, though it looks rather clear that the GARCH part doesn't matter. You can't do a nested hypothesis test since if the GARCH isn't present, the M term is unidentified.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by miao »

Hi Tom,

Thanks for your reply. I believe that my data is ok. The basic thing I’d like to do is to investigate the impact of the conditional volatility of the first (relatively exogenous) variable on the second variable.

Following your advice, I try to rescale the data and obtain the convergence. The homoscedastic VAR gives me lag =1, so I modify as follows

* compute nlags=4
compute nlags=1

However, I don’t see the complete results but just see “## MAT13. Store into Out-of-Range Matrix or Series Element”.

It works for nlags = 4, 5 but not for 1, 2, 3.

BTW, How can we determine the lag order of the GARCH? How could we modify the program for that lag order? Sorry that I am new to RATS.

Thanks,

Miao


## IO30. There is no series DATE on the file

VAR/System - Estimation by Least Squares
Monthly Data From 1998:10 To 2013:08
Usable Observations 179

Dependent Variable DLFX
Mean of Dependent Variable -0.103184166
Std Error of Dependent Variable 1.216209782
Standard Error of Estimate 1.054604228
Sum of Squared Residuals 195.74545379
Durbin-Watson Statistic 1.6679

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. DLFX{1} 0.202882718 0.073609854 2.75619 0.00646398
2. FLOW{1} -0.018108661 0.003522159 -5.14135 0.00000072
3. Constant 0.070840794 0.083326381 0.85016 0.39639094
4. SQRTHOIL 0.000000000 0.000000000 0.00000 0.00000000

F-Tests, Dependent Variable DLFX
Variable F-Statistic Signif
*******************************************************
DLFX 7.5966 0.0064640
FLOW 26.4335 0.0000007


Dependent Variable FLOW
Mean of Dependent Variable 8.615027933
Std Error of Dependent Variable 25.456918618
Standard Error of Estimate 23.412466054
Sum of Squared Residuals 96473.267741
Durbin-Watson Statistic 1.9969

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. DLFX{1} 1.1696284354 1.6341563552 0.71574 0.47510140
2. FLOW{1} 0.4284167366 0.0781927741 5.47898 0.00000015
3. Constant 5.1178004781 1.8498655851 2.76658 0.00626997
4. SQRTHOIL 0.0000000000 0.0000000000 0.00000 0.00000000

F-Tests, Dependent Variable FLOW
Variable F-Statistic Signif
*******************************************************
DLFX 0.5123 0.4751014
FLOW 30.0192 0.0000001

## MAT13. Store into Out-of-Range Matrix or Series Element
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

Download the newer version and use that as the base. It automatically adjusts the position of the "M" variable for the number of lags.

If there is no GARCH effect in the data, you can't estimate an "M" effect, since that term will be constant.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by miao »

Thank you very much, Tom.

Everything works well with the latest file. I have one question regarding the memory used in RATS. When I let a rpf file run first after I opened RATS, I obtained some results. Then I ran other programs and came back to run the file that ran first, but the results were different from the results obtained in the first run. Is there anything I need to do to clear the memory (instead of closing RATS and opening it again)?

Thanks!

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

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

miao wrote:Thank you very much, Tom.

Everything works well with the latest file. I have one question regarding the memory used in RATS. When I let a rpf file run first after I opened RATS, I obtained some results. Then I ran other programs and came back to run the file that ran first, but the results were different from the results obtained in the first run. Is there anything I need to do to clear the memory (instead of closing RATS and opening it again)?

Thanks!

Miao
Use the menu operation File-Clear Memory, or the toolbar icon with the hand and the yellow rag.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by miao »

Hi Tom,

Thanks for your reply. I change the dataset and run the codes, but no convergence is obtained for nlags=1. However, I do have convergence for nlags=2. Is there anything I can modify in order to gain convergence for nlags=1?


* The nlags is modified as follows
* compute nlags=4
compute nlags=1


Thanks,

Code: Select all

VAR/System - Estimation by Least Squares
Monthly Data From 1998:10 To 2012:12
Usable Observations                       171

Dependent Variable OILGROW
Mean of Dependent Variable       -0.100322672
Std Error of Dependent Variable   1.233331407
Standard Error of Estimate        1.071351092
Sum of Squared Residuals         192.82925111
Durbin-Watson Statistic                1.6790

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  OILGROW{1}                    0.200449644  0.075723127      2.64714  0.00888989
2.  GDPGROW{1}                   -0.018182027  0.003651039     -4.97996  0.00000157
3.  Constant                      0.079854254  0.086997286      0.91789  0.35999044
4.  SQRTHOIL                      0.000000000  0.000000000      0.00000  0.00000000

    F-Tests, Dependent Variable OILGROW
              Variable           F-Statistic     Signif
    *******************************************************
    OILGROW                            7.0073    0.0088899
    GDPGROW                           24.8000    0.0000016


Dependent Variable GDPGROW
Mean of Dependent Variable        8.972280702
Std Error of Dependent Variable  25.617891096
Standard Error of Estimate       23.352871444
Sum of Squared Residuals         91619.909585
Durbin-Watson Statistic                1.9834

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  OILGROW{1}                   1.6331884521 1.6505816574      0.98946  0.32385991
2.  GDPGROW{1}                   0.4551669870 0.0795838607      5.71934  0.00000005
3.  Constant                     5.1335928772 1.8963311481      2.70712  0.00748842
4.  SQRTHOIL                     0.0000000000 0.0000000000      0.00000  0.00000000

    F-Tests, Dependent Variable GDPGROW
              Variable           F-Statistic     Signif
    *******************************************************
    OILGROW                            0.9790    0.3238599
    GDPGROW                           32.7108    0.0000000


MAXIMIZE - Estimation by BFGS
NO CONVERGENCE IN 104 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 1998:10 To 2012:12
Usable Observations                       171
Function Value                      -996.7307

    Variable                        Coeff      Std Error      T-Stat       Signif
*************************************************************************************
1.  B                             2.647892445  0.355375386       7.45097  0.00000000
2.  BVEC(1)(1)                    0.336313725  0.000050440    6667.58822  0.00000000
3.  BVEC(1)(2)                   -0.015582117  0.000000152 -102276.48004  0.00000000
4.  BVEC(1)(3)                    0.036592159  0.000026840    1363.35568  0.00000000
5.  BVEC(1)(4)                    0.000000000  0.000000000       0.00000  0.00000000
6.  BVEC(2)(1)                    2.173518640  0.268033034       8.10914  0.00000000
7.  BVEC(2)(2)                    0.444547637  0.016115631      27.58487  0.00000000
8.  BVEC(2)(3)                    4.078950291  0.543355659       7.50696  0.00000000
9.  BVEC(2)(4)                    0.159223874  0.388617023       0.40972  0.68201191
10. G(1)(1)                       1.215333651  0.005823379     208.69906  0.00000000
11. G(1)(2)                      -0.059683512  0.000286021    -208.66852  0.00000000
12. G(1)(3)                       0.000000000  0.000000000       0.00000  0.00000000
13. G(2)(1)                       5.021351956  0.383222300      13.10297  0.00000000
14. G(2)(2)                       0.128926937  0.000412095     312.85718  0.00000000
15. G(2)(3)                       0.848332011  0.001575664     538.39668  0.00000000

SIC for VAR    2086.47311
SIC for GARCH-M    2060.30312
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

Have you looked at your oil price series carefully? It not only isn't showing GARCH behavior (which is necessary for the "M" effect to be identified), but it's getting a negative coefficient on the lagged squared residual, which could make the estimation rather unstable.
istiak
Posts: 29
Joined: Sun Nov 11, 2012 9:03 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by istiak »

Hi Tom
I wish to extend the bivariate Elder-Serletis(2010) VAR-GARCH-M model in a five variable (or at least three variables) setup. Is it possible? How could I modify the codes for it? Thank you so much.
KI
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

That depends upon what features of the model you want. It's relatively straightforward if you want to allow the "M" effect only for the first variable, and in square root form. If you want to allow for more general M effects, the changes are more extensive.
istiak
Posts: 29
Joined: Sun Nov 11, 2012 9:03 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by istiak »

Hi Tom
Suppose I have 3 variables in the system--A,B, and C. I allow the "M" effect only for B variable, and in square root form. So, I want to see how uncertainty of B affects A. How the changes can be incorporated in the code? Thank you so much.
KI
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by TomDoan »

Is the "structural" part of the Elder-Serletis model important? If you're just interested in the M effect of B on A, you can handle that using the methods described on page UG-301 of the RATS v8 User's Guide. If you want the SVAR model, is it the variance of the 2nd structural shock or the variance of variable B that you want? The two aren't the same.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: Elder-Serletis(2010) VAR-GARCH-M

Unread post by miao »

Hi Tom,

I have questions about the variables. Could you check if I understand them correctly?
1.
GDPTOPLUS :Response of GDP growth to Positive oil shock
GDPTOMINUS : Response of GDP growth to Negative oil shock
GDPTOPLUSNOM : Response of GDP growth to Positive oil shock without M effect
GDPTOMINUSNOM : Response of GDP growth to Negative oil shock without M effect


UPPER(1) , LOWER(1):Confidence interval for “GDPTOPLUS”
UPPER(2), LOWER(2) : Confidence interval for “GDPTOMINUS”

Two figures show the confidence bands for GDPTOPLUS and GDPTOMINUS,

RESP(1) , RESP(2):What are they? Are they the medians (50th percentiles) of the confidence bands?
2.
By “Without M effect”, does it mean that the IRF is computed from exactly the same estimated coefficients of M-model, but the coefficient of H_{1,1} terms in the mean equation is set to zero


Thanks
Post Reply