Page 1 of 2
Cappiello, Engle, Sheppard(2006) DCC GARCH models
Posted: Thu Aug 05, 2010 1:48 pm
by TomDoan
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
- garch.asc
- Data file
- (67.28 KiB) Downloaded 1990 times
Re: Various two-step DCC models
Posted: Tue Mar 29, 2011 10:57 am
by MrBrownstone
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!
Re: Various two-step DCC models
Posted: Tue Mar 29, 2011 11:55 am
by TomDoan
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!
The series of "Q" matrices needs to be converted to correlations, after which you can extract the components. For instance:
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
etc.
Re: Various two-step DCC models
Posted: Mon Oct 17, 2011 10:02 am
by avalokita
Dear Tom:
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:
## MAT15. Subscripts Too Large or Non-Positive
I have read the thread
http://www.estima.com/forum/viewtopic.php?t=144
,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
Posted: Mon Oct 17, 2011 5:38 pm
by TomDoan
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
Posted: Mon Oct 17, 2011 6:55 pm
by avalokita
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.
I simply use a different data set and didn't modify the essential codes.
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
Is it the initialization what dear Tom meant for?? Or exist other ways to initialize these series.
I'm thankful for Tom's help.

Re: Various two-step DCC models
Posted: Mon Oct 17, 2011 7:43 pm
by avalokita
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
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.

Re: Various two-step DCC models
Posted: Tue Oct 18, 2011 2:42 pm
by TomDoan
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.
Re: Various two-step DCC models
Posted: Wed Nov 30, 2011 1:00 pm
by alanharper
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
Re: Various two-step DCC models
Posted: Wed Nov 30, 2011 4:16 pm
by TomDoan
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.
Re: Various two-step DCC models
Posted: Thu Dec 01, 2011 8:03 am
by alanharper
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
Re: Various two-step DCC models
Posted: Thu Dec 01, 2011 10:17 am
by moderator
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
Re: Various two-step DCC models
Posted: Fri Feb 17, 2012 12:32 pm
by Financecoding
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
avalokita wrote: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.
I simply use a different data set and didn't modify the essential codes.
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
Is it the initialization what dear Tom meant for?? Or exist other ways to initialize these series.
I'm thankful for Tom's help.

Re: Various two-step DCC models
Posted: Sun Feb 19, 2012 12:42 pm
by TomDoan
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
You'll have to post your data and program, so we can see what's happening.
Re: Various two-step DCC models
Posted: Mon Feb 20, 2012 11:50 am
by Financecoding
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.