Debian Codegraph @

tests/deterministic_simulations/ramst_a.mod

raw
1 // check shocks on several periods
2 var c k;
3 varexo x;
4
5 parameters alph gam delt bet aa;
6 alph=0.5;
7 gam=0.5;
8 delt=0.02;
9 bet=0.05;
10 aa=0.5;
11
12
13 model;
14 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
15 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
16 end;
17
18 initval;
19 x = 1;
20 k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
21 c = aa*k^alph-delt*k +1 ;
22 end;
23
24 steady;
25
26 check;
27
28 shocks;
29 var x;
30 periods 1 2 3 4;
31 values 1.1 1.2 1.3 1.4;
32 end;
33
34 perfect_foresight_setup(periods=200);
35 perfect_foresight_solver;
36
37 rplot c;
38 rplot k;