Page 1 of 1

2nd order approximation in dynare++ and perturbation AIM

PostPosted: Thu May 07, 2015 6:28 am
by zj1009
HI,
I use dynare++ to simulate the model in Rudebusch and Swanson (2012 AEJ Macro) "the bond premium in a DSGE model with long-run real and nominal risks". But I found that the std reported by dynare++ (2nd order approximation) are different from Swanson's code (reported in Table2 last column, excluding std for term premium), especially for real wages. Should the two give the same answers?
Does anyone know why this happens or have the same problem?
I attached my mod file and Swanson's mathematica code.
Thanks,
zj

Re: 2nd order approximation in dynare++ and perturbation AIM

PostPosted: Sun May 10, 2015 2:32 pm
by jpfeifer
Dynare and AIM should give you the same results for the same approximation order (if they are simulation-based, small differences are to be expected).
Looking at your code compared to Rudebusch/Swanson (2012), it seems they are considering the logarithm of the real wage, while you are not.

Re: 2nd order approximation in dynare++ and perturbation AIM

PostPosted: Mon May 11, 2015 2:44 am
by zj1009
Hi jpfeifer,
Thank you very much for your reply!
According to your suggestion, I tried the logarithm of real wage, consumption, labor, etc. Their std are indeed closer to Swanson's results than before, but they are still quite different. Do you have further suggestions on what I could try?
Thanks,
Ji

Re: 2nd order approximation in dynare++ and perturbation AIM

PostPosted: Fri May 15, 2015 9:32 am
by jpfeifer
Are you using the same approximation order? And did you cross-check your FOCs with their Mathematica code?

Re: 2nd order approximation in dynare++ and perturbation AIM

PostPosted: Sun May 17, 2015 12:11 pm
by zj1009
Hi jpfeifer,
Yes, their mathematica code reports the 2nd order approx. std for macro variables and 3rd order approx. std for term premium, and I use the same order to get std for macro variables. And I also double checked my dynare code and the mathematica code. Unfortunately, I still cannot get the same results...
Ji