# Simulation of a DCC-GARCH

I want to simulate some exchange rates with a DCC GARCH. I know the package rmgarch but I want to code the simulation my self. The following are the main equations of the model:

$r_t = a_t$

$a_t = H^{1/2}_{t} Z_t$

$H_t = D_t R_t D_t$

$R_t = Q^{*-1}_t Q_t Q^{*-1}_t$

$Q_t = (1-a-b)\bar{Q} + a\epsilon_{t-1}\epsilon'_{t-1} + b Q_{t-1}$

My question is: if I all ready have the univariate GARCH parameters for $D_t$, $a$ and $b$ and $\bar{Q}$ how do I get $\epsilon_{t-1}$ to perform the simulations? and what are the steps to perform it.

• you set the first errors term to zero (their mean) and then derive the other ones by fitting data to your model (recursively for each $t$ - by going backward from the origin) – Malick Jul 14 '18 at 14:39
• @Malick I don't think is like that because with what data will i compare it if it's a simulation? – Alejandro Andrade Jul 14 '18 at 16:46
• @Malick but isn't $Z_t$ the variable that follows a N(0,1)? – Alejandro Andrade Jul 16 '18 at 16:25
• Sorry Alejandro, I have deleted my answer as it was wrong, I'll try to come up with a proper answer. – Malick Jul 18 '18 at 10:58
• @Malick thanks anyway if you manage to come up with the right answer i would appreciated – Alejandro Andrade Jul 18 '18 at 15:17