Debian Codegraph @

tests/deterministic_simulations/multiple_lead_lags/sim_base.mod

raw
1 // Base simulation file adapted from ramst.mod
2
3 var c k;
4 varexo x;
5
6 parameters alph gam delt bet aa;
7 alph=0.5;
8 gam=0.5;
9 delt=0.02;
10 bet=0.05;
11 aa=0.5;
12
13 model;
14 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1); // Resource constraint
15 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam); // Euler equation
16 end;
17
18 initval;
19 c = 1.2;
20 k = 12;
21 x = 1;
22 end;
23
24 shocks;
25 var x;
26 periods 2;
27 values 0.9;
28 end;
29
30 perfect_foresight_setup(periods=200);
31 perfect_foresight_solver(maxit=100);
32
33 if ~oo_.deterministic_simulation.status
34 error('Perfect foresight simulation failed')
35 end