Page **3** of **6**

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Mon Aug 12, 2013 11:54 pm**

by **trubador**

Rosen89 wrote:This is when I get up that I have missing values -- again, if anybody has time to help I would very much appreciate it

It is difficult to detect the source of the problem without seeing the actual workfile, but I am fairly sure that you'll find the solution here:

Missing value problem in a Bivariate GARCH model.

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Tue Aug 13, 2013 1:40 am**

by **Rosen89**

Attached is the workfile -- do I have any mistakes?

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Thu Sep 05, 2013 6:44 am**

by **hellena88**

hi, i've figure out the programming, but im not really sure about my code i'm running research for 5 countries using DCC-GRACH. im not sure if my code is correct or not.. but so far its going ok.. but.. the dcc part is not appearing result. yet when its come to modelling estimation its turn out unmatched parenthesis. can somebody help me to figure out where did i did it wrong?

dcc.ml(showopts,m=500, c=1e-5)

show dcc.output

graph corr.line rho12

show corr

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Sat Nov 02, 2013 9:14 pm**

by **sym**

rosen89,

as someone said above "you should use "smpl sf" instead of "smpl s1" before calling the estimation algorithm", that is, you need to define sample s1 and s2. Check logl series on your workfile, the first value is NA, then you should use s2 = 2 to n (s1 = 1 to n).

write smpl s2 before dcc.ml.... instrucction

'estimate the model

smpl s2

dcc.ml(showopts, m=500, c=1e-5)

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Tue Dec 31, 2013 10:05 am**

by **sotim**

Hello,

I used the attached code for a 5x5 system for my thesis.

It works.

Good Luck,

Michail

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Tue Feb 25, 2014 10:13 am**

by **cherryblossom**

Dear all,

I'm a new user and I'm doing a research using DCC Garch.

I used the code posted by **Hvtcapollo** (thanks for your code ^^) and I got an error message. It said that "missing value in @ LOGL series at current coeficients at observations 1980M02 in "Do_DCC.ML(Showopts, M=500,C=1E-5)" ". My sample: 1980M02-2013M11.

Did I do st wrong? Please help me !!!

By the way, how can i get the time-varying conditional correlation series ?

I really appreciate if someone guide me.

Thank You.

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 4:30 am**

by **misscats**

I use the codes provided here and modify to my need. It works through.

As I want to have the result of dynamic conditional correlation of variances, is it the value of corr12? If so, it is odd, as it doesn't change after the logl dcc estimation. Is this correct? Or, should I calculate it on my own with the two estimated series of variances?

For convenience, I attach the code here.

Code: Select all

`series r1=nasdaq_return`

series r2=bse_return

sample s1 2 @last

scalar pi=3.14159

equation eq_r1.arch(1,1,m=1000,h) r1 c

equation eq_r2.arch(1,1,m=1000,h) r2 c

eq_r1.makeresids(s) z1

eq_r2.makeresids(s) z2

eq_r1.makegarch() garch1

eq_r2.makegarch() garch2

scalar var_z1=@var(z1)

scalar var_z2=@var(z2)

scalar cov_z1z2=@cov(z1,z2)

scalar corr12=@cor(z1,z2)

series var_z1t=var_z1

series var_z2t=var_z2

series cov_z1tz2t=cov_z1z2

coef(2) T

T(1)=0.2

T(2)=0.7

logl dcc

dcc.append @logl logl

dcc.append var_z1t=@nan(1-T(1)-T(2)+T(1)*(z1(-1)^2)+T(2)*var_z1t(-1),1)

dcc.append var_z2t=@nan(1-T(1)-T(2)+T(1)*(z2(-1)^2)+T(2)*var_z2t(-1),1)

dcc.append cov_z1tz2t=@nan((1-T(1)-T(2))*corr12+T(1)*z1(-1)*z2(-1)+T(2)*cov_z1tz2t(-1),1)

dcc.append pen=(var_z1t<0)+(var_z2t<0)

dcc.append rho12=cov_z1tz2t/@sqrt(@abs(var_z1t*var_z2t))

dcc.append detrRt=(1-(rho12^2))

dcc.append detrDt=@sqrt(garch1*garch2)

dcc.append pen=pen+(detrRt<0)

dcc.append detrRt=@abs(detrRt)

dcc.append detrRt=(1-(rho12^2))

dcc.append detrDt=@sqrt(garch1*garch2)

dcc.append logl=(-1/2)*(2*log(2*pi)+log(detrRt)+(z1^2+z2^2-2*rho12*z1*z2)/detrRt)-10*pen

'sample s1

scalar pi=3.14159

smpl s1

dcc.ml(showopts, m=500, c=1e-5)

show dcc.output

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 5:24 am**

by **trubador**

Conditional correlations are stored in rho12.

Again, I suggest you to use

