SmetsWouters2003 model code

Hi, all!

I am tring to replicate SmetsWouters 2003 model. Please see the .mod file, filtered AWM statistics and the article. Now i get IRFs for all real endogenous variables on all shocks almost exactly as in the article. But all getting IRF’s of inflation, short-time rate and capital return rate are less several times than in the article.
Can anybody help me, where are mistakes?
Thank you very much!

It’s possible that you use a different IRF. You use “stoch_simul” command which means classical IRF. SW2003 makes Bayesian IRF. They could be different.
If it doesn’t help, could you post your Bayesian IRF? Calculation of Bayesian IRF require time.
PS It would be better to estimate model with higher mh_replic. SW2003 have 100 000 posterior sample which means mh_replic=200 000 at least.

Thank you for your fast answer!
My estimated parametres are different from the article’s ones. So, not surprising, bayesian IRFs are more different (worse) from article’s ones than IRFs simulated with parametrized model.
Causes of bad estimation parametres are may be from the mistakes in model code or the statistic wasn’t exactly filtered as done by Smets-Wouters.
The estimation command was changed according to the article and your advice.

estimation(datafile=StatEU, xls_sheet=StatEU, mode_compute=6, mode_check, mh_replic=200000);
estimation(datafile=StatEU, xls_sheet=StatEU, mode_compute=0, mode_file=smetswouters_mode, mh_replic=10000, bayesian_irf, irf=20, load_mh_file) Pi W K Q I C R R_k L E Y;

Please see attached results (please get IRFs from oo_.PosteriorIRF.Dsge).

can someone tell me where I an get the data used in Smets and Wouters (2003). Thanks

Do you have the code for Smets & Wouters 2003?
I am not understanding why I have y as variable in monetary policy rules, but, at the variables block, the authors did not put it there.

Thanks

See [Dynare Code for Smets Wouters 2003 desperately needed)

Thank you!

Hi,

I did some changes in Viegi’s script (nviegi.net/teaching/master/sw.zip)and I’m getting success. However, I wonder how I can improve the model, let me explain: I would like to add a new sector, maybe the government, but this have to be in a simple way. I am thinking put a government good in consumer’s preferences and put taxes too. Anyone have some suggestions to improve SW for me?