Solved – Estimating correlation with DCC GARCH

correlationgarchvariance

I have used a DCC Garch model to estimate the co-movement between 2 indices using the following command in Stata:

mgarch dcc (X Y = , noconstant), arch(1) garch(1) constraints(1 2)
predict H*, variance

After the variance prediction I get a column with the variances per time unit. My question is how to transform the variances to the correlations per time unit?

Best Answer

You can just use the fact that the correlation at any time $t$ of two series in the DCC GARCH model, $Y_{1t}, Y_{2t}$ is just $\tfrac{\mathbb{C}(Y_{1t}, Y_{2t})}{\sqrt{\mathbb{V}(Y_{1t})\mathbb{V}(Y_{1t})}}$.

You can compute this manually as in the following example

webuse stocks, clear

// fit the DCC GARCH model
mgarch dcc (toyota nissan = , noconstant) (honda = , noconstant), ///
    arch(1) garch(1)

// predict the conditional covariances
predict condvar*, variance 

// generate the correlations
g condcorr_nissan_toyota = condvar_nissan_toyota/ ///
    (sqrt(condvar_nissan_nissan)*sqrt(condvar_toyota_toyota))
g condcorr_honda_toyota = condvar_honda_toyota/ ///
    (sqrt(condvar_honda_honda)*sqrt(condvar_toyota_toyota))
g condcorr_honda_nissan = condvar_honda_nissan/ ///
    (sqrt(condvar_nissan_nissan)*sqrt(condvar_honda_honda))

// plot the conditional correlations
tsline condcorr_nissan_toyota condcorr_honda_toyota condcorr_honda_nissan, ///
    legend(rows(3)) 

enter image description here