SmetsWouters2003 model code

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

SmetsWouters2003 model code

Postby mukhon » Thu Oct 27, 2011 4:49 pm

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!
mukhon
 
Posts: 4
Joined: Wed Sep 21, 2011 11:08 am

Re: SmetsWouters2003 model code

Postby glucke » Fri Oct 28, 2011 12:51 pm

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.
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm

Re: SmetsWouters2003 model code

Postby mukhon » Tue Nov 01, 2011 10:50 am

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).
mukhon
 
Posts: 4
Joined: Wed Sep 21, 2011 11:08 am

Re: SmetsWouters2003 model code

Postby np2333 » Tue Nov 04, 2014 1:30 am

can someone tell me where I an get the data used in Smets and Wouters (2003). Thanks
np2333
 
Posts: 29
Joined: Fri May 31, 2013 11:00 pm

Re: SmetsWouters2003 model code

Postby RMB » Thu May 21, 2015 6:45 pm

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
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: SmetsWouters2003 model code

Postby jpfeifer » Sat May 23, 2015 10:52 am

------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: SmetsWouters2003 model code

Postby RMB » Tue May 26, 2015 2:02 pm

Thank you!
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: SmetsWouters2003 model code

Postby RMB » Sat Jun 27, 2015 2:27 pm

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?
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests