Debian Codegraph @

tests/moments/example1_common.inc

raw
1 /*
2 * Example 1 from F. Collard (2001): "Stochastic simulations with DYNARE:
3 * A practical guide" (see "guide.pdf" in the documentation directory).
4 */
5
6 /*
7 * Copyright © 2001-2020 Dynare Team
8 *
9 * This file is part of Dynare.
10 *
11 * Dynare is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * Dynare is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with Dynare. If not, see <https://www.gnu.org/licenses/>.
23 */
24
25 // Common model declaration for example1 tests
26
27 var y, c, k, a, h, b;
28 varexo e, u;
29
30 parameters beta, rho, alpha, delta, theta, psi, tau;
31
32 model;
33 c*theta*h^(1+psi)=(1-alpha)*y;
34 k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
35 *(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
36 y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
37 k = exp(b)*(y-c)+(1-delta)*k(-1);
38 a = rho*a(-1)+tau*b(-1) + e;
39 b = tau*a(-1)+rho*b(-1) + u;
40 end;
41
42 initval;
43 y = 1.08068253095672;
44 c = 0.80359242014163;
45 h = 0.29175631001732;
46 k = 11.08360443260358;
47 a = 0;
48 b = 0;
49 e = 0;
50 u = 0;
51 end;