Page 2 of 2

Re: Various two-step DCC models

Posted: Mon Feb 20, 2012 2:02 pm
by TomDoan
The original data set had gstart=2 because the data had to be converted to returns. With your data set, you get gstart=1 since you already have return data which doesn't work on the AGDCC model because there is no room for the lags. Instead, use an entry range of 2 to gend rather than gstart to gend on the MAXIMIZE.

Re: Various two-step DCC models

Posted: Tue Feb 21, 2012 5:23 am
by Financecoding
Sorry, stupid, I missed that with this test.

Turns out the problem with the other data was also to do with my wrong returns convertion in the code.

Thanks a lot, I think I was over thinking things.

Re: Various two-step DCC models

Posted: Thu May 17, 2012 9:56 am
by HenleyPhD
Hey, thanks for this code. I have been just been using it to produce some results for some ADCC and AGDCC models. I was wondering if anyone could help me understand something.

When I run a 3/ 4 time series model I can understand all the results for all four techniques but when I run it for only 2 series I get 6 coefficients for example alpha 1 and alpha 2 using AGDCC. Looking at the original article I can understand ADCC as a model. However; I am not sure the generalization’s impact and why that leads to the two coefficients for each parameter being produced. How do I interpret these? Or alternatively is the point that I should not be using the generalized techniques when looking at the relationship between only two series?

Thank you.

Re: Various two-step DCC models

Posted: Fri May 18, 2012 8:32 am
by TomDoan
HenleyPhD wrote:Hey, thanks for this code. I have been just been using it to produce some results for some ADCC and AGDCC models. I was wondering if anyone could help me understand something.

When I run a 3/ 4 time series model I can understand all the results for all four techniques but when I run it for only 2 series I get 6 coefficients for example alpha 1 and alpha 2 using AGDCC. Looking at the original article I can understand ADCC as a model. However; I am not sure the generalization’s impact and why that leads to the two coefficients for each parameter being produced. How do I interpret these? Or alternatively is the point that I should not be using the generalized techniques when looking at the relationship between only two series?

Thank you.
It looks like it needs a little help moving off the zero guess values for the GQ matrices. Add the PMETHOD=SIMPLEX,PITERS=5 options to the last two MAXIMIZE instructions:

Code: Select all

maximize(start=%(StartQC()),pmethod=simplex,piters=5,method=bfgs,title="GDDCC") logl gstart gend
disp "GDDCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)
*
* AGDDCC (Asymmetric Generalized Diagonal DCC)
*
compute gq=%const(0.0)
nonlin aq bq gq
maximize(start=%(StartQC()),pmethod=simplex,piters=5,method=bfgs,title="AGDDCC") logl gstart gend
disp "AGDDCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)

Re: Various two-step DCC models

Posted: Tue May 22, 2012 2:36 am
by HenleyPhD
Tom,

Thank you, those options for the MAXIMIZE instruction did help for a lot of my models.

Could you possibility help me understand two others things? If I try and run the code for shorter data series (300/ 400 obvs) I find that the results are very sensitive to the initial values specified in the code. This does make sense to me; would it then be correct to base the starting values on the univariate GARCH results? In this particular case these tend to lower than with most of the other models that I have run.

Also in one of the models I have tried I end up with one negative alpha value, is that wrong? Should I try and re-run it using alternative options?

Re: Various two-step DCC models

Posted: Thu Jun 21, 2012 10:15 am
by TomDoan
HenleyPhD wrote:Tom,

Thank you, those options for the MAXIMIZE instruction did help for a lot of my models.

Could you possibility help me understand two others things? If I try and run the code for shorter data series (300/ 400 obvs) I find that the results are very sensitive to the initial values specified in the code. This does make sense to me; would it then be correct to base the starting values on the univariate GARCH results? In this particular case these tend to lower than with most of the other models that I have run.

Also in one of the models I have tried I end up with one negative alpha value, is that wrong? Should I try and re-run it using alternative options?
It's quite possible that 300/400 data points aren't enough to fit a model like that reliably.

There's nothing wrong with a negative alpha since the alpha's enter in "squares". In fact, if you flip the sign of one of the input series, you would get the same likelihood, but with several coefficients changing signs, including the alpha on the affected series.

BEKK&DCC

Posted: Fri Dec 09, 2016 3:24 am
by bekkdcc
Dear Tom

I want to study on ADCC and GDCC which is
"* Example of two-step estimates of various DCC models. This is the technique described in 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."


I look carefully to the codes and I have some questions about it. I want to change some parts of it.

