-
Notifications
You must be signed in to change notification settings - Fork 0
/
irfFairnessMonetary.mod
114 lines (84 loc) · 2.54 KB
/
irfFairnessMonetary.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
%% irfFairnessMonetary.mod
%
% This script computes impulse response functions (IRFs) used in figure1.m.
%
%% Description
%
% The script computes IRFs to an expansionary monetary shock in the New Keynesian model with fairness.
%
%% Model variables
%
% * i0 = exogenous component of monetary-policy rule
% * a = log technology level
% * i = nominal interest rate
% * pi = inflation rate
% * mp = log perceived price markup
% * m = log actual price markup
% * n = log employment
% * y = log output
%
% All variables are measured as deviation from their steady-state values.
%
%% Model shocks
%
% * zetai = monetary shock
% * zetaa = technology shock
%
%% ----------------------------------------
%% ---------- Declare variables & shocks & parameters ----------
var i0 a i pi mp m n y;
varexo zetai zetaa;
parameters delta alpha eta psi mua mui theta gamma epsilon;
%% ---------- Calibrate parameters (table 3) ----------
% Discount factor
delta = 0.99;
% Shape of production function
alpha = 1;
% Inverse of Frisch elasticity of labor supply
eta = 1.1;
% Response of nominal interest rate to inflation
psi = 1.5;
% Persistence of monetary shock
mui = 0.75;
% Persistence of technology shock
mua = 0.9;
% Fairness concern
theta = 9;
% Degree of underinference
gamma = 0.8;
% Elasticity of substitution across goods
epsilon = 2.23;
%% --- Declare New Keynesian model with fairness (online appendix B.4) --------
% Use log-linearized equilibrium conditions
model(linear);
% Steady-state elasticity and superelasticity of fairness function
# phi = theta*epsilon/(epsilon-1);
# sigma = 1+(theta*epsilon/(epsilon-1));
% Coefficients in short-run Phillips curve
# lambda1 = (1+eta)*(epsilon+(epsilon-1)*gamma*phi)/(gamma*phi*sigma)*(1+(1-delta)/(1-delta*gamma)*gamma*phi);
# lambda2 = (1+eta)*delta*(epsilon+(epsilon-1)*phi)/(phi*sigma)*(1+(1-delta)/(1-delta*gamma)*gamma*phi);
% Law of motion of exogenous component of monetary-policy rule (section 5.4)
i0 = mui*i0(-1)-zetai;
% Law of motion of technology level (section 5.5)
a = mua*a(-1)+zetaa;
% Monetary-policy rule
i = i0+psi*pi;
% Production function
y = a+alpha*n;
% Markup-employment relation
m = -(1+eta)*n;
% Law of motion of perceived markup
mp = gamma*pi+gamma*mp(-1);
% Consumption Euler equation
y+i = y(+1)+pi(+1);
% Short-run Phillips curve
lambda1*n = (1-delta*gamma)*mp-delta*gamma*pi(+1)+lambda2*n(+1);
end;
%% ---------- Compute steady state & specify monetary shock ----------
steady;
shocks;
var zetai;
stderr 0.25;
end;
%% ---------- Compute IRFs ----------
stoch_simul(noprint,nodisplay) i0 pi mp m n y;