DCCGARCH11 add-in for this purpose.

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 6:33 am**

by **misscats**

Hi trubador

I checked DCCGARCH11 add-in and I need to arrange someone to upgrade my Eviews(7) to Eviews 8 from the work. So far, I only can read the DCCGARCH11 add-in documentary.

I have some questions regarding to it:

(1) I just finished the coding (with a lot of your help) and got some results. I expect the dynamic conditional correlation is one number, rather than a series (of rho12). I know that because of dynamic, the conditional correlation varies. But I check with Stata programe and the table will only show one figure between two series. From your answer, is the programming and estimating not done yet?

(2) The DCCGARCH11 add-in is to "replace" my dcc codes or to help me continue estimating something?

(3) Can DCCGARCH11 include two equations which contain difference independent variables (and the numbers of independent variables are also different)? If so, how to assign them in. It would be appreciated to point out how to assign two equations in the first box of the dialog (shown in the documentary). What i mean is, for example, i have equation 1: y1 c x1 x2 x3(-1) dummy1 h1(-1) and equation 2: y2 c x3(-1) h2(-1) as two mean equations where h1, h2 are garch-in-mean. In the first box, how should I type them in? something like?

y1 y2

And in the second box:

(c x2 x3(-1) dummy 1 h1(-1)) (c x3(-1) h2(-1))

and in the fourth box (I only need dummy1 to be in the equation 1, not in the equation 2):

(dummy1)

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 7:05 am**

by **trubador**

1) Correlation should change over time in order to be dynamic.

2)

http://www.eviews.com/Addins/addins.shtml3) No, you cannot impose seperate structures (e.g. like VAR). You can include all explanatory variables at once. Insignificant ones will turn out to have small t-values.

Please keep in mind that the sole purpose of these discussions are just to help you fill in the blanks. Therefore, you are assumed to have a basic understanding of the software as well as the method you are trying to employ.

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 7:13 am**

by **misscats**

trubador wrote:1) Correlation should change over time in order to be dynamic.

2)

http://www.eviews.com/Addins/addins.shtml3) No, you cannot impose seperate structures (e.g. like VAR). You can include all explanatory variables at once. Insignificant ones will turn out to have small t-values.

Please keep in mind that the sole purpose of these discussions are just to help you fill in the blanks. Therefore, you are assumed to have a basic understanding of the software as well as the method you are trying to employ.

Many thanks trubador. I do search many keywords in this forum before I raise my question.

I know that, because of dynamic, the conditional correlation varies. But I check with Stata programe and the dcc table only shows one correlation between two series. (you can download the file here:

http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDIQFjAB&url=http%3A%2F%2Fwww.stata.com%2Fstata-news%2Fstatanews.27.3.pdf&ei=CBo8U9rOBNOB7QaVxIHIDg&usg=AFQjCNFcvZgTtylgBawHZDPOAhlfOfVPmw&bvm=bv.63934634,d.ZGU ) Why?

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 7:29 am**

by **trubador**

The forum will only be helpful in implementing DCC (or any other) model in EViews. You should refer to a textbook or the original paper in order to understand the model itself.

Dynamic corelations are plotted in page 3 of the file you cited. The number in table may show the average estimated correlation or the final value, or something else. You should check this with Stata people.

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 7:58 am**

by **misscats**

Sorry about that.

Many many thanks for your help and patient!

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 1:43 pm**

by **jeremym**

Hello,

I try to use the add-in and I have one question about it. There are two parameters in the model of engle: alpha and beta. IF Alpha + Beta tends to 1, then the correlations are persistent. I can't find in the "files" : dccout, rho ... created by the add-in the value of theses parameters. Can you help me to find them ? I suppose they appear with an other name.

I launch the add-in with "standard options". For example i didn't change the lag which is by default 0. What does "Number of AR lags to be used in mean equations" mean ? I use this add-in in order to check the dynamic correlation between the daily volatility of the returns of the cac 40 and of the crb (commodity index).

Thank you for your help !

### Re: Dynamic conditional correlation multivariate GARCH

Posted: **Wed Apr 02, 2014 2:29 pm**

by **trubador**

Alpha and beta corresponds to theta(1) and theta(2) under correlation targeting model. If you relax this assumption, then an additional coefficient (constant) will be estimated and reported as theta(3). If you choose student's t distribution, the degrees-of-freedom parameter will be shown as theta(4). And so on... You'll easily figure out with a little bit of experimenting. The footnote in the output table also refers to the stability condition, alpha+beta < 1.

Dynamic correlation models work on the variances of residuals that are obtained from the mean equations. For stationary series only a constant would be enough, but in other cases one might need to include autoregressive terms and/or explanatory variables to make residuals stationary.

Note to moderators: I kindly ask you to move this post to

DCCGARCH11 thread, where it would be helpful to other users as well.