1) In the first part of program:
...
dec vect[series] y(n)
set y(1) = dlogbp
set y(2) = dlogcd
set y(3) = dlogdm
set y(4) = dlogjy
set y(5) = dlogsf
...
dec vect[series] u(n) h(n) eps(n) eta(n)
do i=1,n
garch(p=1,q=1,hseries=h(i),resids=u(i),asymm) / y(i)
set eps(i) = u(i)/sqrt(h(i))
set eta(i) = %min(eps(i),0.0)
end do i

I want to change here as VAR(1) for mean model and also add the square root h11 to the mean model as


system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5)
lags 1
det constant hy1
end(system)
*
garch(model=mvmean,p=1,q=1,asymm, robusterrors,rvectors=rd,pmethod=simplex,piters=5,method=bfgs,iters=100, hmatrices=hh,hadjust=%(hy1=sqrt(hh(t)(1,1)))

and then continue to the same as your sample code. Is it appropriate? or How can I perform this as the first part of two step dcc?

2. The second question, you know there is two alternative for DCC. One is two-step and other is directly(mv=dcc). I am curious about is there a directly case (full system estimate at same time) for ADCC, GDCC and AGDDCC as using mv=adcc in the mv=dcc part in the code or something else?

system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5)
lags 1
det constant hy1
end(system)
*
garch(model=mvmean,mv=adcc,robusterrors,rvectors=rd,pmethod=simplex,piters=1,method=bfgs,iters=1000, hmatrices=hh,hadjust=%(hy1=sqrt(hh(t)(1,1)))


3. Can I use variance=varma case to get also the non diagonals coefficents

compute gq=%const(0.0)
nonlin aq bq gq
maximize(start=%(StartQC()),pmethod=simplex,piters=5,variance=varma,method=bfgs,title="AGDDCC") logl gstart gend
disp "AGDDCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)


4. Is there any paper or literature review that tell the coefficients properties of ADCC /AGDCC?

Thanks in advance,

Re: BEKK&DCC

Posted: Fri Dec 09, 2016 10:13 am
by TomDoan
bekkdcc wrote:Dear Tom

I want to study on ADCC and GDCC which is
"* Example of two-step estimates of various DCC models. This is the technique described in 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."


I look carefully to the codes and I have some questions about it. I want to change some parts of it.

1) In the first part of program:
...
dec vect[series] y(n)
set y(1) = dlogbp
set y(2) = dlogcd
set y(3) = dlogdm
set y(4) = dlogjy
set y(5) = dlogsf
...
dec vect[series] u(n) h(n) eps(n) eta(n)
do i=1,n
garch(p=1,q=1,hseries=h(i),resids=u(i),asymm) / y(i)
set eps(i) = u(i)/sqrt(h(i))
set eta(i) = %min(eps(i),0.0)
end do i

I want to change here as VAR(1) for mean model and also add the square root h11 to the mean model as


system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5)
lags 1
det constant hy1
end(system)
*
garch(model=mvmean,p=1,q=1,asymm, robusterrors,rvectors=rd,pmethod=simplex,piters=5,method=bfgs,iters=100, hmatrices=hh,hadjust=%(hy1=sqrt(hh(t)(1,1)))

and then continue to the same as your sample code. Is it appropriate? or How can I perform this as the first part of two step dcc?
No. You can't do that. A two step procedure requires that the univariate GARCH models be self-contained. If you have the variance from one equation entering the others, they aren't self-contained any longer.
bekkdcc wrote: 2. The second question, you know there is two alternative for DCC. One is two-step and other is directly(mv=dcc). I am curious about is there a directly case (full system estimate at same time) for ADCC, GDCC and AGDDCC as using mv=adcc in the mv=dcc part in the code or something else?

system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5)
lags 1
det constant hy1
end(system)
*
garch(model=mvmean,mv=adcc,robusterrors,rvectors=rd,pmethod=simplex,piters=1,method=bfgs,iters=1000, hmatrices=hh,hadjust=%(hy1=sqrt(hh(t)(1,1)))
You can use the model with ADCC. The generalized diagonal options aren't available through GARCH---until there's some clear indication that they actually are better than alternatives, we probably wouldn't do anything with them.
bekkdcc wrote: 3. Can I use variance=varma case to get also the non diagonals coefficents

compute gq=%const(0.0)
nonlin aq bq gq
maximize(start=%(StartQC()),pmethod=simplex,piters=5,variance=varma,method=bfgs,title="AGDDCC") logl gstart gend
disp "AGDDCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)
VARIANCES=VARMA is an option on GARCH. MAXIMIZE has no idea what that means. And VARIANCES=VARMA has nothing at all to do with anything above.
bekkdcc wrote: 4. Is there any paper or literature review that tell the coefficients properties of ADCC /AGDCC?
Have you tried contacting the authors?

Re: Cappiello, Engle, Sheppard(2006) DCC GARCH models

Posted: Sun Dec 11, 2016 5:06 am
by bekkdcc
Dear Tom,

I have two more questions and also want to take your confirmation about the code I am using for not to get misleading results and also not to make a fault in a program dynamic.

1) I used the code as

