NK - Lecture Notes
NK - Lecture Notes
Abstract
This document is entirely based on Gali’s book chapter 3 and featured by step-by-step solution. For further
intuition of each step look at the book.
1 Baseline
The main features of the basic new Keynesian model are:
1. Closed economy
2. There is not fiscal sector
3. There is only a production input (labor)
4. No capital accumulation
5. Perfect competition in input market (labor market)
6. Imperfect competition in goods market (differentiated goods)
7. Staggered price setting (Calvo, 1983)
2 Households
Households has to make two temporal desicions:
1. Intertemporal choice
Maximize its expected utility function (discounted) over time subject to its buget constraint.
2. Intratemporal choice
Maximize its consumption among all goods subject to a fixed expenditure.
A representative infinitely-lived household, seeking to maximize:
∞
X
V = E0 β t U (Ct , Nt )
t=0
with Ct (i) representing the quantity of good i consumed by the household in period t. Note that we assume the
existence of a continuum of goods represented by the interval [0, 1]. The period budget constraint now takes the
form
1
ˆ 1
Pt (i)Ct (i)di + Qt Bt ≤ Bt−1 + Wt Nt + Tt f or t = 0, 1, 2, ....
0
ˆ 1
Pt (i)Ct (i)di = Pt Ct (2)
0
Pt Ct + Qt Bt ≤ Bt−1 + Wt Nt + Tt
s.t.
∞
1 1
X
L = E0 βt Ct1−σ − Nt1+φ + λt (Bt−1 + Wt Nt + Tt − Pt Ct − Qt Bt )
t=0
1−σ 1+φ
FOCs:
β t Ct−σ
β t UC (Ct , Nt ) − λt Pt = β t Ct−σ − λt Pt = 0 =⇒ λt = (3)
Pt
β t Ntφ
β t UN (Ct , Nt ) + λt Wt = −β t Ntφ + λt Wt = 0 =⇒ λt = (4)
Wt
λt (−Qt ) + βλt+1 (1) = 0 =⇒ λt Qt = βλt+1 (5)
Combining eq.(3) and eq.(4) by using λ, we get:
2
1 1
Ctϵ Ct (i)− ϵ = λt [Pt (i)] (8)
∂L 1 1
= 0 =⇒ Ct Ct (j)− ϵ = λt [Pt (j)] ϵ
(9)
∂Ct (j)
Dividing eq.(8) into eq.(9):
−ϵ
Pt (i)
Ct (i) = Ct (j) (10)
Pt (j)
Plugging eq.(10) into our objective function:
ϵ
ˆ # ϵ−1
" ϵ−1
−ϵ
Pt (i)
1 ϵ
Ct = Ct (j) di
Pt (j)
0
ϵ
Ct (j) 1
ˆ ϵ−1
ϵ−1
Ct = Pt (i)−ϵ ϵ di
Pt (j)−ϵ 0
ϵ
Ct (j) 1
ˆ ϵ−1
Ct = Pt (i) 1−ϵ
di (11)
Pt (j)−ϵ 0
3
3. Consumption Index: eq.(1)
ϵ
ˆ 1 ϵ−1
ϵ−1
Ct = Ct (i) ϵ di
0
3 Firms
3.1 Production Function
We assume a coninuum of firms indexed by i ∈ [0, 1]. Each firm produces a differentiated good, but they all use an
identical technology, represented by the production function
Yt (i) = At Nt (i)1−α (15)
where At represents the level of technology, assumed to be common to all firms and to evolve exogenously over
time.
To choose the optimum level of N (i)t , we must maximize:
Pt1−ϵ = 1−ϵ
Pt−1 θ + Pt∗1−ϵ (1 − θ) (17)
4
3.3 Optimal Price Setting
A firm reoptimazing in period t will choose the price Pt∗ that maximizes the current market value of the profits
generated while that price remains effective.
• Marginal Cost:
α α
∂T Ct (i) 1 Yt (i) 1−α 1 At1−α Nt (i)α 1 Nt (i)α
M Ct (i) = = Wt = W t = Wt (20)
∂Yt (i) (1 − α) A 1−α
1
(1 − α) 1
A 1−α (1 − α) At
t t
Nt (i)
Adding Nt (i) :
1 Nt (i)α Nt (i) 1 1
M Ct (i) = Wt = Wt Nt (i)
(1 − α) At Nt (i) (1 − α) At Nt (i)1−α
1 1
M Ct (i) = Wt Nt (i)
(1 − α) Yt (i)
(1 − α)M Ct (i)Yt (i) = Wt Nt (i) (21)
Plugging eq.(21) into eq.(18) in order to get a function of total cost in terms of output units.
5
3.3.3 Firm’s Maximization Problem2
∞
( )
X
M axPt∗ Ω = Et θ Qt,t+k Pt Yt+k/t (i) − T Ct+k/t (i) (23)
k
∗
k=0
s.t. −ϵ
Pt∗
Yt+k/t (i) = Yt+k (24)
Pt+k
This constraint is based on the fact that P (i)t = Pt∗ as well as given a closed economy Yt = Ct , eq.(14) can be
rewritten in terms of Yt .
Plugging eq. (21) into eq.(23):
(∞ )
X
θ Qt,t+k Pt Yt+k (i) − (1 − α)M C(i)t+k/t Yt+k/t (i)
k
∗
Et
k=0
∞
( )
X
θ Qt,t+k Pt∗ − (1 − α)M Ct+k/t (i) Yt+k/t (i)
k
(25)
Et
k=0
∞
( " # )
X Yt+k h ∗1−ϵ ∗−ϵ
i
Ω = Et k
θ Qt,t+k −ϵ Pt − (1 − α)M Ct+k/t (i)Pt
k=0
Pt+k
FOC:
∞
( # " )
∂Ω X Yt+k h ∗−ϵ ∗−ϵ−1
i
= Et k
θ Qt,t+k −ϵ (1 − ϵ)Pt − (1 − α)M Ct+k/t (i)(−ϵ)Pt =0
∂Pt∗ Pt+k
k=0
(∞ " −ϵ
# )
∂Ω X Yt+k Pt∗ h
∗−1
i
= Et k
θ Qt,t+k −ϵ (1 − ϵ) − (1 − α)M Ct+k/t (i)(−ϵ)Pt =0
∂Pt∗ Pt+k
k=0
−ϵ
Pt∗ Yt+k Pt∗
multiplying by (1−ϵ) and taking into account that −ϵ
Pt+k
= Y (i)t+k/t
∞
( )
∂Ω X ϵ
= Et θ Qt,t+k Yt+k/t (i) Pt∗ − (1 − α)M Ct+k/t (i)
k
=0 (26)
∂Pt∗ (ϵ − 1)
k=0
Notice that limiting the case of no price frictions (θ = 0) the previous condition collapses to the familiar optimal
price setting condition under flexible prices
ϵ
Pt∗ = (1 − α)M Ct+k/t (i)
(ϵ − 1)
1
Pt∗ = 1 − (1 − α)M Ct+k/t (i)
ϵ−1
if
ϵ > 1 =⇒ Pt∗ > (1 − α)M Ct+k/t (i)
ϵ → ∞ =⇒ Pt∗ = (1 − α)M Ct+k/t (i)
P∞
2 The firm’s maximization problem could be rewritten acording to Gali’s notation:M axP ∗ k=0
θk Qt,t+k Pt∗ Y t+k/t (i) − Ψt+k (Yt+k/t (i))
t
6
−ϵ−1
Dividing eq.(26) by Pt∗ , we get3 :
Dividing eq.(26) by Pt−1 :
(∞ )
Pt∗ 1 Pt+k
∂Ω X ϵ
= Et θ Qt,t+k Yt+k/t (i)
k
− (1 − α)M Ct+k/t (i) =0
∂Pt∗ Pt−1 (ϵ − 1) Pt−1 Pt+k
k=0
M Ct+k/t (i)
Rewriting this equation: M Ct+k/t
r
(i) = (real marginal cost) and PPt+k = t−1,t+k (inf lation), we have
Q
Pt+k t−1
our optimal price setting condition4 :
(∞ ∗ )
∂Ω X P ϵ Y
= Et θk Qt,t+k Yt+k/t (i) t
− (1 − α)M Ct+k/t
r
(i) =0 (27)
t−1,t+k
∂Pt∗ Pt−1 (ϵ − 1)
k=0
P∞
3 This could be rewritten acording to Gali’s notation: k=0
θk Et Qt,t+k Yt+k/t Pt∗ − ψt+k/t M = 0 ; where : M =
ϵ ′
(ϵ−1)
; ψt+k/t = Ψt+k/t (Yt+k/t ) = (1 − α)M Ct+k/t (i)
Pt∗
P∞ n h Q io
4 Acording to Gali’s notation: k=0
θk Et Qt,t+k Yt+k/t Pt−1
− MM Ct+k/t (i) t−1,t+k
= 0 ; where : M =
ϵ ψt+k/t
(ϵ−1)
; M Ct+k/t (i) = Pt+k
7
4 Log Linear Techniques
Handling and solving models with substantial nonlinearity is often difficult. Linear models are often much easier
to solve, and there exist well-developed methods for solving linear models. The problem is to convert a nonlinear
model into a sufficiently good linear approximation so that the solutions to the linear approximation are helpful in
understanding the behavior of the underlying nonlinear system. A now standard method for linear approximation
is to log-linearize a model around its stationary state. The assumption is that, if the model is not too far from the
stationary state, the linear version that results closely approximates the original model.
Xt − X
xt = lnXt − lnX ∼
=
X
since
Xt
Xt
ln
Xext = XelnXt −lnX = Xe X =X = Xt
X
8
5 Log Linear Model
In this section, we will log linearize some main equations both for households and firms:
5.1 Households
1. Labor supply: eq.(6)
Ct−σ Wt = Ntφ Pt =⇒ wt − pt = φnt + σct (29)
2. Euler Equation: eq.(7) " # " #
−σ −σ
Ct−σ Ct+1 −σ Ct+1
Qt = βEt =⇒ Ct Qt = βEt Q (30)
Pt Pt+1 t,t+1
at steady state:
1−ϵ 1−ϵ 1−ϵ
P =P θ+P (1 − θ)
so
1−ϵ 1−ϵ 1−ϵ
P (1 − ϵ)pt = P (1 − ϵ)pt−1 θ + P (1 − ϵ)p∗t (1 − θ)
=⇒ pt = pt−1 θ + p∗t (1 − θ) (36)
substracting pt−1 in both sides
pt − pt−1 = pt−1 θ − pt−1 + p∗t (1 − θ)
=⇒ πt = (1 − θ)(p∗t − pt−1 ) where πt = pt − pt−1 (37)
both eq.(36) and eq.(37)5 are the same.
5 Equation (7) in Gali’s book.
9
5. The stochastic discount factor: eq.(22)
" #
−σ
Ct+k Pt
Qt,t+k = β Et k
Pt+k Ct−σ
so
qt,t+k = −σ (Et ct+k − ct ) − (Et pt+k − pt ) + klogβ
This equation in the steady state: Qt,t+k = β k (eq.(22) =⇒ Ct+k = Ct and Pt+k = Pt = Pt−1 = Pt∗ ) and in turn =
Q
1
r ϵ−1
M C t+k/t (i) = (40)
ϵ (1 − α)
Now, in log linear terms must be (using Uhlig’s Method):
∞ i P ep∗t
X h r mcrt+k/t (i) ϵ P pt+k −pt−1
θk Et Qt,t+k eqt,t+k Y eyt+k/t (i) − (1 − α)M C (i)e e =0
P ept−1
t+k/t
(ϵ − 1) P
k=0
∞ nh io
X ∗ r
eqt,t+k +yt+k/t (i)+pt −pt−1 − eqt,t+k +yt+k/t (i)+mct+k/t (i)+pt+k −pt−1
k
Y (θβ) Et =0
k=0
∞
X nh io
k
(θβ) Et (1 + qt,t+k + yt+k/t (i) + p∗t − pt−1 ) − (1 + qt,t+k + yt+k/t (i) + mcrt+k/t (i) + pt+k − pt−1 ) = 0
k=0
∞
X nh io
k
(θβ) Et p∗t − pt−1 − (mcrt+k/t (i) + pt+k − pt−1 ) =0
k=0
∞
X ∞
X n o
k k
(θβ) Et {p∗t − pt−1 } = (θβ) Et mcrt+k/t (i) + pt+k − pt−1 (41)
k=0 k=0
∞
X ∞
X n o
k k
(p∗t − pt−1 ) (θβ) = (θβ) Et mcrt+k/t (i) + pt+k − pt−1
k=0 k=0
∞
1 X k
n o
(p∗t − pt−1 ) = (θβ) Et mcrt+k/t (i) + pt+k − pt−1
1 − θβ
k=0
∞
X n o
k
=⇒ (p∗t − pt−1 ) = (1 − θβ) (θβ) Et mcrt+k/t (i) + pt+k − pt−1 (42)
k=0
10
5.3 Equlibrium without Frictions (log-linear version)
1. Market Clearing: the superscript n implies an equilibrium without frictions.
1−σ n
ytn (i) = at + (1 − α) y (i)
1+φ t
(1 + φ)at
ytn (i) = (44)
φ + α + σ(1 − α)
eq.(45) is the marginal cost in the period t + k. However, the marginal cost that firms take into account at
the moment of deciding its optimum price level (Pt∗ ) is the one that they can calculate at time t, so
11
• As we know, we can rewrite nt in terms of yt using the production function:
Yt (i) = At Nt (i)1−α
∞ ∞
X k
X k αϵ
(θβ) Et {p∗t } = (θβ) Et mcrt+k (i) − (p∗ − pt+k ) + pt+k
1−α t
k=0 k=0
rearranging terms
∞ ∞
X k αϵ X k αϵ
(θβ) Et p∗t 1+ = (θβ) Et mcrt+k (i) + pt+k 1+
1−α 1−α
k=0 k=0
6 This equation in Gali’s book is the equation (14)
12
∞ ∞
1 − α + αϵ 1 − α + αϵ
X X
k k
(θβ) Et p∗t = (θβ) Et mcrt+k (i) + pt+k
1−α 1−α
k=0 k=0
∞ ∞
1−α X 1 − α + αϵ 1 − α + αϵ 1−α
X
k k
(θβ) Et pt
∗
= (θβ) Et mct+k (i) + pt+k
r
1 − α + αϵ 1−α 1−α 1 − α + αϵ
k=0 k=0
∞ ∞
1−α
X X
k k
(θβ) Et {p∗t } = (θβ) Et mcr (i) + pt+k
1 − α + αϵ t+k
k=0 k=0
∞
1 1−α
X
k
(p∗t − pt−1 ) = (θβ) Et mcr (i) + pt+k − pt−1
1 − θβ 1 − α + αϵ t+k
k=0
∞
X k 1−α
p∗t − pt−1 = (1 − θβ) (θβ) Et Θmcrt+k (i) + pt+k − pt−1 where Θ = <1 (54)
1 − α + αϵ
k=0
3. In this part, we will obtain an equation which relates inflation to its one period ahead forecast and the output
gap.
k=1
k=0
∞
X k
Et p∗t+1 θβ = (1 − θβ) (θβ) Et Θmcrt+k (i) + pt+k (56)
k=1
13
multipliying by (1 − θ) in both sides
[1 − θβ] (1 − θ)
πt = Θmcrt (i) + βEt πt+1
θ
so7
[1 − θβ] (1 − θ)
πt = λmcrt (i) + βEt πt+1 ; where λ = Θ (58)
θ
(d) Now, we are going to find an equation of mcrt (i) in terms of output gap (e
yt = yt (i) − ytn (i))
recall eq.(29) and eq.(35)
wt − pt = φnt (i) + σct (i)
combining both equations (assuming equlibrium in labor market and market clearing yt (i) = ct (i))
yt (i) − at
nt (i) =
(1 − α)
replacing terms
yt (i) − at
mcrt (i)= (α + φ) − at + σyt (i)
(1 − α)
yt (i)
at
mct (i) = (α + φ)
r
− (α + φ) − at + σyt (i)
(1 − α) (1 − α)
σ(1 − α) + α + φ 1+φ
mcrt (i) = yt (i) − at
1−α (1 − α)
σ(1 − α) + α + φ 1+φ
mct (i) =
r
yt (i) − at
1−α σ(1 − α) + α + φ
(1+φ)at
recall eq.(44) :ytn (i) = φ+α+σ(1−α) , so
σ(1 − α) + α + φ
mcrt (i)
= [yt (i) − ytn (i)]
1−α
σ(1 − α) + α + φ
mc(i)t =
r
yet ; where yet = yt (i) − ytn (i) (59)
1−α
(e) Finally, replacing eq.(59) into eq.(58), we get8
σ(1 − α) + α + φ
πt = λ yet + βEt πt+1
1−α
7 Equation (16) in Gali’s book.
8 Equation (21) in Gali’s book.
14
πt = κe
yt + βEt πt+1 (60)
where
σ(1 − α) + α + φ
κ=λ
1−α
[1 − θβ] (1 − θ)
λ= Θ
θ
1−α
Θ=
1 − α + αϵ
Equation (60) is the new Keynesian Phillips curve.
7 The IS Curve
In this section, we will obtain the second key equation describing the equilibrium of the New Keynesian model.
As mentioned earlier, this basic framework of NEK model assumes a closed economy:
Yt = Ct
and in its log-linear version
yt = ct
Using this consition into the log-linear euler equation eq.(31) (in its natural level-without frictions)
1n
ytn = Et yt+1 (61)
n n
− i − Et πt,t+1 −ρ
σ t
Using Fisher equation:
rtn = int − Et πt+1
n
(62)
Plugging eq.(61) into and rearranging terms
−σ ytn − Et yt+1 = it − Et πt,t+1
n n n
−ρ
− yt = [rtn − ρ]
n
σ Et yt+1
n
σEt △yt+1 + ρ = rtn (63)
given that the economy is not in its natural level, Fisher equation and Euler equation in term of output are
1
yt = Et {yt+1 } − [it − Et πt,t+1 − ρ] (64)
σ
rt = it − Et πt+1 (65)
adding Et yt+1 − yt both sides into eq.(61) and rearranging terms:
n n
1
yt + Et yt+1
n
− ytn = Et {yt+1 } − [it − Et πt,t+1 − ρ] + Et yt+1
n
− ytn
σ
1
yt − ytn = Et yt+1 − yt+1
n
− [it − Et πt,t+1 − ρ] + Et yt+1
n
− ytn (66)
σ
defining the output gap as follow
yet = yt − ytn
so, eq.(66) is
1
yet = Et {e [it − πt,t+1 ] + Et yt+1
n
− ytn
yt+1 } −
σ
1
yet = Et {e
yt+1 } − [it − πt,t+1 ] + Et △yt+1 n
σ
using eq.(63) and eq.(65)
1 1
yet = Et {e
yt+1 } − [it − πt,t+1 ] + rtn
σ σ
Finally, we get our dynamic IS equation
1
yet = Et {e
yt+1 } − [it − πt,t+1 − rtn ] (67)
σ
15
8 A Monetary Policy Rule
To analyze an equilibrium, we should set a simple interest rate rule:
it = ρ + ϕπ πt + ϕy yet + υt
where υt is an exogenous (possibly stochastic) component with mean zero. We assume ϕπ and ϕy are non-negative
coefficients, chosen by the monetary authority. Note that the choice of the intercept ρmakes the rule consistent
with zero inflation steady state.
16