Dynare and GMM/SMM sample 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.

Dynare and GMM/SMM sample code

Postby jint83 » Wed Nov 25, 2015 7:12 am

Is there an example where the parameters in a mod file are estimated with GMM or Simulated Method of Moments, instead of using the Bayesian MCMC type of procedure. A reference paper with complete package of codes would be appreciated, Thanks. I searched AER and Econometrica codes and found nothing. A minimal example would suffice.
jint83
 
Posts: 4
Joined: Tue Nov 24, 2015 5:46 pm

Re: Dynare and GMM/SMM sample code

Postby jpfeifer » Wed Nov 25, 2015 9:14 am

Please have a look at the replication file for Born/Pfeifer (2014): "Risk Matters: A comment" at https://www.aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231.
------------
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: Dynare and GMM/SMM sample code

Postby jint83 » Wed Nov 25, 2015 9:10 pm

Thanks. There are a lot of files. Which file minimizes the " quadratic form of the distance of the model moments to the data moments"?
jint83
 
Posts: 4
Joined: Tue Nov 24, 2015 5:46 pm

Re: Dynare and GMM/SMM sample code

Postby jpfeifer » Thu Nov 26, 2015 8:45 am

At the end of the mod-file, you can see that we optimize over smm_diff_function.m
------------
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: Dynare and GMM/SMM sample code

Postby jint83 » Fri Nov 27, 2015 6:25 pm

I can see that the moments you are trying to match are:
Code: Select all
[quote]   moments_emp(1,1)=4.77; //sigma_Y
    moments_emp(2,1)=1.31; //sigma_C/sigma_Y
    moments_emp(3,1)=3.81; //sigma_I/sigma_Y
    moments_emp(4,1)=39.33/100; //std(NX); additional 100 to counteract FV et al.'s division by 100
    moments_emp(5,1)=-0.76; //corr(NX,Y)
    moments_emp(6,1)=moments_emp(4,1);
    moments_emp(7,1)=moments_emp(5,1);
    moments_emp(8,1)=1.78; //NX_Y at EMAS
[/quote]


And I can see that your smm_diff_function.m can take shock as an argument. That is to say you can give a sequence of shocks for the simulations to run on, and the moments are estimated off the paths with this particular sequence of shocks.

My question is, I am not trying to match any particular 'moment' per se, but I am trying to match the 'path' of historical Argentina GDP , with my simulated path of Argentina GDP, given an exogenously sequence of shocks. When I run dynare simulations on my mod file, I always give a particular sequence of shocks to reflect real world events. The sequence of shocks are completely exogenously given, not free parameters, but model parameters such as consumer habit persistence are free parameters. The objective is to 'find', through your minimization procedure, the best model parameter so that when my simulated Argentina GDP is plotted with actual data, they look close to each other. Is there any way to achieve it with your code?
jint83
 
Posts: 4
Joined: Tue Nov 24, 2015 5:46 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 14 guests