Code: Select all

dec vect[series] y(n)
set y(1) = dloga
set y(2) = dlogb
set y(3) = dlogc
set y(4) = dlogd
set y(5) = dloge
set y(6) = dlogf
******
[b]@varlagselect[/b](crit=bic,lags=12)
# y(1)  y(2) y(3) y(4) y(5) y(6)
@varlagselect(crit=HQ,lags=12)
# y(1)  y(2) y(3) y(4) y(5) y(6)
@varlagselect(crit=aic,lags=12)
# y(1)  y(2) y(3) y(4) y(5) y(6)
*****

[b]set hy1 = 1
system(model=mvmean)
variables  y(1)  y(2) y(3) y(4) y(5) y(6)
lags 1 
det constant  hy(1)
end(system)[/b]
*
garch(model=mvmean,[b]mv=adcc,variances=varma[/b],rvectors=rd,pmethod=simplex,piters=20,method=bfgs,iters=1000, hmatrices=hh,[b]hadjust=%(hy1=sqrt(hh(t)(1,1)[/b])))
1.) When I perform varlagselect :


0 25.5176864
1 23.4455333*
2 24.2431378
3 26.1538429
4 30.1957152
5 36.5253384
6 52.8187381
7 82.8049242
8 NA
9 NA
10 NA
11 NA
12 NA


Why could it be ? and is it problem for analysis..


2. My ADCC result is :

MV-ADCC GARCH with VARMA Variances - Estimation by BFGS
Convergence in 4 Iterations.

1. C(3) is so big 92. 70 is it normal? other C's have no problem .

2. While A(1,1) A(2,2) A(3,3) A(4,4) A(5,5) A(6,6) and B(1,1) B(2,2) B(3,3) B(4,4) B(5,5) B(6,6) is positive, some of the out-diagonals(for ex. A(2,1), B(2,6)) are negative. Is it problem ? ( I know that the diagoanls must be positive similar to DCC but have no idea about out-diagonals- - Can H matrix should be positive even out-diagonals are not positive coefficients because of the positive definite by nature of DCC) .

3.
DCC(1) 0.1111247
DCC(2) 0.7959551
DCC(3) 0.0343451

Whats the DCC(3) here? Can it be negative value or not ? Is it asymetric term and how can interpret it?

3. When I compare the addc code above with using variance=varma and not using vaiance=varma, the coefficents value change(Thats okey). But I use varma used variance=varma to get the out-diagonals of A and B matrices, is there anything different than varma to use?



Thanks in advance

Re: Cappiello, Engle, Sheppard(2006) DCC GARCH models

Posted: Sun Dec 11, 2016 4:47 pm
by TomDoan
bekkdcc wrote:Dear Tom,

I have two more questions and also want to take your confirmation about the code I am using for not to get misleading results and also not to make a fault in a program dynamic.

1) I used the code as

1.) When I perform varlagselect :


0 25.5176864
1 23.4455333*
2 24.2431378
3 26.1538429
4 30.1957152
5 36.5253384
6 52.8187381
7 82.8049242
8 NA
9 NA
10 NA
11 NA
12 NA


Why could it be ? and is it problem for analysis..
You apparently have very little data (60 data points or so). Why are you looking at models that are far too complex to estimate with the amount of data you have?
bekkdcc wrote: 2. My ADCC result is :

MV-ADCC GARCH with VARMA Variances - Estimation by BFGS
Convergence in 4 Iterations.

1. C(3) is so big 92. 70 is it normal? other C's have no problem .
C depends upon the scale of the data. It's normal if the scale of the data is different for the 3rd series.
bekkdcc wrote: 2. While A(1,1) A(2,2) A(3,3) A(4,4) A(5,5) A(6,6) and B(1,1) B(2,2) B(3,3) B(4,4) B(5,5) B(6,6) is positive, some of the out-diagonals(for ex. A(2,1), B(2,6)) are negative. Is it problem ? ( I know that the diagoanls must be positive similar to DCC but have no idea about out-diagonals- - Can H matrix should be positive even out-diagonals are not positive coefficients because of the positive definite by nature of DCC) .
See

