Debian Codegraph @

tests/optimal_policy/Ramsey/ramsey_ex_aux.mod

raw
1 /* Mod file tests the correctness of the Ramsey command when used together with a steady state file by
2 * - checking whether the results coincide with the ones when used with an initval block
3 * - checking whether between stoch_simul and ramsey_planner are consistent
4 * The example is taken from Juillard, Michel (2011): User manual for optimal policy package,
5 * MONFISPOL FP7 project SSH-225149, Deliverable 1.1.2
6 */
7
8 var pai, c, n, r, a, junk_endo_backward,junk_endo_forward,junk_expectation,junk_exo_backward,junk_exo_forward;
9 varexo u;
10 parameters beta, rho, epsilon, omega, phi, gamma;
11
12 beta=0.99;
13 gamma=3;
14 omega=17;
15 epsilon=8;
16 phi=1;
17 rho=0.95;
18
19 model;
20 a = rho*a(-1)+u;
21 1/c = beta*r/(c(+1)*pai(+1));
22 pai*(pai-1)/c = beta*pai(+1)*(pai(+1)-1)/c(+1)+epsilon*phi*n^(gamma+1)/omega -exp(a)*n*(epsilon-1)/(omega*c);
23 junk_endo_backward=c(+2);
24 junk_endo_forward=c(-2);
25 junk_expectation=EXPECTATION(-1)(c(+1));
26 junk_exo_backward=u(-2);
27 junk_exo_forward=u(+2);
28 exp(a)*n = c+(omega/2)*(pai-1)^2;
29 end;
30
31 initval;
32 r=1;
33 end;
34
35 steady_state_model;
36 a = 0;
37 pai = beta*r;
38 c = find_c(0.96,pai,beta,epsilon,phi,gamma,omega);
39 n = c+(omega/2)*(pai-1)^2;
40 junk_endo_backward=c;
41 junk_endo_forward=c;
42 junk_expectation=c;
43 junk_exo_backward=0;
44 junk_exo_forward=0;
45 end;
46
47 shocks;
48 var u; stderr 0.008;
49 end;
50
51 planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));
52 ramsey_model(planner_discount=0.99,instruments=(r));
53 stoch_simul(order=1,periods=500);
54 evaluate_planner_objective;