Debian Codegraph @

tests/estimation/method_of_moments/RBC/RBC_MoM_common.inc

raw
1 % RBC model used in replication files of
2 % Andreasen, Fernández-Villaverde, Rubio-Ramírez (2018): "The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications", Review of Economic Studies, 85(1):1-49.
3 % Adapted by Willi Mutschler (@wmutschl, [email protected])
4 % =========================================================================
5 % Copyright © 2020-2021 Dynare Team
6 %
7 % This file is part of Dynare.
8 %
9 % Dynare is free software: you can redistribute it and/or modify
10 % it under the terms of the GNU General Public License as published by
11 % the Free Software Foundation, either version 3 of the License, or
12 % (at your option) any later version.
13 %
14 % Dynare is distributed in the hope that it will be useful,
15 % but WITHOUT ANY WARRANTY; without even the implied warranty of
16 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 % GNU General Public License for more details.
18 %
19 % You should have received a copy of the GNU General Public License
20 % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
21 % =========================================================================
22
23 var k $K$
24 c $C$
25 a $A$
26 iv $I$
27 y $Y$
28 la $\lambda$
29 n $N$
30 rk ${r^k}$
31 w $W$
32 ;
33
34 predetermined_variables k;
35
36 varexo u_a ${\varepsilon^{a}}$
37 ;
38
39 parameters DELTA $\delta$
40 BETTA $\beta$
41 B $B$
42 ETAl $\eta_l$
43 ETAc $\eta_c$
44 THETA $\theta$
45 ALFA $\alpha$
46 RHOA $\rho_a$
47 ;
48
49 DELTA = 0.025;
50 BETTA = 0.984;
51 B = 0.5;
52 ETAl = 1;
53 ETAc = 2;
54 THETA = 3.48;
55 ALFA = 0.667;
56 RHOA = 0.979;
57
58 model;
59 0 = -exp(la) +(exp(c)-B*exp(c(-1)))^(-ETAc) - BETTA*B*(exp(c(+1))-B*exp(c))^(-ETAc);
60 0 = -THETA*(1-exp(n))^-ETAl + exp(la)*exp(w);
61 0 = -exp(la) + BETTA*exp(la(+1))*(exp(rk(+1)) + (1-DELTA));
62 0 = -exp(a)*(1-ALFA)*exp(k)^(-ALFA)*exp(n)^(ALFA) + exp(rk);
63 0 = -exp(a)*ALFA*exp(k)^(1-ALFA)*exp(n)^(ALFA-1) + exp(w);
64 0 = -exp(c) - exp(iv) + exp(y);
65 0 = -exp(y) + exp(a)*exp(k)^(1-ALFA)*exp(n)^(ALFA);
66 0 = -exp(k(+1)) + (1-DELTA)*exp(k) + exp(iv);
67 0 = -log(exp(a)) + RHOA*log(exp(a(-1))) + u_a;
68 end;
69
70 steady_state_model;
71 A = 1;
72 RK = 1/BETTA - (1-DELTA);
73 K_O_N = (RK/(A*(1-ALFA)))^(-1/ALFA);
74 W = A*ALFA*(K_O_N)^(1-ALFA);
75 IV_O_N = DELTA*K_O_N;
76 Y_O_N = A*K_O_N^(1-ALFA);
77 C_O_N = Y_O_N - IV_O_N;
78
79 [N, info]=RBC_MoM_steady_helper(THETA,ETAl,ETAc,BETTA,B,C_O_N,W);
80 C=C_O_N*N;
81 Y=Y_O_N*N;
82 IV=IV_O_N*N;
83 K=K_O_N*N;
84 LA = (C-B*C)^(-ETAc)-BETTA*B*(C-B*C)^(-ETAc);
85
86 k=log(K);
87 c=log(C);
88 a=log(A);
89 iv=log(IV);
90 y=log(Y);
91 la=log(LA);
92 n=log(N);
93 rk=log(RK);
94 w=log(W);
95
96 end;