Practicing Dynare
Francisco Barillas New York University Dept.of Economics∗†
Anmol Bhandari
New York University
Dept.of Economics
九层糕Riccardo Colacito
University of North Carolina
Dept.of Finance
Sagiri Kitao University of Southern California FBE Deptartment
Christian Matthes
New York University
Dept.of Economics
Thomas J.Sargent
New York University
Dept.of Economics Yongok Shin
Washington University
Dept.of Economics
December4,2010
Abstract
This paper teaches Dynare by applying it to approximate equilibria and estimate nine dynamic economic models.
We hope that it illustrates once again the efficacy of learning by doing.
1.Introduction
This paper describes nine examples or types of examples that illustrate how Dynare can approximate the solutions of dynamic rational expectations models,simulate them,and estimate them by maximum likelihood and Bayesian methods.Section2approximates and estimates a one-ctor stochastic growth model.Section3approximates and estimates a two-country stochastic growth model.Section4follows chapter11of Ljungqvist and Sargent(2004)in studying the effects of foreenfiscal policy in a non-stochastic growth model.Section5updates and extends the examples to correspond to chapter11of Ljungqvist and Sargent(20XX).Section6estimates a rational expectations model of hyperinflation originally formulated by Sargent(1977).Section7solves and estimates the permanent income model of Hall(1988).This application is interesting,among other reasons,for the way that it illustrates how Dynare can implement the‘diffu Kalmanfilter’needed in situations in which an initial endogenous state variable is unknown and the model has a unit root.Section8solves and estimates the Ryoo and Ron(2004)rational expectations model of a market for engineers.Section9estimates a model of consumption growth propod by Bansal and Yaron(2004).Section10solves and estimates the Hann,Sargent,and Tallarini(1999)model of robust permanent income and pricing.Section11solves and estimates the Bansal and Yaron(2004)of ast prices and long-run risk in consumption and dividends.Appendix A tells how the reader can obtain thefile examples.zip that contain the*.mod and datafiles that we ud to generate the examples.
高中生常见心理问题及疏导
Some of our examples bear eloquent witness to the technological improvements brought by Dynare.For example, the maximum likelihood estimates in Sargent(1977)and Hann,Sargent,and Tallarini(1999)were time-consuming and painful to obtain originally.Dynare has reduced the time and the pain.白菜炖肉
2.The Neoclassical growth model
2.1The model
We study a widely ud stochastic neoclassical growth model with leisure(e,for example,Cooley and Prescott (1995)).A reprentative houhold’s problem is
max
{c t,l t}∞
t=0E0
∞
t=1βt−1 cθt(1−l t)1−θ 1−τ
c t手机锁屏壁纸
=βE t cθt+1(1−l t+1)1−θ 1−τ
θ
c t
alp=0.4;
tau=2;
rho=0.95;
s=0.007;
model;
我所在的地方(c^the*(1-lab)^(1-the))^(1-tau)/c=bet*((c(+1)^the*(1-lab(+1))^(1-the))^(1-tau)/c(+1))* (1+alp*exp(z(-1))*k(-1)^(alp-1)*lab^(1-alp)-del);
c=the/(1-the)*(1-alp)*exp(z(-1))*k(-1)^alp*lab^(-alp)*(1-lab);
k=exp(z(-1))*k(-1)^alp*lab^(1-alp)-c+(1-del)*k(-1);黑皮肤适合穿什么颜色的衣服
z=rho*z(-1)+s*e;
end;
initval;
k=1;
c=1;
lab=0.3;
z=0;
e=0;
end;
shocks;
var e;
stderr1;
end;
steady;
stoch_simul(dr_algo=0,periods=1000);datasaver(’simudata’,[]);
Parameter Calibration
k z c lab
parameters bet del alp rho the tau s;
bet=0.987;
大块朵颐
the=0.357;
del=0.012;
alp=0.4;
tau=2;
rho=0.95;
s=0.007;
model;
(c^the*(1-lab)^(1-the))^(1-tau)/c=bet*((c(+1)^the*(1-lab(+1))^(1-the))^(1-tau)/c(+1))
*(1+alp*exp(z(-1))*k(-1)^(alp-1)*lab^(1-alp)-del);
c=the/(1-the)*(1-alp)*exp(z(-1))*k(-1)^alp*lab^(-alp)*(1-lab);
k=exp(z(-1))*k(-1)^alp*lab*(1-alp)-c+(1-del)*k(-1);
z=rho*z(-1)+s*e;
end;
initval;
k=1;
c=1;
lab=0.3;
z=0;
e=0;
end;
shocks;
var e;
stderr1;
end;
松鼠是哺乳动物吗
steady;
check;
estimated_params;
stderr e,inv_gamma_pdf,0.95,inf;
rho,beta_pdf,0.93,0.02;
the,normal_pdf,0.3,0.05;
tau,normal_pdf,2.1,0.3;
end;
varobs c;
estimation(datafile=simudata,mh_replic=10000);
The priors ud in estimation are as in Table3.Table4is one of the outputs of Dynare which prents summary statistics of posterior distribution.
5