Debian Codegraph @

tests/decision_rules/first_order/fs2000_cr.mod

raw
1 // See fs2000.mod in the examples/ directory for details on the model
2
3 @#define countries = 1:100
4
5 var
6 @#for c in countries
7 m_@{c} P_@{c} c_@{c} e_@{c} W_@{c} R_@{c} k_@{c} d_@{c} n_@{c} l_@{c} gy_obs_@{c} gp_obs_@{c} y_@{c} dA_@{c}
8 @#endfor
9 ;
10 varexo e_a e_m;
11
12 parameters alp bet gam mst rho psi del;
13
14 alp = 0.33;
15 bet = 0.99;
16 gam = 0.003;
17 mst = 1.011;
18 rho = 0.7;
19 psi = 0.787;
20 del = 0.02;
21
22 model;
23 @#for c in countries
24 dA_@{c} = exp(gam+e_a);
25 log(m_@{c}) = (1-rho)*log(mst) + rho*log(m_@{c}(-1))+e_m;
26 -P_@{c}/(c_@{c}(+1)*P_@{c}(+1)*m_@{c})+bet*P_@{c}(+1)*(alp*exp(-alp*(gam+log(e_@{c}(+1))))*k_@{c}^(alp-1)*n_@{c}(+1)^(1-alp)+(1-del)*exp(-(gam+log(e_@{c}(+1)))))/(c_@{c}(+2)*P_@{c}(+2)*m_@{c}(+1))=0;
27 W_@{c} = l_@{c}/n_@{c};
28 -(psi/(1-psi))*(c_@{c}*P_@{c}/(1-n_@{c}))+l_@{c}/n_@{c} = 0;
29 R_@{c} = P_@{c}*(1-alp)*exp(-alp*(gam+e_a))*k_@{c}(-1)^alp*n_@{c}^(-alp)/W_@{c};
30 1/(c_@{c}*P_@{c})-bet*P_@{c}*(1-alp)*exp(-alp*(gam+e_a))*k_@{c}(-1)^alp*n_@{c}^(1-alp)/(m_@{c}*l_@{c}*c_@{c}(+1)*P_@{c}(+1)) = 0;
31 c_@{c}+k_@{c} = exp(-alp*(gam+e_a))*k_@{c}(-1)^alp*n_@{c}^(1-alp)+(1-del)*exp(-(gam+e_a))*k_@{c}(-1);
32 P_@{c}*c_@{c} = m_@{c};
33 m_@{c}-1+d_@{c} = l_@{c};
34 e_@{c} = exp(e_a);
35 y_@{c} = k_@{c}(-1)^alp*n_@{c}^(1-alp)*exp(-alp*(gam+e_a));
36 gy_obs_@{c} = dA_@{c}*y_@{c}/y_@{c}(-1);
37 gp_obs_@{c} = (P_@{c}/P_@{c}(-1))*m_@{c}(-1)/dA_@{c};
38 @#endfor
39 end;
40
41 initval;
42 @#for c in countries
43 k_@{c} = 6;
44 m_@{c} = mst;
45 P_@{c} = 2.25;
46 c_@{c} = 0.45;
47 e_@{c} = 1;
48 W_@{c} = 4;
49 R_@{c} = 1.02;
50 d_@{c} = 0.85;
51 n_@{c} = 0.19;
52 l_@{c} = 0.86;
53 y_@{c} = 0.6;
54 gy_obs_@{c} = exp(gam);
55 gp_obs_@{c} = exp(-gam);
56 dA_@{c} = exp(gam);
57 @#endfor
58 end;
59
60 shocks;
61 var e_a; stderr 0.014;
62 var e_m; stderr 0.005;
63 end;
64
65 steady;
66
67 tic;
68 check;
69 disp(toc);
70
71 tic;
72 stoch_simul(order=1,dr=cycle_reduction,irf=0,nomoments,noprint);
73 disp(toc);