I am testing the co-movement between 2 exchanges by using the dynamic conditional correlation (DCC) developed by Robert Engle (2002). I want to apply this method in stata 12 and used this command:
Mgarch DCC (var1 var2=), arch(1) garch(1) distribution(t)
I read that it should give me a column with correlations per time unit. But i am not getting this colums. Does someone have any idea how to apply the DCC in Stata 12?
Best Answer
You need to read the help file for
-mgarch dcc postestimation-
. You will find the following example of computing the dynamic correlations and their forecasts.which produces the graph of the dynamic correlations between the three individual stocks.
Update 1
If you are only interested in the in-sample fits of the conditional correlations, then it becomes really simple, and you can drop the
tsappend
command:The option
t>1600
asks that the in-sample predictions be plotted starting at "time period" 1600 (this dataset has a time index that runs from 1 to 2015). Thexline
option asks for a vertical line at t=2015 (in the previous example, this was to indicate that at t=2015, forecasts were out-of-sample), and thelegend(row(3))
specifies that you want the graph legend to placed in three separate rows -- this is just graph formatting.Update 2
The OP has asked about adding explanatory variables in the equations for the conditional mean and the conditional variance. This is explained in the help file for
mgarch dcc
. The syntax isThe optional argument
[indepvars]
allows you to add explanatory variables to the conditional mean to any one, to sets of, or to all the dependent variables at the same time.The optional equation options,
eqoptions
, has the following optional componentwhich allows you to add explanatory variables to the conditional variance equation of any one, to sets of, or to all the dependent variables at the same time.
Example
So, for example, if you had three series
return1
,return2
andreturn3
, and three independent variablesx1
,x2
andx3
, then the commandimplies that the variables
x1
andx2
enter the conditional mean ofreturn1
andreturn2
,x3
enters the conditional mean ofreturn3
. Similarly,x1
,x2
andx3
enter the conditional variance ofreturn1
,return2
andreturn3
.