Debian Codegraph @

tests/identification/correlated_errors/fs2000_corr.mod

raw
1 /*
2 * This file is based on the cash in advance model described
3 * Frank Schorfheide (2000): "Loss function-based evaluation of DSGE models",
4 * Journal of Applied Econometrics, 15(6), 645-670.
5 *
6 * The equations are taken from J. Nason and T. Cogley (1994): "Testing the
7 * implications of long-run neutrality for monetary business cycle models",
8 * Journal of Applied Econometrics, 9, S37-S70.
9 * Note that there is an initial minus sign missing in equation (A1), p. S63.
10 *
11 * This implementation was written by Michel Juillard. Please note that the
12 * following copyright notice only applies to this Dynare implementation of the
13 * model.
14 */
15
16 /*
17 * Copyright © 2004-2020 Dynare Team
18 *
19 * This file is part of Dynare.
20 *
21 * Dynare is free software: you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published by
23 * the Free Software Foundation, either version 3 of the License, or
24 * (at your option) any later version.
25 *
26 * Dynare is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
30 *
31 * You should have received a copy of the GNU General Public License
32 * along with Dynare. If not, see <https://www.gnu.org/licenses/>.
33 */
34
35 var m ${m}$ (long_name='Money Stock')
36 P ${P}$ (long_name='Price Level')
37 c ${c}$ (long_name='Consumption')
38 e ${e}$ (long_name='exp(Tech. Shock)')
39 W ${W}$ (long_name='Nominal Wage')
40 R ${R}$ (long_name='Nominal Rental Rate of Capital')
41 k ${k}$ (long_name='Capital')
42 d ${d}$ (long_name='Deposits')
43 n ${n}$ (long_name='Hours worked')
44 l ${l}$ (long_name='Loans')
45 gy_obs ${\Delta y^{obs}}$ (long_name='Observed growth rate of output')
46 gp_obs ${\Delta m^{obs}}$ (long_name='Observed growth rate of prices')
47 y ${y}$ (long_name='Output')
48 dA ${\Delta A}$ (long_name='Labor Augm. Techn. Growth Rate')
49 ;
50 varexo e_a ${\varepsilon_a}$ (long_name='Technology shock')
51 e_m ${\varepsilon_m}$ (long_name='Observed money growth rate')
52 ;
53
54 parameters alp ${\alpha}$ (long_name='capital share')
55 bet ${\beta}$ (long_name='discount factor')
56 gam ${\gamma}$ (long_name='Average technology growth')
57 mst ${\bar m}$ (long_name='Average money stock')
58 rho ${\rho}$ (long_name='Autocorrelation money process')
59 psi ${\psi}$ (long_name='Leisure weight in utility')
60 del ${\delta}$ (long_name='depreciation')
61 ;
62
63 alp = 0.33;
64 bet = 0.99;
65 gam = 0.003;
66 mst = 1.011;
67 rho = 0.7;
68 psi = 0.787;
69 del = 0.02;
70
71 model;
72 dA = exp(gam+e_a);
73 log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
74 -P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
75 W = l/n;
76 -(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
77 R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
78 1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
79 c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
80 P*c = m;
81 m-1+d = l;
82 e = exp(e_a);
83 y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
84 gy_obs = dA*y/y(-1);
85 gp_obs = (P/P(-1))*m(-1)/dA;
86 end;
87
88 steady_state_model;
89 dA = exp(gam);
90 gst = 1/dA;
91 m = mst;
92 khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
93 xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
94 nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
95 n = xist/(nust+xist);
96 P = xist + nust;
97 k = khst*n;
98
99 l = psi*mst*n/( (1-psi)*(1-n) );
100 c = mst/P;
101 d = l - mst + 1;
102 y = k^alp*n^(1-alp)*gst^alp;
103 R = mst/bet;
104 W = l/n;
105 ist = y-c;
106 q = 1 - d;
107
108 e = 1;
109
110 gp_obs = m/dA;
111 gy_obs = dA;
112 end;
113
114 varobs gp_obs gy_obs;
115
116 shocks;
117 var e_a; stderr 0.014;
118 var e_m; stderr 0.005;
119 end;
120
121 steady;
122
123 estimated_params;
124 //alp, beta_pdf, 0.356, 0.02;
125 gam, normal_pdf, 0.0085, 0.003;
126 //del, beta_pdf, 0.01, 0.005;
127 stderr e_a, inv_gamma_pdf, 0.035449, inf;
128 stderr e_m, inv_gamma_pdf, 0.008862, inf;
129 corr e_m, e_a, normal_pdf, 0, 0.2;
130 end;
131
132
133 identification(advanced=1,max_dim_cova_group=3,prior_mc=250,tex);
134
135 collect_latex_files;
136
137 [status, cmdout]=system(['pdflatex -halt-on-error -interaction=nonstopmode ' M_.fname '_TeX_binder.tex']);
138 if status
139 cmdout
140 error('TeX-File did not compile.')
141 end