RBC in Dynare vs RBC in Matlab

Dear Professor Pfeifer,

I am studying your lecture notes on the basic RBC model. You provide two codes, one for Matlab and one for Dynare. I noticed that the IRFs produced from the two codes are slightly different. I would like to ask why this happens. I am sorry if this is a trivial question, but I am new to DSGE modeling.
I would also like to ask if, in stoch_simul, it is assumed that before the shock occurs the economy is in the non-stochastic steady-state.

Thank you very much in advance! Also, thank you very much for sharing your lecture notes and codes. They have been extremely helpful!

Francesco

When you say “slightly” different, what exactly do you mean? Where can I see the difference?

I ran your chapter 2 codes, solveRBC.m, and RBC_IRF.mod, and the response of output to a shock in g at the first period is 0.1299 and 0.001522, respectively. I tried changing the var of eps_g to 1 and removing hp filter, but the responses are still different (the response of output is 0.1478 in this case). Does this happen because the scaling is different?
I am so sorry to bother you, I am new at Dynare and DSGE modeling. Thank you very much for your time.

There are two things you need to change:

  1. You need to set the shock size in the mod-file to 0.01.
  2. In the m-file you need to set rhog = 0.989; instead of 0.98.

I’m sorry, I missed that. Thank you very much! Thank you again for sharing your notes and codes!