Debian Codegraph @

tests/deterministic_simulations/ramst_block_mfs1.mod

raw
1 /* This model has a solve forward simple block that contains a recursive variable (a)
2 and a feedback one (b).
3 Regression test for bug fixed in preprocessor@740ea833f6b4a93c260b32e62f4302483af54f7a */
4
5 var c k a b;
6 varexo x e u;
7
8 parameters alph gam delt bet aa rho tau;
9 alph=0.5;
10 gam=0.5;
11 delt=0.02;
12 bet=0.05;
13 aa=0.5;
14 rho = 0.95;
15 tau = 0.025;
16
17
18 model(block, mfs=1);
19 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
20 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
21 a = tau*b + e;
22 b = tau*a+rho*b(-1) + u;
23 end;
24
25 initval;
26 x = 1;
27 k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
28 c = aa*k^alph-delt*k;
29 end;
30
31 steady;
32
33 shocks;
34 var x;
35 periods 1;
36 values 1.2;
37 var u;
38 periods 1;
39 values 1;
40 end;
41
42 model_info;
43
44 perfect_foresight_setup(periods=200);
45 perfect_foresight_solver;
46
47 rplot a;