Risky steady state for SGU 2003

Hello Professor Johannes,

I am interested to find stochastic steady state in the absence of shocks, which you call it (EMAS in risk matters) on closing devices of SGU 2003 with 3rd order. Please note that model is calibrated to different parameter and hence model is non-linear than the original version of SGU.

After searching for this at forum I found that It has been discussed a lot. Your suggestion in this regard is mostly to look at codes of risk matters or https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Basu_Bundick_2017/Basu_Bundick_2017.mod.

However, I am also interest to find ergodic moments with stochastic steady state. I have one TFP shocks as the original version of SGU while Basu has more than one shocks.

And I could not understand so far how vxo_mean=100sqrt(4(stochastic_steady_state(conditional_variance_R_E_pos))); to adjust for SGU.

Please give me brief on it. Thanks!

stochastic.mod (5.7 KB)
Hello Professor Johannes,
Please find attached codes IDEIR SGU 2003, I build these based on your codes for Basu_Bundick_2017 and Ambrogio Cesa-Bianchi I want find two things, one to stochastic steady state as you did for Risk matters. Second, to find IRFs starting at the stochastic steady state. I could not figure out how to get stochastic steady state/risky steady state. Though these codes are working fine but IRFs are awkard. somethng wrong. Please help.

Please do not cross-post. See my reply at

Hello Professor Johannes,

Thank you so much it work perfectly now.
Sorry for cross-post There was a trouble with the attachment so then I could not remove another one.

I want to have two confirmation, Is risky steady state as same stochastic steady state. I have seen your post for stochastic steady state and Michel Juillard(2011) explained risky steady–state as the point where, where there is no shock in current/ present period but the agents take into account the occurring of future shocks. Is stochastic and risk steady state are the same?

Last, Is the order of the output of stochastic steady state is same as for deterministic SS. For DSS,I have, d, c, h, y , I, k …etc.

Best Regards,

EDEIR.mod (5.6 KB)

,EDF.mod (5.1 KB)
Hello Professor Johannes

First thanks for adding non-stationary model to SGU 2003 codes.

Sorry for putting for one more question, Please find attached codes for EDF (Discount factor model (SGU2003)) and EDEIR model. I build on your codes for SGU 2003 with slight change based on Ambrogio Cesa-Bianchi. For EDF model I fixed psi_1 and d bar is adjusted by the model.

The problem, I am facing is now, for EDF, when I used var e; stderr 1; as you did the same. Then, I can get the same moments as SGU. However, EDEIR,IDEIR and PAC model, I can use stderr sigmae( S.D of TFP shocks) and still am get the same moments as SGU. But I do the same for EDF or IDF, I get the different moments than SGU. I don’t know where is the problem.

I figure out the solution, Following combination will give same moments for SGU 2003

a = rho*a(-1)+e; var e; stderr sigmae

a = rhoa(-1)+ sigmaee; var e; stderr 1;;

When I use following combination, IRFs at Stochastic steady/EMAS shows large response in all variables than the usual Dynare default irf option. Is the combination represent volatility shocks?
a = rho*a(-1)+e;
var e; stderr sigmae

The latter combination where the variance of shocks is not unity would require adjusting the simulation code accordingly. In my example, the shocks fed into simult_ have standard deviation 1.

Thanks, I did the same now with standard deviation 1.