https://estima.com/ratshelp/garchmvrpf. ... tput_VARMA
bekkdcc wrote: 3.
DCC(1) 0.1111247
DCC(2) 0.7959551
DCC(3) 0.0343451
Whats the DCC(3) here? Can it be negative value or not ? Is it asymetric term and how can interpret it?

It's the asymmetric DCC coefficient. You can interpret it as described in the literature on ADCC.
bekkdcc wrote: 3. When I compare the addc code above with using variance=varma and not using vaiance=varma, the coefficents value change(Thats okey). But I use varma used variance=varma to get the out-diagonals of A and B matrices, is there anything different than varma to use?
Virtually anything would be better than VARMA with the amount of data you have. You're picking more and more complicated models, which will result, not in better information, but in worse estimates.

Re: Cappiello, Engle, Sheppard(2006) DCC GARCH models

Posted: Tue Dec 13, 2016 6:42 am
by bekkdcc
Dear Tom,

Thanks, I improved the data-set.

First of all, I am trying to re-write the code for ADCC - GARCH-in-Mean model. I have some misunderstanding on coding the program. if you can brighten me for the three code I am sending in this post, I will be so pleased. (I use bold for that parts)

I know there is two usage of VARMA. One is for is for a VARMA mean model. and the other is e VARMA-GARCH variance process for CCC base models. But I realize that there is some codes using "uadjast" and "eps" in mean model especially analyzing asymetric bekk model.

I am curious about whether it is in use for CCC/DCC model bases. The first code I write is what I use to analyze the effect of "hy1" to other variables.

I put here the other two code which I am not sure about their usage. Can you give an information about that. For example; should I use "eps" in my mean model or it is totally different thing, etc.

And also I put variance=spillover option in third code: Can it be only used in BEKK coding. In other point of view, Is it same with variance=varma for DCC or not?



1. First code is :

dec vect[series] y(n)
set y(1) = dloga
set y(2) = dlogb
set y(3) = dlogc
set y(4) = dlogd
set y(5) = dloge
set y(6) = dlogf
******

set hy1 = 1
system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5) y(6)
lags 1
det constant hy(1)
end(system)

*
garch(model=mvmean,mv=adcc,variances=varma,rvectors=rd,pmethod=simplex,piters=20,method=bfgs,iters=1000, hmatrices=hh,hadjust=%(hy1=sqrt(hh(t)(1,1))))


2. Second code is: ( using eps(..){1} in mean model and uadjust option)

...
dec vect[series] eps(6)

set hy1 = 1
system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5) y(6)
lags 1
det constant eps(1){1} eps(2){1} eps(3){1} eps(4){1} eps(5){1} eps(6){1} hy(1)
end(system)
*****
clear(zeros) sqrth eps
*
* Do three iterations on the VARMA part to get an initial value for the
* covariance matrix.
*
do iters=1,6
estimate(noprint,resids=resids)
set eps(1) %regstart() * = resids(1)
set eps(2) %regstart() * = resids(2)
set eps(3) %regstart() * = resids(3)
set eps(4) %regstart() * = resids(4)
set eps(5) %regstart() * = resids(5)
set eps(6) %regstart() * = resids(6)
end do iters
*
compute cv0=%sigma
*
garch(model=mvmean,mv=dcc,asymmetric,rvectors=rv,hmatrices=hh,presample=cv0, uadjust=%pt(eps,t,rv(t)),hadjust==%(hy1=sqrt(hh(t)(1,1)),$
pmethod=simplex,piters=20)


3. Third code : (using variances=spillover) rather than variance=varma

set hy1 = 1
system(model=mvmean)
variables y(1) y(2) y(3) y(4) y(5) y(6)
lags 1
det constant eps(1){1} eps(2){1} eps(3){1} eps(4){1} eps(5){1} eps(6){1} hy(1)
end(system)
...
garch(model=mvmean,mv=dcc, variances=spillover, asymmetric,rvectors=rv,hmatrices=hh,presample=cv0,uadjust=%pt(eps,t,rv(t)),hadjust==%(hy1=sqrt(hh(t)(1,1)))), pmethod=simplex,piters=20)


4. You said previous post that I should use more basic thing then Varma=variances, You mean such as variances=spillover or sth else. Cause I want also non diagonal parts of the DCC.

Thanks in advance,

Re: Cappiello, Engle, Sheppard(2006) DCC GARCH models

Posted: Tue Dec 13, 2016 8:59 am
by TomDoan
You're using HY(1) when you mean HY1 in several of those.

Why are you going to a VARMA mean model when the lag select test had a 1 lag VAR as being adequate?

I'm not sure what questions you're trying to answer, but a model that can't be estimated reliably answers nothing.