Debian Codegraph @

tests/deprecated/ramst.mod

raw
1 // Tests the deprecated simul command
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
14 model;
15 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
16 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
17 end;
18
19 initval;
20 x = 1;
21 k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
22 c = aa*k^alph-delt*k;
23 end;
24
25 steady;
26
27 check;
28
29 shocks;
30 var x;
31 periods 1;
32 values 1.2;
33 end;
34
35 simul(periods=200);
36
37 benchmark = load('../deterministic_simulations/ramst/Output/ramst_results.mat');
38
39 if max(abs(benchmark.oo_.endo_simul-oo_.endo_simul)) > 1e5
40 error('The results of simul are inconsistent with perfect_foresight_setup+perfect_foresight_solver');
41 end