Debian Codegraph @

tests/deterministic_simulations/histval_det.mod

raw
1 // Tests the histval block in deterministic setup
2 // In particular test if it works on endos and exos substituted by an aux var
3
4 var c k z;
5 varexo x;
6
7 parameters alph gam delt bet aa;
8 alph=0.5;
9 gam=0.5;
10 delt=0.02;
11 bet=0.05;
12 aa=0.5;
13
14
15 model;
16 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
17 z = 0.9*z(-2);
18 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(-1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
19 end;
20
21 initval;
22 x = 1;
23 k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
24 c = aa*k^alph-delt*k;
25 z = 0;
26 end;
27
28 steady;
29
30 check;
31
32 histval;
33 k(0) = 0.6;
34 x(0) = 0.9;
35 z(-1) = 0.1;
36 end;
37
38 perfect_foresight_setup(periods=200);
39 perfect_foresight_solver;