Extension of Gali 2007

Dear Dynare Forum

I have a question regarding the implementation of a time-varying variance of the error term in my Dynare simulation code for a New Keynesian (NK) model. I have already successfully included a time-varying depreciation variable in my model, represented by the following equations:
NK2.mod (1.8 KB)

\delta_t =\rho^\delta * \delta_{t-1}+\epsilon_t^\delta
where
\epsilon_t^\delta \sim N(0,\sigma_{\epsilon}^2)

I now want to extend the code with the following equations:

\epsilon_t^\delta \sim N(0,\sigma_{\epsilon,t}^2)
where we now let the variance follow an AR(1) process:
\sigma^2_{\epsilon,t} = \rho^\sigma *\sigma^2_{\epsilon,t-1} + v^\sigma_t
with
v_t^{\sigma} \sim N(0,\sigma_v^2)

I’m looking for guidance on how to properly implement these equations in Dynare and ensure that the variance of the error term evolves according to the AR(1) process described above. Any insights or suggestions on how to modify my Dynare code would be greatly appreciated.

Thank you in advance for your help!

Usually, you would have a shock process

Z=(1-rho_z)*Z_bar+rho_z*Z(-1)+sigma_z*eps_z;
sigma_z=(1-rho_sigma_z)*sigma_z_bar+rho_sigma_z*sigma_z(-1)+sigma_sigma_z*eps_sigma_z;

See https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Born_Pfeifer_2020/BP2020_CES.mod

Thank you for getting back so soon.

I have tried some different version of incorporating a shock process, I am however unsure on which variables to add to the endogenous variables, exogenous variables and parameters. Can you help with that?

That is clearly shown in the mod-file I linked.