Page 1 of 1
GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 9:30 am
by emna
Dear Tom,
I use the following code to estimate a GJR-GARCH(1,1) model with dummy variable in variance eqation
r(t)=beta(1)+beta(2)*r(t-1)
sigma(t)^2=alpha0 + alpha1*u{1}^2+ %if(u{1}<0.0,gamma1*u{1}^2,0.0)+ %if(u{1}<0.0,gamma2*
dummy*u{1}^2,0.0)+gammadummy*
dummy + beta1*h{1}
Code: Select all
clear all
open data PUT ARCH GARCH.xls
data(format=xls,org=columns)
set x = rendement
linreg x
# constant x{1}
frml(lastreg,vector=beta) meanf
nonlin(parmset=meanparms) beta
set uu = %seesq
set h = %seesq
set u = 0.0
nonlin(parmset=garchparms) alpha0 alpha1 beta1 gamma1 gamma2 gammadummy
compute alpha1=gamma1=gamma2=0.005, beta1=0.004,alpha0=%seesq*(1-alpha1-beta1), gammadummy=0.1
frml varf = alpha0 + beta1*h{1} + alpha1*u{1}^2+ %if(u{1}<0.0,gamma1*u{1}^2,0.0)+ %if(u{1}<0.0,gamma2*dummy*u{1}^2,0.0)+gammadummy*dummy
frml logl = (h(t)=varf(t)),(u=x-meanf),$
(uu(t)=u^2),%logdensity(h,u)
maximize(parmset=meanparms+garchparms,pmethod=simplex,piters=100,robust, iters=2500) logl 3 *
My problem is that model don't converge so I have this message
"NO CONVERGENCE IN 7 ITERATIONS. FINAL NORMED GRADIENT 1.43753
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"
I don't know if there is any problem with the code or initial values perhaps or another one... Have you any explanations or comments about my model please ?
Best regards,
Emna
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 10:27 am
by TomDoan
In terms of the model, is there a reason that you don't have a dummy x a standard lagged squared residual, just the asymmetric term and the variance constant?
First, that's way too many simplex iterations. Have you actually tried a regular GJR model? You're using guess values which have effectively no GARCH properties. Starting with guess values off a standard GJR with zeros for the dummy coefficients would be the obvious way to start that.
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 1:47 pm
by emna
Thank you for your response.
1/ In terms of the model I guess that there is a structural break in terms of asymmetry and variance level after a regulation reform that's why I introduce dummy variable for these to variables.
2/ My results for the regular GJR model are as the following :
Code: Select all
garch(p=1,q=1,asymmetric) / x
GARCH Model - Estimation by BFGS
Convergence in 47 Iterations. Final criterion was 0.0000031 <= 0.0000100
Dependent Variable X
Usable Observations 742
Log Likelihood -3366.0123
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Mean(X) -8.27906643 0.43129314 -19.19591 0.00000000
2. C 73.88707348 6.42176267 11.50573 0.00000000
3. A -0.00750951 0.00060380 -12.43708 0.00000000
4. B 0.24756667 0.02306927 10.73145 0.00000000
5. D 7.71784140 1.01378913 7.61287 0.00000000
or if I use my code :
Code: Select all
clear all
open data PUT ARCH GARCH.xls
data(format=xls,org=columns)
set x = rendement
linreg x
# constant x{1}
Linear Regression - Estimation by Least Squares
Dependent Variable X
Usable Observations 741
Degrees of Freedom 739
Centered R^2 0.0163383
R-Bar^2 0.0150072
Uncentered R^2 0.0163383
Mean of Dependent Variable -0.00030205
Std Error of Dependent Variable 55.39263374
Standard Error of Estimate 54.97541708
Sum of Squared Residuals 2233477.1012
Regression F(1,739) 12.2746
Significance Level of F 0.0004868
Log Likelihood -4019.5347
Durbin-Watson Statistic 2.0372
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -0.000158954 2.019572410 -7.87066e-05 0.99993722
2. X{1} -0.127822302 0.036484100 -3.50351 0.00048681
frml(lastreg,vector=beta) meanf
nonlin(parmset=meanparms) beta
set uu = %seesq
set h = %seesq
set u = 0.0
nonlin(parmset=garchparms) alpha0 alpha1 beta1 gamma1
compute alpha1=5.35, beta1=0.15, alpha0=17.82, gamma1=7
frml varf = alpha0 + beta1*h{1} + alpha1*u{1}^2+ %if(u{1}<0.0,gamma1*u{1}^2,0.0)
frml logl = (h(t)=varf(t)),(u=x-meanf),$
(uu(t)=u^2),%logdensity(h,u)
maximize(parmset=meanparms+garchparms, pmethod=simplex,piters=100,robust, iters=2500) logl 3 *
MAXIMIZE - Estimation by BFGS
Convergence in 1 Iterations. Final criterion was 0.0000032 <= 0.0000100
LOW ITERATION COUNT ON BFGS MAY LEAD TO POOR ESTIMATES FOR STANDARD ERRORS
With Heteroscedasticity/Misspecification Adjusted Standard Errors
Usable Observations 741
Function Value -3353.9447
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. BETA(1) -8.34554976 0.23799029 -35.06677 0.00000000
2. BETA(2) -0.05954196 0.00974185 -6.11197 0.00000000
3. ALPHA0 72.62874708 2.95069357 24.61413 0.00000000
4. ALPHA1 -0.00736835 0.00241010 -3.05727 0.00223360
5. BETA1 0.24649718 0.00673153 36.61831 0.00000000
6. GAMMA1 7.25913378 0.25105248 28.91481 0.00000000
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 2:03 pm
by emna
And now my model with regular GJR initial values converges but with Heteroscedasticity/Misspecification Adjusted Standard Errors
Code: Select all
data(format=xls,org=columns)
set x = rendement
linreg x
# constant x{1}
Linear Regression - Estimation by Least Squares
Dependent Variable X
Usable Observations 741
Degrees of Freedom 739
Centered R^2 0.0163383
R-Bar^2 0.0150072
Uncentered R^2 0.0163383
Mean of Dependent Variable -0.00030205
Std Error of Dependent Variable 55.39263374
Standard Error of Estimate 54.97541708
Sum of Squared Residuals 2233477.1012
Regression F(1,739) 12.2746
Significance Level of F 0.0004868
Log Likelihood -4019.5347
Durbin-Watson Statistic 2.0372
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -0.000158954 2.019572410 -7.87066e-05 0.99993722
2. X{1} -0.127822302 0.036484100 -3.50351 0.00048681
frml(lastreg,vector=beta) meanf
nonlin(parmset=meanparms) beta
set uu = %seesq
set h = %seesq
set u = 0.0
nonlin(parmset=garchparms) alpha0 alpha1 beta1 gamma1 gamma2 gammadummy
compute alpha1=-0.00750951, gamma1=gamma2=7.71784140, beta1=0.24756667,alpha0=73.88707348, gammadummy=0.1
frml varf = alpha0 + beta1*h{1} + alpha1*u{1}^2+ %if(u{1}<0.0,gamma1*u{1}^2,0.0)+ %if(u{1}<0.0,gamma2*dummy*u{1}^2,0.0)+gammadummy*dummy
frml logl = (h(t)=varf(t)),(u=x-meanf),$
(uu(t)=u^2),%logdensity(h,u)
maximize(parmset=meanparms+garchparms, pmethod=simplex,piters=100,robust, iters=2500) logl 3 *
MAXIMIZE - Estimation by BFGS
Convergence in 1 Iterations. Final criterion was 0.0000000 <= 0.0000100
LOW ITERATION COUNT ON BFGS MAY LEAD TO POOR ESTIMATES FOR STANDARD ERRORS
With Heteroscedasticity/Misspecification Adjusted Standard Errors
Usable Observations 741
Function Value -3348.7826
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. BETA(1) -8.44174085 0.24596736 -34.32057 0.00000000
2. BETA(2) -0.05829411 0.01013334 -5.75270 0.00000001
3. ALPHA0 90.58382604 3.52665946 25.68545 0.00000000
4. ALPHA1 -0.00775954 0.00231308 -3.35464 0.00079469
5. BETA1 0.25307723 0.00688866 36.73826 0.00000000
6. GAMMA1 6.29770606 0.25199883 24.99101 0.00000000
7. GAMMA2 1.62059489 0.34877321 4.64656 0.00000338
8. GAMMADUMMY -36.43453397 5.06935847 -7.18721 0.00000000
compute alpha1=-0.00750951, gamma1=gamma2=7.71784140, beta1=0.24756667,alpha0=73.88707348, gammadummy=0.1
maximize(parmset=meanparms+garchparms, method= BHHH, pmethod=simplex,piters=100,robust, iters=2500) logl 3 *
MAXIMIZE - Estimation by BHHH
Convergence in 6 Iterations. Final criterion was 0.0000081 <= 0.0000100
With Heteroscedasticity/Misspecification Adjusted Standard Errors
Usable Observations 741
Function Value -3348.7826
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. BETA(1) -8.44178069 0.44405083 -19.01084 0.00000000
2. BETA(2) -0.05829719 0.02085195 -2.79577 0.00517767
3. ALPHA0 90.58637091 5.97952022 15.14944 0.00000000
4. ALPHA1 -0.00775944 0.00332409 -2.33431 0.01957973
5. BETA1 0.25307885 0.01912558 13.23248 0.00000000
6. GAMMA1 6.29763060 0.76974334 8.18147 0.00000000
7. GAMMA2 1.62070821 0.58521005 2.76945 0.00561515
8. GAMMADUMMY -36.43666756 7.60316141 -4.79230 0.00000165
What do you think about this please ?
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 5:26 pm
by TomDoan
Until you fix the fact that you didn't put your chosen mean model into the GARCH instruction (you didn't include the lagged dependent variable---you need to use the REGRESSORS option to put in a non-trivial mean model), I can't be sure, but that looks like you have a major problem with your data. The asymmetry coefficient should not be that big---it really shouldn't be bigger than 1, and usually is more like .1 or .2 at the outside.
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 5:45 pm
by emna
please find the dataset used to estimate the model in the an attachment
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Dec 28, 2017 7:01 pm
by TomDoan
OK. Have you looked at that series? What's with those monster spikes, and what do you plan to do about it?
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Jan 11, 2018 9:53 am
by emna
I have an database of option prices. As you know, for each trading day the option prices differ according to the exercise price and the number of days remaining until maturity. In order to keep a single price, I have use only ATM options that have the shortest term since they represent the most liquid contracts. The problem here is that the data has peaks each time we have a big difference between the maturities (see example attached
).
So I do not know if you have an idea how I should choose the options to avoid this problem
Re: GJR GARCH with dummy variable in variance equation
Posted: Thu Jan 11, 2018 1:10 pm
by TomDoan
That sounds like something that you really need to be discussing with your research advisor. A GARCH model assumes that the DGP for the variance is the same from period to period. It's not clear that anything like that is true for options at a daily level even when the contract isn't changing from day to day, and clearly isn't at all true when the contract shifts.