Debian Codegraph @

tests/optimal_policy/nk_ramsey_model.mod

raw
1 //MODEL:
2 //test on Dynare to find the lagrangean multipliers.
3 //We consider a standard NK model. We use the FOCS of the competitive economy and we aim at calculating the Ramsey optimal problem.
4
5 //------------------------------------------------------------------------------------------------------------------------
6 //1. Variable declaration
7 //------------------------------------------------------------------------------------------------------------------------
8
9 var pai, c, n, r, a;
10
11 //4 variables + 1 shock
12
13 varexo u;
14
15
16
17
18 //------------------------------------------------------------------------------------------------------------------------
19 // 2. Parameter declaration and calibration
20 //-------------------------------------------------------------------------------------------------------------------------
21
22 parameters beta, rho, epsilon, omega, phi, gamma;
23
24 beta=0.99;
25 gamma=3; //Frish elasticity
26 omega=17; //price stickyness
27 epsilon=8; //elasticity for each variety of consumption
28 phi=1; //coefficient associated to labor effort disutility
29
30 rho=0.95; //coefficient associated to productivity shock
31
32
33 //-----------------------------------------------------------------------------------------------------------------------
34 // 3. The model
35 //-----------------------------------------------------------------------------------------------------------------------
36
37
38 model;
39
40
41 a=rho*(a(-1))+u;
42
43 1/c=beta*(1/(c(+1)))*(r/(pai(+1))); //euler
44
45
46 omega*pai*(pai-1)=beta*omega*(c/(c(+1)))*(pai(+1))*(pai(+1)-1)+epsilon*exp(a)*n*(c/exp(a)*phi*n^gamma-(epsilon-1)/epsilon); //NK pc
47 //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); //NK pc
48
49 (exp(a))*n=c+(omega/2)*((pai-1)^2);
50
51 end;
52
53 //--------------------------------------------------------------------------------------------------------------------------
54 // 4. Steady state
55 //---------------------------------------------------------------------------------------------------------------------------
56
57 initval;
58
59 pai=1;
60 r=1/beta;
61 c=0.9671684882;
62 n=0.9671684882;
63 a=0;
64
65
66 end;
67
68
69
70 //---------------------------------------------------------------------------------------------------------------------------
71 // 5. shocks
72 //---------------------------------------------------------------------------------------------------------------------------
73
74 shocks;
75 var u; stderr 0.008;
76
77 end;
78
79 //--------------------------------------------------------------------------------------------------------------------------
80 // 6. Ramsey problem
81 //--------------------------------------------------------------------------------------------------------------------------
82
83 planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));
84
85 write_latex_static_model;
86
87 ramsey_model(planner_discount=0.99);
88 stoch_simul(irf=0);
89 evaluate_planner_objective;