Debian Codegraph @

tests/trend_var/fs2000_nonstationary.mod

raw
1 /*
2 * This file is a modified version of 'fs2000.mod'.
3 *
4 * The difference is that, here, the equations are written in non-stationary form,
5 * and Dynare automatically does the detrending.
6 *
7 * Also note that "m" and "dA" in 'fs2000.mod' are here called "gM" and "gA"
8 */
9
10 /*
11 * Copyright © 2004-2010 Dynare Team
12 *
13 * This file is part of Dynare.
14 *
15 * Dynare is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * Dynare is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with Dynare. If not, see <https://www.gnu.org/licenses/>.
27 */
28
29 var gM gA;
30 trend_var(growth_factor=gA) A;
31 trend_var(growth_factor=gM) M;
32 var(deflator=A) k c y;
33 var(deflator=M(-1)/A) P;
34 var(deflator=M(-1)) W l d;
35 var R n;
36 varexo e_a e_m;
37
38 parameters alp bet gam mst rho psi del;
39
40 alp = 0.33;
41 bet = 0.99;
42 gam = 0.003;
43 mst = 1.011;
44 rho = 0.7;
45 psi = 0.787;
46 del = 0.02;
47
48 model;
49 gA = exp(gam+e_a);
50 log(gM) = (1-rho)*log(mst) + rho*log(gM(-1))+e_m;
51 c+k = k(-1)^alp*(A*n)^(1-alp)+(1-del)*k(-1);
52 P*c = M;
53 P/(c(+1)*P(+1))=bet*P(+1)*(alp*k^(alp-1)*(A(+1)*n(+1))^(1-alp)+(1-del))/(c(+2)*P(+2));
54 (psi/(1-psi))*(c*P/(1-n))=W;
55 R = P*(1-alp)*k(-1)^alp*A^(1-alp)*n^(-alp)/W;
56 W = l/n;
57 M-M(-1)+d = l;
58 1/(c*P)=bet*R/(c(+1)*P(+1));
59 y = k(-1)^alp*(A*n)^(1-alp);
60 end;
61
62 initval;
63 k = 6;
64 gM = mst;
65 P = 2.25;
66 c = 0.45;
67 W = 4;
68 R = 1.02;
69 d = 0.85;
70 n = 0.19;
71 l = 0.86;
72 y = 0.6;
73 gA = exp(gam);
74 end;
75
76 shocks;
77 var e_a; stderr 0.014;
78 var e_m; stderr 0.005;
79 end;
80
81 steady;
82
83 check;
84
85 stoch_simul;