Page 1 of 1

SmetsWouters2003 model code

PostPosted: Thu Oct 27, 2011 4:49 pm
by mukhon
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!

Re: SmetsWouters2003 model code

PostPosted: Fri Oct 28, 2011 12:51 pm
by glucke
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.

Re: SmetsWouters2003 model code

PostPosted: Tue Nov 01, 2011 10:50 am
by mukhon
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.
Code: Select all
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).

Re: SmetsWouters2003 model code

PostPosted: Tue Nov 04, 2014 1:30 am
by np2333
can someone tell me where I an get the data used in Smets and Wouters (2003). Thanks

Re: SmetsWouters2003 model code

PostPosted: Thu May 21, 2015 6:45 pm
by RMB
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

Re: SmetsWouters2003 model code

PostPosted: Sat May 23, 2015 10:52 am
by jpfeifer

Re: SmetsWouters2003 model code

PostPosted: Tue May 26, 2015 2:02 pm
by RMB
Thank you!

Re: SmetsWouters2003 model code

PostPosted: Sat Jun 27, 2015 2:27 pm
by RMB
Hi,

I did some changes in Viegi's script (http://www.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?