-
Notifications
You must be signed in to change notification settings - Fork 1
/
olg_zin_index_IT_no_money_block_end.mod
139 lines (105 loc) · 3.27 KB
/
olg_zin_index_IT_no_money_block_end.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
tk = 2.3*t;
N = 100000;
model;
//Budget constraint of young consumers
cy = w*(1-t) - btot - k - md;
//Budget constraint of old consumers
co = (1-tk)*A*k(-1) + ( sharei*rf(-1)*rm*piind + (1-sharei)*R(-1)*rm )*btotd(-1) + rm*md(-1);
//Government budget constraint
g = w*t + tk*A*k(-1) + b - R(-1)*rm*b(-1) + bi - rf(-1)*rm*piind*bi(-1) + m - rm*m(-1);
//Government spending to output ratio
g_ratio = g/out;
//Total demand for bonds
btotd = bd + bid;
//Nominal bonds market clearing
bd = b;
//Indexed bonds market clearing
bid = bi;
//Supply of indexed bonds
bi = sharei*btot;
//Supply of nominal bonds
b = (1-sharei)*btot;
//Total bond supply equation (ie eq for btot)
muy = mu(+1);
//Money demand/CIA constraint
md = gamma;
//Money market equilibrium
m = md;
//Inflation shock
v = x_920(-1);
//Money supply rule
m = m(-1)*(1+pi)^(-1) * ( (1+pstar)^20 )*(1+x_1)*(1+x_2)*(1+x_3)*(1+x_4)*(1+x_5)*(1+x_6)*(1+x_7)*(1+x_8)*(1+x_9)*(1+x_910)*(1+x_911)*(1+x_912)*(1+x_913)*(1+x_914)*(1+x_915)*(1+x_916)*(1+x_917)*(1+x_918)*(1+x_919)*(1+x_920);
//Indexed inflation
piind =( (1+pstar)^20 )*(1+v)*(1+x_1)*(1+x_2)*(1+x_3)*(1+x_4)*(1+x_5)*(1+x_6)*(1+x_7)*(1+x_8)*(1+x_9)*(1+x_910)*(1+x_911)*(1+x_912)*(1+x_913)*(1+x_914)*(1+x_915)*(1+x_916)*(1+x_917)*(1+x_918)*(1+x_919);
//Productivity (ie TFP)
pro = exp(e)*(pro(-1)^rho)*(promean^(1-rho));
//Euler equation for capital
muy = beta*(1-tk)*mu(+1)*pro(+1)*alpha*k^(alpha-1);
//Real return on money balances
rm = 1/(1+pi);
//Euler equation for nominal bonds
muy = beta*R*mu(+1)*rm(+1);
//Risk-free rate
muy = beta*rf*mu(+1)*rm(+1)*piind(+1);
//Real return on nominal bonds
rn = R(-1)*rm;
//Real return on indexed bonds
ri = rf(-1)*piind*rm;
//Real return on capital
A = pro*alpha*k(-1)^(alpha-1);
//Equation to calculate average annual after-tax risk premium on capital
rk = ( ((1-tk)*A)^(1/20) - 1 ) - (ri^(1/20) - 1);
//Equation to calculate the average diff between the inflation risk premium on nominal and indexed debt
irp = rn - ri;
//LHS term of Euler equation
//Scaling by 1/N prevents large numbers
muy = (1/N)*cy^(eps-1);
//RHS term of Euler equation
//Scaled and unscaled by 10^(1+delta) due to definition of eco (see below)
//Scaling by 1/N prevents large numbers
mu = (1/N)*( co^delta )/ ( (eco(-1) / (10^(1+delta)) )^((1-eps+delta)/(1+delta)) );
//Expected consumption term in utility
//Scaling by 10 prevents large numbers
eco = (10*co(+1))^(1+delta);
//Epstein-Zin preferences
//Scaling by 1/(10^30) mean that initial value for utility does not need to changed with small changes on calibration
//The same scaling is applied under PT
utility = (1/(10^30))*(1/(1+delta))*( (cy)^(eps) + beta*(eco/(10^(1+delta)))^(eps/(1+delta)) )^((1+delta)/eps);
//Aggregate output
out = pro*k(-1)^alpha;
//Wages
w = out - A*k(-1);
end;
initval;
btot = 0.0557;
btotd = btot;
bi = 0.0111;
bid = bi;
b = 0.0446;
bd = b;
k = 0.0674;
rn = 1/beta;
cy = 0.1842;
R = 2.5877;
co = cy;
muy = 0.0000982;
mu = muy;
pi = 0.8114;
pro = promean;
rm = 0.5521;
md = gamma;
m = md;
A = 1.9195;
g = 0.0563;
utility = -0.000000000023;
out = 0.4920;
eco = 0.000194;
w = 0.3626;
rf = rn;
ri = rn;
rk = 0;
g_ratio = 0.1146;
irp = 0;
v = 0;
piind = 1+pi;
end;