Cappiello, Engle, Sheppard(2006) DCC GARCH models
Cappiello, Engle, Sheppard(2006) DCC GARCH models
This does four styles of DCC models (DCC, ADCC, GDDCC and AGDDCC) using a two-step procedure. This is based upon Cappiello, Engle & Sheppard(2006), "Asymmetric Dynamics in the Correlations of Global Equity and Bond Returns," Journal of Financial Econometrics, vol. 4, no 4, pages 537-572, applied to a different data set.
Program file revised 21 June 2012 to address issues raised in users' questions
Program file revised 21 June 2012 to address issues raised in users' questions
-
MrBrownstone
Re: Various two-step DCC models
Dear Tom,
I have been trying to extract time-varying correlation series from your code, without any succes. Could you give me a hint, that how it is done?
Thank you for advance!
I have been trying to extract time-varying correlation series from your code, without any succes. Could you give me a hint, that how it is done?
Thank you for advance!
Re: Various two-step DCC models
The series of "Q" matrices needs to be converted to correlations, after which you can extract the components. For instance:MrBrownstone wrote:Dear Tom,
I have been trying to extract time-varying correlation series from your code, without any succes. Could you give me a hint, that how it is done?
Thank you for advance!
Code: Select all
dec series[symm] rho
gset rho gstart gend = %cvtocorr(q)
set rho12 gstart gend = rho(t)(1,2)
graph
# rho12
set rho13 gstart gend = rho(t)(1,3)
graph
# rho13
Re: Various two-step DCC models
Dear Tom:
I'm tracing the code using a different data set. But when the program runs this line of code
I got an error message stating:
,but the solution provided there still cannot make things right.
Would u please tell me how to handle the problem??
Thank u.
I'm tracing the code using a different data set. But when the program runs this line of code
Code: Select all
compute bfix=sqrt(.85),afix=sqrt(.10)
nonlin afix bfix
compute gq=%const(0.0)
disp gq
maximize(start=%(bq=%const(bfix),aq=%const(afix),StartQC()),method=bfgs,title="Two-step DCC") logl gstart gend
disp "DCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)
I got an error message stating:
I have read the thread http://www.estima.com/forum/viewtopic.php?t=144## MAT15. Subscripts Too Large or Non-Positive
,but the solution provided there still cannot make things right.
Would u please tell me how to handle the problem??
Thank u.
Re: Various two-step DCC models
You're probably not initializing the Q and EE series of matrices so there's no lagged Q and lagged EE at GSTART.
Re: Various two-step DCC models
I simply use a different data set and didn't modify the essential codes.TomDoan wrote:You're probably not initializing the Q and EE series of matrices so there's no lagged Q and lagged EE at GSTART.
The initialization works as the same, that is
Code: Select all
compute gstart=%regstart(),gend=%regend()
Code: Select all
gset q = qbar
gset ee = qbar
gset nn = nbar
gset hh = qbar
gset ee gstart gend = %outerxx(%xt(eps,t))
gset nn gstart gend = %outerxx(%xt(eta,t))
I also checked both the Q and ee series, which indeed store values obtained from
Code: Select all
vcv(nocenter,matrix=qbar)
# eps
vcv(nocenter,matrix=nbar)
# eta
I'm thankful for Tom's help.
Re: Various two-step DCC models
Dear Tom:
I have overcome the problem about "## MAT15. Subscripts Too Large or Non-Positive."
Yet, there are still two follow-up questions.
First, when dccexamples.rpf use the garch.asc data to
run the fourth model (AGDDCC, Asymmetric Generalized Diagonal DCC), the message alwayes appears
AGDDCC - Estimation by BFGS
NO CONVERGENCE IN 8 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
Usable Observations 1866
Function Value -4840.01321511
The above-mentioned message also appears when I run AGDDCC using a different data set.
Second, the paper argues that "a and b are scalars such that a + b < 1", but the estimation shows
Obviously, AFIX+BFIX >1.
In addition, the necessary and sufficient condition for this to hold is
a^2 + b^2+ (maximum eigenvalue)* g^2 < 1, which the estimation seems to violate.
Are the results still valid and how do we explain this difference?
Thanks!!! Dear Tom.
I have overcome the problem about "## MAT15. Subscripts Too Large or Non-Positive."
Yet, there are still two follow-up questions.
First, when dccexamples.rpf use the garch.asc data to
run the fourth model (AGDDCC, Asymmetric Generalized Diagonal DCC), the message alwayes appears
AGDDCC - Estimation by BFGS
NO CONVERGENCE IN 8 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
Usable Observations 1866
Function Value -4840.01321511
The above-mentioned message also appears when I run AGDDCC using a different data set.
Second, the paper argues that "a and b are scalars such that a + b < 1", but the estimation shows
Code: Select all
Two-step DCC - Estimation by BFGS
Convergence in 21 Iterations. Final criterion was 0.0000000 <= 0.0000100
Usable Observations 1866
Function Value -4863.86937136
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. AFIX 0.1739951937 0.0088466433 19.66793 0.00000000
2. BFIX 0.9727566930 0.0034490702 282.03447 0.00000000
In addition, the necessary and sufficient condition for this to hold is
a^2 + b^2+ (maximum eigenvalue)* g^2 < 1, which the estimation seems to violate.
Are the results still valid and how do we explain this difference?
Thanks!!! Dear Tom.
Re: Various two-step DCC models
First off, you want to make sure that the univariate GARCH models are themselves reasonable. If you're running up against the boundary, you want to add a constraint to your parameter set. When a^2+b^2>1, the "constant" term in the expression isn't positive definite any longer, and it's probably quite easy to have a hard time moving out of that since locally all the models are poorly behaved.
-
alanharper
- Posts: 5
- Joined: Mon Oct 24, 2011 6:34 pm
Re: Various two-step DCC models
Dear Tom,
I noticed, running your DCC with your data, that AFIX and BFIX are >1. I get the same results for many different dataset and many different approaches. How comes it never yields to stationary results? Also, is there a way to set initial variable if the integrated method does not converge (my goal is to analyse the difference between the correlation of the integrated method and the 2-stepp procedure above.
Thank you,
Alan
I noticed, running your DCC with your data, that AFIX and BFIX are >1. I get the same results for many different dataset and many different approaches. How comes it never yields to stationary results? Also, is there a way to set initial variable if the integrated method does not converge (my goal is to analyse the difference between the correlation of the integrated method and the 2-stepp procedure above.
Thank you,
Alan
Re: Various two-step DCC models
In the formulations being used the A's and B's enter as squares (as part of embedding them into a broader model type), so it's actually afix^2+bfix^2 that needs to be less than one.
-
alanharper
- Posts: 5
- Joined: Mon Oct 24, 2011 6:34 pm
Re: Various two-step DCC models
Thank you Tom, this helps a lot.
Finally, is there any way to set initial values when using the DCC integrated option? My model does not converge for either the BHHH of the BFGS method.
Thank you,
Alan
Finally, is there any way to set initial values when using the DCC integrated option? My model does not converge for either the BHHH of the BFGS method.
Thank you,
Alan
Re: Various two-step DCC models
You can use the INITIAL option on GARCH to supply your own initial values. If you have version 8, see page 211 of the Reference Manual for details.
You can do a GARCH with METHOD=EVALUATE and then check the %BETA vector if you want to see the initial values that GARCH is using by default.
Regards,
Tom Maycock
Estima
You can do a GARCH with METHOD=EVALUATE and then check the %BETA vector if you want to see the initial values that GARCH is using by default.
Regards,
Tom Maycock
Estima
-
Financecoding
- Posts: 3
- Joined: Wed Feb 01, 2012 5:03 am
Re: Various two-step DCC models
Hi guys,
Sorry I am having the exact same problem as avalokita was having. I am working though the code with a couple of different data sets and everything looks fine until the DCC max when I get the same error message.
Could someone please have me their thoughts to what is (what am I doing) wrong?
Thanks,
Mark
Sorry I am having the exact same problem as avalokita was having. I am working though the code with a couple of different data sets and everything looks fine until the DCC max when I get the same error message.
Could someone please have me their thoughts to what is (what am I doing) wrong?
Thanks,
Mark
avalokita wrote:I simply use a different data set and didn't modify the essential codes.TomDoan wrote:You're probably not initializing the Q and EE series of matrices so there's no lagged Q and lagged EE at GSTART.
The initialization works as the same, that is
Code: Select all
compute gstart=%regstart(),gend=%regend()Code: Select all
gset q = qbar gset ee = qbar gset nn = nbar gset hh = qbar gset ee gstart gend = %outerxx(%xt(eps,t)) gset nn gstart gend = %outerxx(%xt(eta,t))
I also checked both the Q and ee series, which indeed store values obtained fromIs it the initialization what dear Tom meant for?? Or exist other ways to initialize these series.Code: Select all
vcv(nocenter,matrix=qbar) # eps vcv(nocenter,matrix=nbar) # eta
I'm thankful for Tom's help.
Re: Various two-step DCC models
You'll have to post your data and program, so we can see what's happening.Financecoding wrote:Hi guys,
Sorry I am having the exact same problem as avalokita was having. I am working though the code with a couple of different data sets and everything looks fine until the DCC max when I get the same error message.
Could someone please have me their thoughts to what is (what am I doing) wrong?
Thanks,
Mark
-
Financecoding
- Posts: 3
- Joined: Wed Feb 01, 2012 5:03 am
Re: Various two-step DCC models
No problem.
I also tried to roughly recreate the results of a paper that uses the 4th technique, the same thing happens as when I use may own data series. Here I did not change any of the code and the data is fairly short time series.
I have enclosed the data and also the code; although there is basically no change in it.
Thanks.
I also tried to roughly recreate the results of a paper that uses the 4th technique, the same thing happens as when I use may own data series. Here I did not change any of the code and the data is fairly short time series.
I have enclosed the data and also the code; although there is basically no change in it.
Thanks.
- Attachments
-
- AGDCC Test.xls
- (149 KiB) Downloaded 995 times
-
- AGDCC Test.PRG
- (2.55 KiB) Downloaded 1287 times