| 1 |
// this file implements the model in: |
| 2 |
// Atkinson, T., A. W. Richter, and N. A. Throckmorton (2019). |
| 3 |
// The zero lower bound andestimation accuracy.Journal of Monetary Economics |
| 4 |
// original codes provided by Alexander Richter |
| 5 |
// adapted for dynare implementation |
| 6 |
// modified not to remove observables at the zlb |
| 7 |
// ------------------------- Settings -----------------------------------------// |
| 8 |
|
| 9 |
@#ifndef small_model |
| 10 |
@#define small_model = 0 |
| 11 |
@#endif |
| 12 |
|
| 13 |
// ----------------- Defintions -----------------------------------------// |
| 14 |
var |
| 15 |
c $c$ (long_name='Consumption') |
| 16 |
n (long_name='Labor') |
| 17 |
y $y$ (long_name='Output') |
| 18 |
yf (long_name='Final goods') |
| 19 |
yg (long_name='Output growth gap') |
| 20 |
w (long_name='Real wage rate') |
| 21 |
wf (long_name='Flexible real wage') |
| 22 |
pigap (long_name='Inflation rate -> pi(t)/pibar = pigap') |
| 23 |
inom ${i^{nom}}$ (long_name='Nominal interest rate') |
| 24 |
inomnot (long_name='Notional interest rate') |
| 25 |
mc (long_name='Real marginal cost') |
| 26 |
lam ${\lambda}$ (long_name='Inverse marginal utility of wealth') |
| 27 |
g (long_name='Growth shock') |
| 28 |
s (long_name='Risk premium shock') |
| 29 |
mp (long_name='Monetary policy shock') |
| 30 |
pi ${\pi}$ (long_name='Observed inflation') |
| 31 |
@#if !(small_model) |
| 32 |
x (long_name='Investment') |
| 33 |
k (long_name='Capital') |
| 34 |
u (long_name='Utilization cost') |
| 35 |
ups (long_name='Utilization choice') |
| 36 |
wg (long_name='Real wage growth gap') |
| 37 |
xg (long_name='Investment growth') |
| 38 |
rk (long_name='Real rental rate') |
| 39 |
q (long_name='Tobins q') |
| 40 |
@#endif |
| 41 |
; |
| 42 |
varexo |
| 43 |
epsg ${\varepsilon_g}$ (long_name='Productivity growth shock') |
| 44 |
epsi (long_name='Notional interest rate shock') |
| 45 |
epss (long_name='Risk premium shock') |
| 46 |
; |
| 47 |
parameters |
| 48 |
// Calibrated Parameters |
| 49 |
beta $\beta$ (long_name='Discount factor') |
| 50 |
chi (long_name='Labor disutility scale') |
| 51 |
thetap (long_name='Elasticity of subs. between intermediate goods') |
| 52 |
thetaw (long_name='Elasticity of subs. between labor types') |
| 53 |
nbar (long_name='Steady state labor') |
| 54 |
eta (long_name='Inverse frish elasticity of labor supply') |
| 55 |
delta (long_name='Depreciation') |
| 56 |
alpha (long_name='Capital share') |
| 57 |
gbar (long_name='Mean growth rate') |
| 58 |
pibar (long_name='Inflation target') |
| 59 |
inombar (long_name='Steady gross nom interest rate') |
| 60 |
inomlb (long_name='Effective lower bound on gross nominal interest rate') |
| 61 |
sbar (long_name='Average risk premium') |
| 62 |
// Parameters for DGP and Estimated parameters |
| 63 |
varphip (long_name='Rotemberg price adjustment cost') |
| 64 |
varphiw (long_name='Rotemberg wage adjustment cost') |
| 65 |
h (long_name='Habit persistence') |
| 66 |
rhos (long_name='Persistence') |
| 67 |
rhoi (long_name='Persistence') |
| 68 |
sigz (long_name='Standard deviation technology') |
| 69 |
sigs (long_name='Standard deviation risk premia') |
| 70 |
sigi (long_name='Standard deviation mon pol') |
| 71 |
phipi (long_name='Inflation responsiveness') |
| 72 |
phiy (long_name='Output responsiveness') |
| 73 |
nu (long_name='Investment adjustment cost') |
| 74 |
sigups (long_name='Utilization') |
| 75 |
; |
| 76 |
|
| 77 |
|
| 78 |
// ---------------- Calibration -----------------------------------------// |
| 79 |
|
| 80 |
beta = 0.9949; // Discount factor |
| 81 |
thetap = 6; // Elasticity of subs. between intermediate goods |
| 82 |
thetaw = 6; // Elasticity of subs. between labor types |
| 83 |
nbar = 1/3; // Steady state labor |
| 84 |
eta = 1/3; // Inverse frish elasticity of labor supply |
| 85 |
delta = 0.025; // Depreciation |
| 86 |
alpha = 0.35; // Capital share |
| 87 |
gbar = 1.0034; // Mean growth rate |
| 88 |
pibar = 1.0053; // Inflation target |
| 89 |
sbar = 1.0058; // Average risk premium |
| 90 |
rkbar = 1/beta; |
| 91 |
varphiw = 100; // Rotemberg wage adjustment cost |
| 92 |
nu = 4; // Investment adjustment cost |
| 93 |
sigups = 5; // Utilization |
| 94 |
varphip = 100; // Rotemberg price adjustment cost |
| 95 |
h = 0.80; // Habit persistence |
| 96 |
rhos = 0.80; // Persistence |
| 97 |
rhoi = 0.80; // Persistence |
| 98 |
sigz = 0.005; // Standard deviation |
| 99 |
sigs = 0.005; // Standard deviation |
| 100 |
sigi = 0.002; // Standard deviation |
| 101 |
phipi = 2.0; // Inflation responsiveness |
| 102 |
phiy = 0.5; // Output responsiveness |
| 103 |
inomlb = 1 ; // Inom LB |
| 104 |
|
| 105 |
// ---------------- Model -----------------------------------------------// |
| 106 |
model; |
| 107 |
|
| 108 |
@#if !(small_model) |
| 109 |
[name = 'HH FOC utilization (1)'] |
| 110 |
rk = steady_state(rk)*exp(sigups*(ups-1)); |
| 111 |
|
| 112 |
[name = 'Utilization definition (3)'] |
| 113 |
u = steady_state(rk)*(exp(sigups*(ups-1))-1)/sigups; |
| 114 |
|
| 115 |
[name = 'Firm FOC capital (4)'] |
| 116 |
rk = mc*alpha*g*yf/(ups*k(-1)); |
| 117 |
|
| 118 |
[name = 'HH FOC capital (17)'] |
| 119 |
q = beta*(lam/lam(+1))*(rk(+1)*ups(+1)-u(+1)+(1-delta)*q(+1))/g(+1); |
| 120 |
|
| 121 |
[name = 'HH FOC investment (18)'] |
| 122 |
1 = q*(1-nu*(xg-1)^2/2-nu*(xg-1)*xg)+beta*nu*gbar*q(+1)*(lam/lam(+1))*xg(+1)^2*(xg(+1)-1)/g(+1); |
| 123 |
|
| 124 |
[name = 'Wage Phillips Curve (20)'] |
| 125 |
varphiw*(wg-1)*wg = ((1-thetaw)*w+thetaw*wf)*n/yf + beta*varphiw*(lam/lam(+1))*(wg(+1)-1)*wg(+1)*(yf(+1)/yf) ; |
| 126 |
|
| 127 |
[name = 'Real wage growth gap (6)'] |
| 128 |
wg = pigap*g*w/(gbar*w(-1)); |
| 129 |
|
| 130 |
[name = 'Law of motion for capital (15)'] |
| 131 |
k = (1-delta)*(k(-1)/g)+x*(1-nu*(xg-1)^2/2); |
| 132 |
|
| 133 |
[name = 'Investment growth gap (14)'] |
| 134 |
xg = g*x/(gbar*x(-1)); |
| 135 |
@#endif |
| 136 |
|
| 137 |
|
| 138 |
@#if small_model |
| 139 |
[name = 'Production function (2)'] |
| 140 |
yf = n; |
| 141 |
|
| 142 |
[name = 'Firm FOC labor (5)'] |
| 143 |
w = mc*yf/n; |
| 144 |
|
| 145 |
[name = 'Output definition (7)'] |
| 146 |
y = (1-varphip*(pigap-1)^2/2)*yf; |
| 147 |
|
| 148 |
[name = 'ARC (13)'] |
| 149 |
c = y; |
| 150 |
|
| 151 |
[name = 'Household labpur supply equals flex wage'] |
| 152 |
w = wf; |
| 153 |
@#else |
| 154 |
[name = 'Production function (2)'] |
| 155 |
yf = (ups*k(-1)/g)^alpha*n^(1-alpha); |
| 156 |
|
| 157 |
[name = 'Firm FOC labor (5)'] |
| 158 |
w = (1-alpha)*mc*yf/n; |
| 159 |
|
| 160 |
[name = 'Output definition (7)'] |
| 161 |
y = (1-varphip*(pigap-1)^2/2-varphiw*(wg-1)^2/2)*yf - u*k(-1)/g; |
| 162 |
|
| 163 |
[name = 'ARC (13)'] |
| 164 |
x = y-c; |
| 165 |
@#endif |
| 166 |
|
| 167 |
[name = 'Output growth gap (8)'] |
| 168 |
yg = g*y/(gbar*y(-1)); |
| 169 |
|
| 170 |
[name = 'Notional Interest Rate (9)'] |
| 171 |
inomnot = inomnot(-1)^rhoi*(inombar*pigap^phipi*yg^phiy)^(1-rhoi); |
| 172 |
|
| 173 |
[name = 'Nominal Interest Rate (10)', bind='zlb'] |
| 174 |
inom = inomlb*exp(mp); |
| 175 |
[name = 'Nominal Interest Rate (10)', relax='zlb'] |
| 176 |
inom = inomnot*exp(mp); |
| 177 |
|
| 178 |
[name = 'Inverse MUC (11)'] |
| 179 |
lam = c-h*c(-1)/g; |
| 180 |
|
| 181 |
[name = 'Flexible real wage definition (12)'] |
| 182 |
wf = chi*n^eta*lam; |
| 183 |
|
| 184 |
[name = 'HH FOC bond (16)'] |
| 185 |
1 = beta*(lam/lam(+1))*s*inom/(g(+1)*pibar*pigap(+1)); |
| 186 |
|
| 187 |
[name = 'Price Phillips Curve (19)'] |
| 188 |
varphip*(pigap-1)*pigap = 1-thetap+thetap*mc+beta*varphip*(lam/lam(+1))*(pigap(+1)-1)*pigap(+1)*(yf(+1)/yf); |
| 189 |
|
| 190 |
[name = 'Stochastic productivity growth (21)'] |
| 191 |
g = gbar+ sigz*epsg; |
| 192 |
|
| 193 |
[name = 'Risk premium shock (22)'] |
| 194 |
s = (1-rhos)*sbar + rhos*s(-1)+sigs*epss ; |
| 195 |
|
| 196 |
[name = 'Notional interest rate shock (23)'] |
| 197 |
mp = sigi*epsi; |
| 198 |
|
| 199 |
[name = 'Observed inflation (24)'] |
| 200 |
pi = pigap*pibar; |
| 201 |
|
| 202 |
end; |
| 203 |
|
| 204 |
occbin_constraints; |
| 205 |
name 'zlb'; bind inomnot <= inomlb; relax inomnot > inomlb; |
| 206 |
end; |
| 207 |
|
| 208 |
// ---------------- Steady state -----------------------------------------// |
| 209 |
steady_state_model; |
| 210 |
mp = 0; |
| 211 |
xg = 1; |
| 212 |
s = sbar; |
| 213 |
n = nbar; |
| 214 |
ups =1; |
| 215 |
u =0; |
| 216 |
q =1; |
| 217 |
g = gbar; |
| 218 |
yg = 1; |
| 219 |
pigap = 1; |
| 220 |
wg =1; |
| 221 |
pi = pigap*pibar; |
| 222 |
// FOC bond |
| 223 |
inom = gbar*pibar/(beta*s); |
| 224 |
inomnot = inom; |
| 225 |
inombar = inom; |
| 226 |
// Firm pricing |
| 227 |
mc = (thetap-1)/thetap; |
| 228 |
// FOC capital |
| 229 |
rk = gbar/beta+delta-1; |
| 230 |
// Marginal cost definition |
| 231 |
@#if small_model |
| 232 |
alpha = 0; |
| 233 |
thetaw=1; |
| 234 |
@#endif |
| 235 |
w = (mc*(1-alpha)^(1-alpha)*alpha^alpha/rk^alpha)^(1/(1-alpha)); |
| 236 |
@#if small_model |
| 237 |
wf = w; |
| 238 |
@#else |
| 239 |
wf = (thetaw-1)*w/thetaw; |
| 240 |
@#endif |
| 241 |
// Consolidated FOC firm |
| 242 |
k = w*n*gbar*alpha/(rk*(1-alpha)); |
| 243 |
// Law of motion for capital |
| 244 |
x = (1-(1-delta)/gbar)*k; |
| 245 |
// Production function |
| 246 |
yf = (k/gbar)^alpha*n^(1-alpha); |
| 247 |
// Real GDP |
| 248 |
y = yf; |
| 249 |
// Aggregate resouce constraint |
| 250 |
c = y-x; |
| 251 |
// FOC labor |
| 252 |
lam = (1-h/gbar)*c; |
| 253 |
chi = wf/(n^eta*lam); |
| 254 |
|
| 255 |
// try log observables |
| 256 |
end; |
| 257 |
|
| 258 |
// ---------------- Checks -----------------------------------------// |
| 259 |
steady; |
| 260 |
check; |
| 261 |
|
| 262 |
// ---------------- Simulation -----------------------------------------// |
| 263 |
shocks; |
| 264 |
var epsi = 1; |
| 265 |
var epss = 1; |
| 266 |
var epsg = 1; |
| 267 |
end; |
| 268 |
|
| 269 |
steady; |
| 270 |
check; |
| 271 |
|
| 272 |
// ---------------- Estimation -----------------------------------------// |
| 273 |
|
| 274 |
varobs yg inom pi; |
| 275 |
estimated_params; |
| 276 |
varphip,,0,inf,NORMAL_PDF,100,25; |
| 277 |
phipi,,,,NORMAL_PDF,2,0.25; |
| 278 |
phiy,,0,inf,NORMAL_PDF,0.5,0.25; |
| 279 |
h,,,,BETA_PDF,0.8,0.1; |
| 280 |
rhos,,,,BETA_PDF,0.8,0.1; |
| 281 |
rhoi,,,,BETA_PDF,0.8,0.1; |
| 282 |
sigz,,,,INV_GAMMA_PDF,0.005,0.005; |
| 283 |
sigs,,,,INV_GAMMA_PDF,0.005,0.005; |
| 284 |
sigi,,,,INV_GAMMA_PDF,0.002,0.002; |
| 285 |
end; |