a baseline dsge model - sas.upenn.edujesusfv/benchmark_dsge.pdf · a baseline dsge model jesús...
TRANSCRIPT
A Baseline DSGE Model
Jesús Fernández-Villaverde
Duke University, NBER, and CEPR
Juan F. Rubio-Ramírez
Duke University and Federal Reserve Bank of Atlanta
October 10, 2006
1
1. Introduction
In these notes, we present a baseline sticky prices-sticky wages model. The basic structure of
the economy is as follows. A representative household consumes, saves, holds money, supplies
labor, and sets its own wages subject to a demand curve and Calvo’s pricing. The final output
is manufactured by a final good producer, which uses as inputs a continuum of intermediate
goods manufactured by monopolistic competitors. The intermediate good producers rent
capital and labor to manufacture their good. Also, these intermediate good producers face
the constraint that they can only change prices following a Calvo’s rule. Finally, there is
a monetary authority that fixes the one-period nominal interest rate through open market
operations with public debt.
1.1. Households
There is a continuum of households in the economy indexed by j. The households maximizes
the following lifetime utility function, which is separable in consumption, cjt, real money
balances, mjt/pt (where pt is the price level), and hours worked, ljt:
E0∞Xt=0
βtdt
(log (cjt − hcjt−1) + υ log
µmjt
pt
¶− ϕtψ
l1+γjt
1 + γ
)
where β is the discount factor, h is the parameter that controls habit persistence, γ is the
inverse of Frisch labor supply elasticity, dt is an intertemporal preference shock with law of
motion:
log dt = ρd log dt−1 + σdεd,t where εd,t ∼ N (0, 1),
and ϕt is a labor supply shock with law of motion:
logϕt = ρϕ logϕt−1 + σϕεϕ,t where εϕ,t ∼ N (0, 1).
Note that the preference shifters are common for all households. Also, we have selected a
utility function (log utility in consumption) whose marginal relation of substitution between
consumption and leisure is linear in consumption to ensure the presence of a balanced growth
path with constant hours.
Households can trade on the whole set of possible Arrow-Debreu commodities, indexed
both by the household j (since the household faces idiosyncractic wage-adjustment risk that
we will describe below) and by time (to capture aggregate risk). Our notation ajt+1 indicates
the amount of those securities that pay one unit of consumption in event ωj,t+1,t purchased
2
by household j at time t at (real) price qjt+1,t. To save on notation, we drop the explicit
dependence of qjt+1,t and ajt+1 on the event when no ambiguity arises. Summing over different
individual assets we can price securities contingent only on aggregate states. Households also
hold an amount bjt of government bonds that pay a nominal gross interest rate of Rt.
Then, the j − th household’s budget constraint is given by:
cjt + xjt +mjt
pt+bjt+1pt
+
Zqjt+1,tajt+1dωj,t+1,t
= wjtljt +¡rtujt − μ−1t a [ujt]
¢kjt−1 +
mjt−1
pt+Rt−1
bjtpt+ ajt + Tt +zt
where wjt is the real wage, rt the real rental price of capital, ujt > 0 the intensity of use of
capital, μ−1t a [ujt] is the physical cost of use of capital in resource terms, μt is an investment-
specific technological shock to be described momentarily, , Tt is a lump-sum transfer, and ztare the profits of the firms in the economy. We assume that a [1] = 0, a0 and a00 > 0.
Investment xjt induces a law of motion for capital
kjt = (1− δ) kjt−1 + μt
µ1− S
∙xjtxjt−1
¸¶xjt
where δ is the depreciation rate and S [·] is an adjustment cost function such that S [Λx] = 0,S0 [Λx] = 0, and S00 [·] > 0 where Λx is the growth rate of investment along the balance
growth path. We will determine that growth rate below. Note our capital timing: we index
capital by the time its level is decided. The investment-specific technological shock follows
an autoregressive process:
μt = μt−1 exp (Λμ + zμ,t) where zμ,t = σμεμ,t and εμ,t ∼ N (0, 1)
The value of μt is also the inverse of the relative price of new capital in consumption terms.
Given our description of the household’s problem, the lagrangian function associated with
it is:
E0∞Xt=0
βt
⎡⎢⎢⎢⎢⎢⎢⎣dt
½log (cjt − hcjt−1) + υ log
³mjt
pt
´− ϕtψ
l1+γjt
1+γ
¾−λjt
(cjt + xjt +
mjt
pt+
bjtpt+Rqjt+1,tajt+1dωj,t+1,t
−wjtljt −¡rtujt − μ−1t a [ujt]
¢kjt−1 − mjt−1
pt−Rt−1 bjt−1pt
− ajt − Tt −zt
)−Qjt
nkjt − (1− δ) kjt−1 − μt
³1− S
hxjtxjt−1
i´xjto
⎤⎥⎥⎥⎥⎥⎥⎦where they maximize over cjt, bjt, ujt, kjt, xjt, wjt, ljt and ajt+1 (maximization with respect to
3
money holdings comes from the budget constraint), λjt is the lagrangian multiplier associated
with the budget constraint and Qjt the lagrangian multiplier associated with installed capital.
The first order conditions with respect to cjt, bjt, ujt, kjt, and xjt are:
dt (cjt − hcjt−1)−1 − hβEtdt+1 (cjt+1 − hcjt)−1 = λjt
λjt = βEtλjt+1RtΠt+1
rt = μ−1t a0 [ujt]
Qjt = βEt©(1− δ)Qjt+1 + λjt+1
¡rt+1ujt+1 − μ−1t+1a [ujt+1]
¢ª−λjt +Qjtμt
µ1− S
∙xjtxjt−1
¸− S0
∙xjtxjt−1
¸xjtxjt−1
¶+ βEtQjt+1μt+1S0
∙xjt+1xjt
¸µxjt+1xjt
¶2= 0.
We do not take first order conditions with respect to Arrow-Debreau securities since, in our
environment with complete markets and separable utility in labor, their equilibrium price
will be such that their demand ensures that consumption does not depend on idiosyncractic
shocks (see Erceg et. al., 2000).
If we define the (marginal) Tobin’s Q as qjt =Qjtλjt, (the ratio of the two lagrangian
multipliers, or more loosely the value of installed capital in terms of its replacement cost) we
get:
dt (cjt − hcjt−1)−1 − hβEtdt+1 (cjt+1 − hcjt)−1 = λjt
λjt = βEtλjt+1RtΠt+1
rt = μ−1t a0 [ujt]
qjt = βEt½λjt+1λjt
¡(1− δ) qjt+1 + rt+1ujt+1 − μ−1t+1a [ujt+1]
¢¾1 = qjtμt
µ1− S
∙xjtxjt−1
¸− S0
∙xjtxjt−1
¸xjtxjt−1
¶+ βEtqjt+1μt+1
λjt+1λjt
S0∙xjt+1xjt
¸µxjt+1xjt
¶2.
The last equation is important. If S [·] = 0 (i.e., there are no adjustment costs), we get:
qjt =1
μt
i.e., the marginal Tobin’s Q is equal to the replacement cost of capital (the relative price of
capital). Furthermore, if μt = 1, as in the standard neoclassical growth model, qjt = 1.
The first order condition with respect to labor and wages is more involved. The labor
used by intermediate good producers to be described below is supplied by a representative,
4
competitive firm that hires the labor supplied by each household j. The labor supplier
aggregates the differentiated labor of households with the following production function:
ldt =
µZ 1
0
lη−1η
jt dj
¶ ηη−1
(1)
where 0 ≤ η <∞ is the elasticity of substitution among different types of labor and ldt is the
aggregate labor demand.1
The labor “packer” maximizes profits subject to the production function (1), taking as
given all differentiated labor wages wjt and the wage wt. Consequently, its maximization
problem is:
maxljtwtl
dt −
Z 1
0
wjtljtdj
whose first order conditions are:
wtη
η − 1
µZ 1
0
lη−1η
jt dj
¶ ηη−1−1 η − 1
ηlη−1η−1
jt − wjt = 0 ∀j
Dividing the first order conditions for two types of labor i and j, we get:
witwjt
=
µlitljt
¶− 1η
or:
wjt =
µlitljt
¶ 1η
wit
Hence:
wjtljt = witl1η
it lη−1η
jt
and integrating out: Z 1
0
wjtljtdj = witl1η
it
Z 1
0
lη−1η
jt dj = witl1η
it
¡ldt¢η−1
η
Now, by the zero profits condition implied by perfect competition wtldt =R 10wjtljtdj, we get:
wtldt = witl
1η
it
¡ldt¢η−1
η ⇒ wt = witl1η
it
¡ldt¢− 1
η
1Often, papers write θ = η−1η and 1
θ =η
η−1 . For that reparametrization, −∞ < θ ≤ 1, where as θ → −∞(i.e., as η → 0), we go to a Leontieff production function, θ = 0 (i.e., η = 1) , we have a Cobb-Douglas, andθ = 1 (i.e., η →∞), a linear production function.
5
and, consequently, the input demand functions associated with this problem are:
ljt =
µwjtwt
¶−ηldt ∀j (2)
This functional form shows the effect of elasticity η, on the demand for j − th type of labor.To find the aggregate wage, we use again the zero profit condition wtldt =
R 10wjtljtdj and
plug-in the input demand functions:
wtldt =
Z 1
0
wjt
µwjtwt
¶−ηldt dj ⇒ w1−ηt =
Z 1
0
w1−ηjt dj
to deliver:
wt =
µZ 1
0
w1−ηjt dj
¶ 11−η
.
Idiosyncratic risks come about because households set their wages following a Calvo’s
setting. In each period, a fraction 1 − θw of households can change their wages. All other
households can only partially index their wages by past inflation. Indexation is controlled by
the parameter χw ∈ [0, 1]. This implies that if the household cannot change her wage for τ
periods her normalized wage after τ periods isτYs=1
Πχwt+s−1Πt+s
wjt.
Therefore, the relevant part of the lagrangian for the household is then:
maxwjt
Et∞Xτ=0
(βθw)τ
(−dtϕtψ
l1+γjt+τ
1 + γ+ λjt+τ
τYs=1
Πχwt+s−1Πt+s
wjtljt+τ
)
subject to
ljt+τ =
ÃτYs=1
Πχwt+s−1Πt+s
wjtwt+τ
!−ηldt+τ ∀j
or, substituting the demand function (2), we get:
maxwjt
Et∞Xτ=0
(βθw)τ
⎧⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎩λjt+τ
τYs=1
Πχwt+s−1Πt+s
wjt
ÃτYs=1
Πχwt+s−1Πt+s
wjtwt+τ
!−ηldt+τ
−dt+τϕt+τψ
⎛⎝ τYs=1
Πχwt+s−1Πt+s
wjtwt+τ
⎞⎠−η(1+γ)1+γ
¡ldt+τ
¢1+γ
⎫⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎭
6
which simplifies to
maxwjt
Et∞Xτ=0
(βθw)τ
⎧⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎩λjt+τ
ÃτYs=1
Πχwt+s−1Πt+s
wjtwt+τ
!1−ηwt+τ l
dt+τ
−dt+τϕt+τψ
⎛⎝ τYs=1
Πχwt+s−1Πt+s
wjtwt+τ
⎞⎠−η(1+γ)1+γ
¡ldt+τ
¢1+γ
⎫⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎭All households set the same wage because complete markets allow them to hedge the risk
of the timing of wage change. Hence, we can drop the jth from the choice of wages and λjt.
The first order condition of this problem is:
Et∞Xτ=0
(βθw)τ
⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩(1− η)λt+τ
ÃτYs=1
Πχwt+s−1Πt+s
!1−η ³w∗twt+τ
´−ηldt+τ
+ ηw∗tdt+τϕt+τψ
ÃτYs=1
Πχwt+s−1Πt+s
w∗twt+τ
!−η(1+γ) ¡ldt+τ
¢1+γ⎫⎪⎪⎪⎪⎬⎪⎪⎪⎪⎭ = 0
or
η − 1ηw∗tEt
∞Xτ=0
(βθw)τ λt+τ
ÃτYs=1
Πχwt+s−1Πt+s
!1−η µw∗twt+τ
¶−ηldt+τ =
Et∞Xτ=0
(βθw)τ
⎛⎝dt+τϕt+τψÃ
τYs=1
Πχwt+s−1Πt+s
w∗twt+τ
!−η(1+γ) ¡ldt+τ
¢1+γ⎞⎠Now, if we define:
f1t =η − 1ηw∗tEt
∞Xτ=0
(βθw)τ λt+τ
ÃτYs=1
Πχwt+s−1Πt+s
!1−η µwt+τw∗t
¶η
ldt+τ
and
f2t = Et∞Xτ=0
(βθw)τ dt+τϕt+τψ
ÃτYs=1
Πχwt+s
Πt+s−1
!−η(1+γ)µwt+τw∗t
¶η(1+γ) ¡ldt+τ
¢1+γwe have that the equality f1t = f2t is just the previous first order condition. Note that for
those sums to be well defined (and, more generally for the maximization problem to have a
solution), we need to assume that (βθw)τ λt+τ goes to zero faster than
ÃτYs=1
Πχwt+s/Πt+s−1
!1−ηgoes to infinity in expectation.
7
One can express f1t and f2t recursively as:
f1t =η − 1η
(w∗t )1−η λtw
ηt ldt + βθwEt
µΠ
χwt
Πt+1
¶1−η µw∗t+1w∗t
¶η−1f1t+1
and:
f2t = ψdtϕt
µwtw∗t
¶η(1+γ) ¡ldt¢1+γ
+ βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µw∗t+1w∗t
¶η(1+γ)
f2t+1.
Now, since f1t = f2t , we can define ft = f
1t = f
2t , such that:
ft =η − 1η
(w∗t )1−η λtw
ηt ldt + βθwEt
µΠ
χwt
Πt+1
¶1−η µw∗t+1w∗t
¶η−1ft+1
and:
ft = ψdtϕt
µwtw∗t
¶η(1+γ) ¡ldt¢1+γ
+ βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µw∗t+1w∗t
¶η(1+γ)
ft+1.
Since we assume complete markets and separable utility in labor (see Erceg et. al., 2000),
we consider a symmetric equilibrium where cjt = ct, ujt = ut, kjt−1 = kt, xjt = xt, λjt = λt,
qjt = qt, and w∗jt = w∗t . Therefore, the first order conditions associated to the consumer’s
problems are:
dt (ct − hct−1)−1 − hβEtdt+1 (ct − hct)−1 = λt
λt = βEtλt+1RtΠt+1
rt = μ−1t a0 [ut]
qt = βEt½λt+1λt
£(1− δ) qt+1 +
¡rt+1ut+1 − μ−1t+1a [ut+1]
¢¤¾1 = qtμt
µ1− S
∙xtxt−1
¸− S0
∙xtxt−1
¸xtxt−1
¶+ βEtqtμt+1
λt+1λtS0∙xt+1xt
¸µxt+1xt
¶2.
the budget constraint:
cjt + xjt +mjt
pt+bjt+1pt
+
Zqjt+1,tajt+1dωj,t+1,t
= wjtljt +¡rtujt − μ−1t a [ujt]
¢kjt−1 +
mjt−1
pt+Rt−1
bjtpt+ ajt + Tt +zt
and the laws of motion for ft:
ft =η − 1η
(w∗t )1−η λtw
ηt ldt + βθwEt
µΠ
χwt
Πt+1
¶1−η µw∗t+1w∗t
¶η−1ft+1
8
and:
ft = ψdtϕt
µwtw∗t
¶η(1+γ) ¡ldt¢1+γ
+ βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µw∗t+1w∗t
¶η(1+γ)
ft+1.
We need both laws of motion to be able, later, to solve for all the relevant endogenous
variables.
Note that using the zero profits condition for the labor supplier, wtldt =R 10wjtljtdj and
the net zero supply of all securities, we have that the aggregate budget constraint can be
written as:
ct + xt +
R 10mjtdj
pt+
R 10bjt+1dj
pt=
wtldt +
¡rtut − μ−1t a [ut]
¢kt−1 +
R 10mjt−1dj
pt+Rt−1
R 10bjtdj
pt+ Tt +zt
Thus, in a symmetric equilibrium, in every period, a fraction 1− θw of households set w∗tas their wage, while the remaining fraction θw partially index their price by past inflation.
Consequently, the real wage index evolves:
w1−ηt = θw
µΠ
χwt−1Πt
¶1−ηw1−ηt−1 + (1− θw)w
∗1−ηt .
i.e., as a geometric average of past real wage and the new optimal wage. This structure is a
direct consequence of the memoryless characteristic of Calvo pricing.
1.2. The Final Good Producer
There is one final good is produced using intermediate goods with the following production
function:
ydt =
µZ 1
0
yε−1ε
it di
¶ εε−1
. (3)
where ε is the elasticity of substitution.
Final good producers are perfectly competitive and maximize profits subject to the pro-
duction function (3), taking as given all intermediate goods prices pti and the final good price
pt. As a consequence their maximization problem is:
maxyitpty
dt −
Z 1
0
pityitdi
Following the same steps than for the wages, we find the input demand functions associ-
9
ated with this problem are:
yit =
µpitpt
¶−εydt ∀i,
where ydt is the aggregate demand and the zero profit condition ptydt =
R 10pityitdi to deliver:
pt =
µZ 1
0
p1−εit di
¶ 11−ε
.
1.3. Intermediate Good Producers
There is a continuum of intermediate goods producers. Each intermediate good producer i
has access to a technology represented by a production function
yit = Atkαit−1
¡ldit¢1−α − φzt
where kit−1 is the capital rented by the firm, ldit is the amount of the “packed” labor input
rented by the firm, and where At follows the following process:
At = At−1 exp (ΛA + zA,t) where zA,t = σAεA,t and εA,t ∼ N (0, 1)
The parameter φ, which corresponds to the fixed cost of production, and zt = A1
1−αt μ
α1−αt
guarantee that economic profits are roughly equal to zero in the steady state. We rule out
the entry and exit of intermediate good producers.
Since zt = A1
1−αt μ
α1−αt , we have that
zt = zt−1 exp (Λz + zz,t) where zz,t =zA,t + αzμ,t1− α
and Λz =ΛA + αΛμ
1− α.
Intermediate goods producers solve a two-stages problem. In the first stage, taken the
input prices wt and rt as given, firms rent ldit and kit−1 in perfectly competitive factor markets
in order to minimize real cost:
minldit,kit−1
wtldit + rtkit−1
subject to their supply curve:
yit =
(Atk
αit−1
¡ldit¢1−α − φzt if Atkαit−1
¡ldit¢1−α ≥ φzt
0 otherwise
10
Assuming an interior solution, the first order conditions for this problem are:
wt = % (1− α)Atkαit−1
¡ldit¢−α
rt = %αAtkα−1it−1
¡ldit¢1−α
where % is the Lagrangian multiplier or:
kit−1 =α
1− α
wtrtldit
The real cost is then:
wtldit +
α
1− αwtl
dit
or: µ1
1− α
¶wtl
dit
Given that the firm has constant returns to scale, we can find the real marginal cost mctby setting the level of labor and capital equal to the requirements of producing one unit of
good Atkαit−1¡ldit¢1−α
= 1 or:
Atkαit−1
¡ldit¢1−α
= At
µα
1− α
wtrtldit
¶α ¡ldit¢1−α
= At
µα
1− α
wtrt
¶α
ldit = 1
that implies that:
ldit =
³α1−α
wtrt
´−αAt
Then:
mct =
µ1
1− α
¶wt
³α1−α
wtrt
´−αAt
that simplifies to:
mct =
µ1
1− α
¶1−αµ1
α
¶αw1−αt rαtAt
Note that the marginal cost does not depend on i: all firms receive the same technology
shocks and all firms rent inputs at the same price.
In the second stage, intermediate good producers choose the price that maximizes dis-
counted real profits. To do so, they consider that are under the same pricing scheme than
households. In each period, a fraction 1 − θp of firms can change their prices. All other
firms can only index their prices by past inflation. Indexation is controlled by the parameter
χ ∈ [0, 1], where χ = 0 is no indexation and χ = 1 is total indexation.
11
The problem of the firms is then:
maxpitEt
∞Xτ=0
(βθp)τ λt+τ
λt
(ÃτYs=1
Πχt+s−1
pitpt+τ
−mct+τ
!yit+τ
)
subject to
yit+τ =
ÃτYs=1
Πχt+s−1
pitpt+τ
!−εydt+τ ,
where the marginal value of a dollar to the household, is treated as exogenous by the firm.
Since we have complete markets in securities and utility separable in consumption, this mar-
ginal value is constant across households and, consequently, λt+τ/λt is the correct valuation
on future profits.
Substituting the demand curve in the objective function and the previous expression, we
get:
maxpitEt
∞Xτ=0
(βθp)τ λt+τ
λt
⎧⎨⎩⎛⎝Ã τY
s=1
Πχt+s−1
pitpt+τ
!1−ε−Ã
τYs=1
Πχt+s−1
pitpt+τ
!−εmct+τ
⎞⎠ ydt+τ⎫⎬⎭
or
maxpitEt
∞Xτ=0
(βθp)τ λt+τ
λt
⎧⎨⎩⎛⎝Ã τY
s=1
Πχt+s−1Πt+s
pitpt
!1−ε−Ã
τYs=1
Πχt+s−1Πt+s
pitpt
!−εmct+τ
⎞⎠ ydt+τ⎫⎬⎭
whose solution p∗it implies the first order condition:
Et∞Xτ=0
(βθp)τ λt+τ
λt
⎧⎨⎩⎛⎝(1− ε)
ÃτYs=1
Πχt+s−1Πt+s
p∗itpt
!1−εp∗−1it + ε
ÃτYs=1
Πχt+s−1Πt+s
p∗itpt
!−εp∗−1it mct+τ
⎞⎠ ydt+τ⎫⎬⎭ = 0
or
Et∞Xτ=0
(βθp)τ λt+τ
⎧⎨⎩⎛⎝(1− ε)
ÃτYs=1
Πχt+s−1Πt+s
!1−εp∗itpt+ ε
ÃτYs=1
Πχt+s−1Πt+s
!−εmct+τ
⎞⎠ ydt+τ⎫⎬⎭ = 0
where, in the second step, we have dropped irrelevant constants and we have used the fact
that we are in a symmetric equilibrium. Note how this expression nests the usual result in
the fully flexible prices case θp = 0:
p∗it =ε
ε− 1ptmct+τ
12
i.e., the price is equal to a mark-up over the nominal marginal cost.
Since we only consider a symmetric equilibrium, we can write that p∗it = p∗t and:
Et∞Xτ=0
(βθp)τ λt+τ
⎧⎨⎩⎛⎝(1− ε)
ÃτYs=1
Πχt+s−1Πt+s
!1−εp∗tpt+ ε
ÃτYs=1
Πχt+s−1Πt+s
!−εmct+τ
⎞⎠ ydt+τ⎫⎬⎭ = 0
To express the previous first order condition recursively, we define:
g1t = Et∞Xτ=0
(βθp)τ λt+τ
ÃτYs=1
Πχt+s−1Πt+s
!−εmct+τy
dt+τ
and
g2t = Et∞Xτ=0
(βθp)τ λt+τ
ÃτYs=1
Πχt+s−1Πt+s
!1−εp∗tptydt+τ
and then the first order condition is εg1t = (ε− 1)g2t .As it was the case for f ’s that we found in the household problem, we need (βθp)
τ λt+τ
to go to zero sufficiently fast in relation with the rate of inflation for g1t and g2t to be well
defined and stationary.
Then, we can write the g’s recursively:
g1t = λtmctydt + βθpEt
µΠχt
Πt+1
¶−εg1t+1
and
g2t = λtΠ∗tydt + βθpEt
µΠχt
Πt+1
¶1−εµΠ∗tΠ∗t+1
¶g2t+1
where:
Π∗t =p∗tpt.
Given Calvo’s pricing, the price index evolves:
p1−εt = θp¡Πχt−1¢1−ε
p1−εt−1 + (1− θp) p∗1−εt
or, dividing by p1−εt ,
1 = θp
µΠχt−1Πt
¶1−ε+ (1− θp)Π
∗1−εt
13
1.4. The Government Problem
The government sets the nominal interest rates according to the Taylor rule:
RtR=
µRt−1R
¶γR
⎛⎝µΠtΠ
¶γΠ
⎛⎝ ydtydt−1
Λyd
⎞⎠γy⎞⎠1−γR
exp (mt)
through open market operations that are financed through lump-sum transfers Tt. Those
transfers insure that the deficit are equal to zero:
Tt =
R 10mjtdj
pt−R 10mjt−1dj
pt+
R 10bjt+1dj
pt−Rt−1
R 10bjtdj
pt
The variables Π represents the target level of inflation (equal to inflation in the steady state),
R steady state nominal gross return of capital, and Λyd the steady state gross growth rate of
ydt . The term mt is a random shock to monetary policy that follows mt = σmεmt where εmt is
distributed according to N (0, 1). The presence of the previous period interest rate, Rt−1, isjustified because we want to match the smooth profile of the interest rate over time observed
in U.S. data. Note that R is beyond the control of the monetary authority, since it is equal
to the steady state real gross returns of capital plus the target level of inflation.
Applying the definition of transfers above, the aggregated budget constraint of households
is equal to:
ct + xt = wtldt +
¡rtut − μ−1t a [ut]
¢kt−1 +zt.
1.5. Aggregation
First, we derive an expression for aggregate demand:
ydt = ct + xt + μ−1t a [ut] kt−1
With this value, the demand for each intermediate good producer is
yit =¡ct + xt + μ−1t a [ut] kt−1
¢µpitpt
¶−ε∀i,
and using the production function is:
Atkαit−1
¡ldit¢1−α − φzt =
¡ct + xt + μ−1t a [ut] kt−1
¢µpitpt
¶−ε
14
Since all the firms have the same optimal capital-labor ratio:
kit−1ldit
=α
1− α
wtrt
and by market clearing Z 1
0
lditdi = ldt
and Z 1
0
kit−1di = utkt−1.
it must be the case that:kit−1ldit
=utkt−1ldt
.
Then:
Atkαit−1
¡ldit¢1−α
= At
µkit−1ldit
¶α ¡ldit¢= At
µutkt−1ldt
¶α
ldit
Integrating outZ 1
0
At
µutkt−1ldt
¶α
lditdi = At
µutkt−1ldt
¶α Z 1
0
lditdi = At (utkt−1)α ¡ldt ¢1−α
and we have
At (utkt−1)α ¡ldt ¢1−α − φzt =
¡ct + xt + μ−1t a [ut] kt−1
¢ Z 1
0
µpitpt
¶−εdi
Define vpt =R 10
³pitpt
´−εdi. By the properties of the index under Calvo’s pricing
vpt = θp
µΠχt−1Πt
¶−εvpt−1 + (1− θp)Π
∗−εt .
we get:
ct + xt + μ−1t a [ut] kt−1 =At (utkt−1)
α ¡ldt ¢1−α − φzt
vpt
Now, we derive an expression for aggregate labor demand. We know that
ljt =
µwjtwt
¶−ηldt
15
If we integrate over all households j, we getZ 1
0
ljtdj = lt =
Z 1
0
µwjtwt
¶−ηdjldt
where lt is the aggregate labor supply of households.
Define
vwt =
Z 1
0
µwjtwt
¶−ηdj.
Hence
ldt =1
vwtlt.
Also, as before:
vwt = θw
µwt−1wt
Πχwt−1Πt
¶−ηvwt−1 + (1− θw) (Π
w∗t )
−η .
2. Equilibrium
A definition of equilibrium in this economy is standard and the symmetric equilibrium policy
functions are determined by the following equations:
• The first order conditions of the household
dt (ct − hct−1)−1 − hβEtdt+1 (ct+1 − hct)−1 = λt
λt = βEtλt+1RtΠt+1
rt = μ−1t a0 [ut]
qt = βEt½λt+1λt
¡(1− δ) qt+1 + rt+1ut+1 − μ−1t+1a [ut+1]
¢¾1 = qtμt
µ1− S
∙xtxt−1
¸− S0
∙xtxt−1
¸xtxt−1
¶+ βEtqt+1μt+1
λt+1λtS0∙xt+1xt
¸µxt+1xt
¶2ft =
η − 1η
(w∗t )1−η λtw
ηt ldt + βθwEt
µΠ
χwt
Πt+1
¶1−η µw∗t+1w∗t
¶η−1ft+1
ft = ψdtϕt (Π∗wt )
−η(1+γ) ¡ldt ¢1+γ + βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µw∗t+1w∗t
¶η(1+γ)
ft+1
16
• The firms that can change prices set them to satisfy:
g1t = λtmctydt + βθpEt
µΠχt
Πt+1
¶−εg1t+1
g2t = λtΠ∗tydt + βθpEt
µΠχt
Πt+1
¶1−εµΠ∗tΠ∗t+1
¶g2t+1
εg1t = (ε− 1)g2t
where they rent inputs to satisfy their static minimization problem:
utkt−1ldt
=α
1− α
wtrt
mct =
µ1
1− α
¶1−αµ1
α
¶αw1−αt rαtAt
• The wages evolve as:
1 = θw
µΠ
χwt−1Πt
¶1−η µwt−1wt
¶1−η+ (1− θw) (Π
∗wt )
1−η
and the price level evolves:
1 = θp
µΠχt−1Πt
¶1−ε+ (1− θp)Π
∗1−εt
• Government follow its Taylor rule
RtR=
µRt−1R
¶γR
⎛⎝µΠtΠ
¶γΠ
⎛⎝ ydtydt−1
Λyd
⎞⎠γy⎞⎠1−γR
exp (mt)
• Markets clear:
ydt =At (utkt−1)
α ¡ldt ¢1−α − φzt
vptydt = ct + xt + μ−1t a [ut] kt−1
17
where
lt = vwt ldt
vpt = θp
µΠχt−1Πt
¶−εvpt−1 + (1− θp)Π
∗−εt
vwt = θw
µwt−1wt
Πχwt−1Πt
¶−ηvwt−1 + (1− θw) (Π
∗wt )
−η
and
kt − (1− δ) kt−1 − μt
µ1− S
∙xtxt−1
¸¶xt = 0.
3. Stationary Equilibrium
Since we have growth in this model induced by technological change, most of the variables
are growing in average. To solve the model, we need to make variables stationary.
3.1. Manipulating Equilibrium Conditions
First, we work on the first order conditions of the household
dt
µctzt− hct−1
zt−1
zt−1zt
¶−1− hβEtdt+1
µct+1zt+1
zt+1zt− hct
zt
¶−1= λtzt
λtzt = βEtλt+1zt+1ztzt+1
RtΠt+1
μtrt = a0 [ut]
qtμt = βEt½λt+1zt+1λtzt
ztzt+1
μtμt+1
£(1− δ) qt+1μt+1 + μt+1rt+1ut+1 − a (ut+1)
¤¾1 = qtμt
Ã1− S
"xtztxt−1zt−1
ztzt−1
#− S0
"xtztxt−1zt−1
ztzt−1
#xtztxt−1zt−1
ztzt−1
!
+βEtqt+1μt+1λt+1λtS0
"xt+1zt+1xtzt
zt+1zt
#Ãxt+1zt+1xtzt
zt+1zt
!2
ft =η − 1η
µw∗tzt
¶1−ηλtzt
µwtzt
¶η
ldt + βθwEtµΠ
χwt
Πt+1
¶1−η⎛⎝ w∗t+1zt+1
zt+1w∗tztzt
⎞⎠η−1
ft+1
ft = ψdtϕt (Π∗wt )
−η(1+γ) ¡ldt ¢1+γ + βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)⎛⎝ w∗t+1zt+1
zt+1w∗tztzt
⎞⎠η(1+γ)
ft+1
18
The firms that can change prices set them to satisfy:
g1t = λtztmctydtzt+ βθpEt
µΠχt
Πt+1
¶−εg1t+1
g2t = λtztΠ∗t
ydtzt+ βθpEt
µΠχt
Πt+1
¶1−εµΠ∗tΠ∗t+1
¶g2t+1
εg1t = (ε− 1)g2t
where they rent inputs to satisfy their static minimization problem:
utldt
kt−1zt−1μt−1
=α
1− α
wtzt
1
rtμt
ztzt−1
μtμt−1
mct =
µ1
1− α
¶1−αµ1
α
¶α
³wtzt
´1−α(rtμt)
α z1−αt
μαt
At
The wages evolve as:
1 = θw
µΠ
χwt−1Πt
¶1−ηà wt−1zt−1wtzt
zt−1zt
!1−η+ (1− θw) (Π
∗wt )
1−η
and the price level evolves:
1 = θp
µΠχt−1Πt
¶1−ε+ (1− θp)Π
∗1−εt
Government follow its Taylor rule
RtR=
µRt−1R
¶γR
⎛⎜⎜⎜⎜⎝µΠtΠ
¶γΠ
⎛⎜⎜⎜⎜⎝ydtzt
ydt−1zt−1
ztzt−1
Λyd
⎞⎟⎟⎟⎟⎠γy⎞⎟⎟⎟⎟⎠
1−γR
exp (mt)
Markets clear:
ydtzt=
μαt−1z
αt−1
Atzt
³ut
kt−1zt−1μt−1
´α ¡ldt¢1−α − φ
vpt
but since μαt−1z
αt−1 =
zt−1At−1
, we have
ydtzt=
zt−1At−1
Atzt
³ut
kt−1zt−1μt−1
´α ¡ldt¢1−α − φ
vpt
19
ydtzt=ctzt+xtzt+zt−1zt
μt−1μta [ut]
kt−1zt−1μt−1
where
lt = vwt ldt
vpt = θp
µΠχt−1Πt
¶−εvpt−1 + (1− θp)Π
∗−εt
vwt = θw
Ãwt−1zt−1
zt−1wtztzt
Πχwt−1Πt
!−ηvwt−1 + (1− θw) (Π
∗wt )
−η
andktztμt
ztμtzt−1μt−1
− (1− δ)kt−1
zt−1μt−1− μt
μt−1
ztzt−1
Ã1− S
"xtztzt
xt−1zt−1
zt−1
#!xtzt= 0.
3.2. Change of Variables
We now redefine that variables to obtain a system on stationary variables that we can easily
manipulate. Hence, we define ect = ctzt, eλt = λtzt, ert = rtμt, eqt = qtμt, ext = xt
zt, ewt = wt
zt,ew∗t = w∗t
zt, ekt = kt
ztμt, and eydt = ydt
zt.
Then, the set of equilibrium conditions are:
• The first order conditions of the household:
dt
µect − hect−1 zt−1zt
¶−1− hβEtdt+1
µect+1 zt+1zt− hect¶−1 = eλt
eλt = βEteλt+1 ztzt+1
RtΠt+1
ert = a0 [ut]eqt = βEt
(eλt+1eλt ztzt+1
μtμt+1
((1− δ) eqt+1 + ert+1ut+1 − a (ut+1)))
1 = eqtµ1− S ∙ extext−1 ztzt−1¸− S0
∙ extext−1 ztzt−1¸ extext−1 ztzt−1
¶+βEteqt+1eλt+1eλt zt
zt+1S0∙ext+1ext zt+1zt
¸µext+1ext zt+1zt¶2
ft =η − 1η
(ew∗t )1−η eλt ( ewt)η ldt + βθwEtµΠ
χwt
Πt+1
¶1−η µ ew∗t+1ew∗t zt+1zt¶η−1
ft+1
ft = ψdtϕt (Π∗wt )
−η(1+γ) ¡ldt ¢1+γ + βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µ ew∗t+1ew∗t zt+1zt¶η(1+γ)
ft+1
20
• The firms that can change prices set them to satisfy:
g1t =eλtmcteydt + βθpEt
µΠχt
Πt+1
¶−εg1t+1
g2t =eλtΠ∗t eydt + βθpEt
µΠχt
Πt+1
¶1−εµΠ∗tΠ∗t+1
¶g2t+1
εg1t = (ε− 1)g2t
where they rent inputs to satisfy their static minimization problem:
utekt−1ldt
=α
1− α
ewtert ztzt−1
μtμt−1
mct =
µ1
1− α
¶1−αµ1
α
¶α
(ewt)1−α erαt• The wages evolve as:
1 = θw
µΠ
χwt−1Πt
¶1−η µ ewt−1ewt zt−1zt¶1−η
+ (1− θw) (Π∗wt )
1−η
and the price level evolves:
1 = θp
µΠχt−1Πt
¶1−ε+ (1− θp)Π
∗1−εt
• Government follow its Taylor rule:
RtR=
µRt−1R
¶γR
⎛⎝µΠtΠ
¶γΠ
⎛⎝ eydteydt−1 ztzt−1
Λyd
⎞⎠γy⎞⎠1−γR
exp (mt)
• Markets clear:
eydt = ect + ext + zt−1zt
μt−1μta [ut]ekt−1
eydt =
AtAt−1
zt−1zt
³utekt−1´α ¡ldt ¢1−α − φ
vpt
21
where
lt = vwt ldt
vpt = θp
µΠχt−1Πt
¶−εvpt−1 + (1− θp)Π
∗−εt
vwt = θw
µ ewt−1ewt zt−1zt Πχwt−1Πt
¶−ηvwt−1 + (1− θw) (Π
∗wt )
−η
and ekt ztzt−1
μtμt−1
− (1− δ)ekt−1 − ztzt−1
μtμt−1
µ1− S
∙ extext−1 ztzt−1¸¶ ext = 0.
4. Solving the Model
We will solve the model by loglinearizing the equilibrium conditions and applying standard
techniques. Before loglinearizing, we need to find the steady-state of the model. We will solve
the normalized model defined in the last section. Note that later, when we bring the model
to the data, we will need to undo the normalization.
4.1. The Steady-State
Now, we will find the deterministic steady-state of the model. First, let ez = exp (Λz),eμ = exp (Λμ), and eA = exp (ΛA). Also, given the definition of ec, ext, ewt, ew∗t , and eydt , we havethat Λc = Λx = Λw = Λw∗ = Λyd = Λz.
Then, in steady-state, the first order conditions of the household can be written as:
d1ec− hezec − hβd 1ecez − hec = eλ
1 = β1ez RΠer = a0 [1]
eq = β1ezeμ ((1− δ) eq + eru− a [1])
1 = eq (1− S [ez]− S0 [ez] ez) + βeqezS0 [ez] ez2
f =η − 1η
(ew∗)1−η eλewηld + βθw
µΠχw
Π
¶1−η ezη−1ff = ψdϕ
¡Πw
∗¢−η(1+γ) ¡ld¢1+γ
+ βθw
µΠχw
Π
¶−η(1+γ) ezη(1+γ)f
22
the first order conditions of the firm as:
g1 = eλmceyd + βθp
µΠχ
Π
¶−εg1
g2 = eλΠ∗eyd + βθp
µΠχ
Π
¶1−εg2
εg1 = (ε− 1)g2
uekld=
α
1− α
ewer ezeμmc =
µ1
1− α
¶1−αµ1
α
¶α ew1−αerαthe law of motion for wages and prices as:
1 = θw
µΠχw
Π
¶1−η ez−(1−η) + (1− θw)¡Πw
∗¢1−η1 = θp
µΠχ
Π
¶1−ε+ (1− θp)Π
∗1−ε
and the market clearing conditions as:
ec+ ex = eydvpeyd = A
z(uek)α(ld)1−α − φ
l = vwld
vp = θp
µΠχ
Π
¶−εvp + (1− θp)Π
∗−ε
vw = θw
µΠχw
Π
¶−η ezηvw + (1− θw) (Πw∗)−η
ekezeμ− (1− δ)ek − ezeμ (1− S [z]) ex = 0.To find the steady-state, we need to choose functional forms for a [·] and S [·]. For a [u] we
pick: a [u] = γ1 (u− 1)+ γ22(u−1)2. Since in the steady state we have u = 1, then er = a0 [1] =
γ1 and a [1] = 0. The investment adjustment cost function is Shxtxt−1
i= κ
2( xtxt−1−Λx)
2. Then,
along the balanced growth path, S [Λx] = S0 [Λx] = 0. Using this two expressions, we can
23
rearrange the system of equations that determine the steady-state as:
(1− hβez) 1
1− hez1ec = eλ
R =Πezβer = γ1
er = µ1− βezeμ(1− δ)
¶/βezeμ¡
1− βθwez(η−1)Π−(1−χw)(1−η)¢ f = η − 1ηw∗eλ(Πw∗)−ηld¡
1− βθwezη(1+γ)Πη(1−χw)(1+γ)¢f = ψ
¡Πw
∗¢−η(1+γ) ¡ld¢1+γ¡
1− βθpΠ(1−χ)ε¢ g1 = eλmceyd¡
1− βθpΠ−(1−χ)(1−ε)¢ g2 = eλΠ∗eyd
εg1 = (ε− 1)g2ekld=
α
1− α
ewer ezeμmc =
µ1
1− α
¶1−αµ1
α
¶α ew1−αerα1− θwΠ
−(1−χw)(1−η)ez−(1−η)1− θw
=¡Πw
∗¢1−η1− θpΠ
−(1−χ)(1−ε)
1− θp= Π∗1−ε
ec+ ex = eydvpeyd = eAez (ek)α(ld)1−α − φ
l = vwld
1− θpΠ(1−χ)ε
1− θpvp = Π∗−ε¡
1− θwezηΠ(1−χw)η¢1− θw
vw = (Πw∗)−η
ek = ezeμezeμ− (1− δ)ex.
First, notice that there is some restrictions on γ1
r =1− βezeμ(1− δ)
βezeμ = γ1
24
and that the nominal interest rate is:
R =Πezβ
The relationship between inflation and optimal relative prices is:
Π∗ =
µ1− θpΠ
−(1−ε)(1−χ)
1− θp
¶ 11−ε
expression from which we obtain the following two results:
1. If there is zero price inflation (Π = 1), then Π∗ = 1.
2. If there is full price indexation (χ = 1), then Π∗ = 1.
From the optimal price setting equations, we get that the marginal cost is:
mc =ε− 1ε
1− βθpΠ(1−χ)ε
1− βθpΠ−(1−χ)(1−ε)Π∗
The relationship between inflation and optimal relative wage is:
Πw∗=
µ1− θwΠ
−(1−χw)(1−η)ez−(1−η)1− θw
¶ 11−η
.
Then we find that: ew = (1− α)³mc³αer ´α´ 1
1−α
and the optimal wage evolves: ew∗ = ewΠw∗Again, we can note the following:
1. If there is zero price inflation (Π = 1) and zero growth rate (ez = 1), then Πw∗= 1.
2. If there is full wage indexation (χw = 1) and zero growth rate (ez = 1), then Πw∗= 1.
We have the two following equations for the wage household decision:
¡1− βθwezη−1Π−(1−χw)(1−η)¢ f = η − 1
ηw∗¡Πw
∗¢−η eλldand ¡
1− βθwezη(1+γ)Πη(1−χw)(1+γ)¢f = ψ
¡Πw
∗¢−η(1+γ) ¡ld¢1+γ
.
25
Dividing the second by the first delivers:
1− βθwezη(1+γ)Πη(1−χw)(1+γ)
1− βθwez(η−1)Π−(1−χw)(1−η) = ψ¡Πw
∗¢−ηγ ¡ld¢γ
η−1ηw∗λ
which defines ld as a function of eλ. Now, we will look for another relationship between ld andeλ to have two equations with two unknowns.Before doing so, we highlight that, again, there are two interesting cases:
1. If there is zero price inflation (Π = 1) and zero growth rate (ez = 1), then we get thestatic condition that real wages are a markup η
η−1 over the marginal rate of substitution
between consumption and leisure.
2. If there is full wage indexation (χw = 1) and zero growth rate (ez = 1), then we get thestatic condition that real wages are a markup η
η−1 over the marginal rate of substitution
between consumption and leisure.
The expression for the dispersion of prices is given by:
vp =1− θp
1− θpΠ(1−χ)εΠ∗−ε
where no price inflation or full price indexation delivers no price dispersion in steady-state.
Using the expression for Πw∗ we find that the wage dispersion in steady-state is:
vw =1− θw
1− θwΠ(1−χw)ηezη (Πw∗)−ηwhere no price inflation or full wage indexation combine with zero growth delivers no wage
dispersion in in steady-state.
The relationship between labor demand and labor supply is:
l = vwld.
Note now that eyd = eAez (ek)α(ld)1−α − φ
vp.
But, since in steady-state ek = ezeμezeμ−(1−δ)ex, it is the case that:ec+ ezeμ− (1− δ)ezeμ ek = eyd = eAez (ek)α(ld)1−α − φ
vp
26
that allows us to find ek as function of ld:ekld= Ω =
α
1− α
ewer ezeμ⇒ ek = Ωld.
Then:
ec =
eAezΩαld − φ
vp− ezeμ− (1− δ)ezeμ Ωld
=
à eAez (vp)−1Ωα − ezeμ− (1− δ)ezeμ Ω
!ld − (vp)−1 φ
Now, we can express the marginal utility of consumption in terms of hours, and get another
relationship between ld as a function of eλ:(1− hβ)dezµ1− hez
¶−1ÃÃ eAez (vp)−1Ωα − ezeμ− (1− δ)ezeμ Ω
!ld − (vp)−1 φ
!−1= eλ
Using both relationship we can solve for ld and get:
1− βθwezη(1+γ)Πη(1−χw)(1+γ)
1− βθwez(η−1)Π−(1−χw)(1−η) =ψ¡Πw
∗¢−ηγ ¡ld¢γ
η−1ηw∗(1− hβ)dez ¡1− hez ¢−1 ³³ eAez (vp)−1Ωα − ezeμ−(1−δ)ezeμ Ω
´ld − (vp)−1 φ
´−1 .Note that this is nonlinear equation. Therefore we will use a root finder to find ld.
Once we have ld, we can solve for capital, investment, output, and consumption as follows:
ek = Ωldex =ezeμ− (1− δ)ezeμ ek
eyd =
eAez (ek)α(ld)1−α − φ
vp
ec =
à eAez (vp)−1Ωα − ezeμ− (1− δ)ezeμ Ω
!ld − (vp)−1 φ
4.2. Loglinear approximations
For each variable vart, we definedvart = log vart− log var, where var is the steady-state valuefor the variable vart. Then, we can write vart = var expdvart.
27
We start by log linearizing the marginal utility of consumption:
dt
µect − hect−1 zt−1zt
¶−1− hβEtdt+1
µect+1 zt+1zt− hect¶−1 = eλt. (4)
It is helpful to define the auxiliary variable auxt = dt³ect − hect−1 zt−1zt ´−1. Then, we have that:
auxt − hβEtezt+1auxt+1 = eλtwhere ezt+1 = zt+1
zt.
Then, (4) can be written as:
aux expdauxt −hβzauxEt expdauxt+1+bezt+1 = eλebeλtwhich can be loglinearized as:
aux³dauxt − hβzEt(dauxt+1 + bezt+1)´ = eλbeλt. (5)
Using the following two steady state relationship that aux(1−hβez) = eλ and that Etbezt+1 = 0,we can write: dauxt − hβzEtdauxt+1 = (1− hβz) beλt.Next, we loglinearize the auxiliary variable:
auxedauxt = d expbdtµec expbect −hezec expbect−1−bezt
¶−1.
The loglinear approximation is:
auxdauxt = d
µec− hezec¶−1 bdt − dµec− hezec
¶−2 ecbect+d
µec− hezec¶−2
hecez ³bect−1 − bezt´ .Making use of the fact that aux = d
¡ec− hezec¢−1, we find:auxdauxt = auxÃbdt −µec− hezec
¶−1 ecbect +µec− hezec¶−1
hecez ³bect−1 − bezt´!,
28
that simplifies to:
auxdauxt = auxÃbdt −µ1− hez¶−1bect +µ1− hez
¶−1hez ³bect−1 − bezt´
!
dauxt = bdt −µ1− hez¶−1Ãbect − hbect−1ez +
hbeztez!. (6)
Putting the (5) and (6) together:
(1− hβz)beλt =bdt −µ1− hez
¶−1Ãbect − hbect−1ez +hbeztez!− hβzEt
(bdt+1 −µ1− hez¶−1Ãbect+1 − hbectez +
hbezt+1ez!)
.
After some algebra, we arrive to the final expression:
(1− hβz)beλt = bdt − hβzEt bdt+1 − 1 + h2β¡1− hez ¢bect + hez ¡1− hez ¢bect−1 + βhz¡
1− hez ¢Etbect+1 − hez ¡1− hez ¢beztThis expression helps to understand the role of the habit persistence parameter h. If we set
h = 0 (i.e., no habit), we would get:
beλt = bdt −bectwhere the lags and forward terms drop.
Now, we loglinearize the Euler equation:
eλt = βEteλt+1 ztzt+1
RtΠt+1
.
To do so, we write the expression as
eλebeλ = βEteλebeλt+1 1ezezz,t RebRt
ΠebΠt+1 By using the fact that
R =Πezβ
we simplify to:
ebeλ = Etebeλt+1 1
ezz,tebRt
ebΠt+1
29
Now, it is easy to show that:
beλt = Etbeλt+1 + bRt − bΠt+1. (9)
Let us now consider: ert = a0 [ut] .First, we write: erebert = a0 £u expbut¤ ,
where the loglinear approximation delivers:
erbert = a00 [u]ubut.Since er = a0 [u], then: bert = a00 [u]u
a0 [u]but,
or bert = γ2γ1ut. (10)
The next equation to consider relates the shadow price of capital to the return on invest-
ment: eqt = βEt
(eλt+1eλt 1ezt+1 1eμt+1 ((1− δ) eqt+1 + ert+1ut+1 − a [ut+1]))where eμt+1 = μt+1
μt. We can we write this expression as
eqebeqt = βezeμEt exp∆beλt+1−bezt+1−beμt+1(
(1− δ) eqebeqt+1+eru expbert+1+but+1 −a £u expbut+1¤).
Loglinearization delivers:
eqbeqt =βezeμEt
µ4beλt+1 − bezt+1 − beμt+1¶ ((1− δ) eq + eru− a [u])
+βezeμ ³Et (1− δ) eqbeqt+1 + eru³bert+1 + but+1´− a [u]ubut+1´ .
Making use of the following steady-state relationships: u = 1, a [u] = 0, er = a0 [u], eq = 1
30
and 1 = βezeμer + βezeμ(1− δ), and Et³−bezt+1 − beμt+1´ = 0, the previous expression simplifies to:
beqt = ((1− δ) + er) βezeμEt∆beλt+1 + β (1− δ)ezeμ Etbeqt+1 + βezeμeruEtbert+1,that implies: beqt = Et∆beλt+1 + β (1− δ)ezeμ Etbeqt+1 +µ1− β(1− δ)ezeμ
¶Etbert+1. (11)
The next equation to loglinearize is:
1 = eqtµ1− S ∙ extext−1 ztzt−1¸− S0
∙ extext−1 ztzt−1¸ extext−1 ztzt−1
¶+βEteqt+1eλt+1eλt zt
zt+1S0∙ext+1ext zt+1zt
¸µext+1ext zt+1zt¶2
which can be rearranged as:
1 = eq expbeqt ³1− S hez exp∆bext+bezti− S0 hez exp∆bext+bezti ez exp∆bext+bezt´++βqezEt expbeqt−bezt+1+4beλt+1 S 00
hez exp∆bext+1+bezt+1i ez2 exp2(∆bext+1+bezt+1) .Taking the loglinear approximation (and using the fact that eq = 1) we get:
0 = beqt − S00 [ez] ez2 ³∆bext + bezt´+ β
zS00[ez] ez3Et ³∆bext+1 + bezt+1´ .
Reorganizing:
κez2 ³∆bext + bezt´ = beqt + βκez2Et∆bext+1 (12)
where κ comes from the adjustment cost function.
We move now into loglinearizing the equations that describe the law of motion of ft
ft =η − 1η
( ew∗t )1−η eλt (ewt)η ldt + βθwEtµΠ
χwt
Πt+1
¶1−η µ ew∗t+1ew∗t zt+1zt¶η−1
ft+1
and
ft = ψdtϕt (Π∗wt )
−η(1+γ) ¡ldt ¢1+γ + βθwEtµΠ
χwt
Πt+1
¶−η(1+γ)µ ew∗t+1ew∗t zt+1zt¶η(1+γ)
ft+1.
31
The first equation can be written as:
f expbft =
η − 1η
(ew∗)1−η eλewηld exp(1−η)bew∗t+beλt+ηbewt+bldt +
βθwΠ−(1−η)(1−χw)ezη−1fEt exp bft−(1−η)(bΠt+1−χw bΠt+∆bew∗t+1+bezt+1) .
Since Etbezt+1 = 0, we can loglinearize the previous expression as:f bft =
η − 1η
(ew∗)1−η eλewηldµ(1− η) bew∗t + beλt + ηbewt + bldt¶+
βθwΠ−(1−η)(1−χw)ezη−1fEt ³ bft+1 − (1− η)
³(bΠt+1 − χwbΠt) +∆bew∗t+1´´ .
Since in the steady-state we have that
1− βθwezη−1Π−(1−η)(1−χw) = η−1η(w∗)1−η λwηld
f,
we can write that:
bft =¡1− βθwezη−1Π−(1−η)(1−χw)¢µ(1− η) bew∗t + beλt + ηbewt + bldt¶+βθwΠ
−(1−η)(1−χw)ezη−1Et ³ bft+1 − (1− η)³bΠt+1 − χwbΠt +∆bew∗t+1´´ (13)
Let us know consider the second equation describing the behavior of f . First we can write it
as:
f expbft = ψdϕ(ld)1+γ exp
bdt+bϕt+η(1+γ)(bewt−bew∗t )+(1+γ)bldt ++βθwezη(1+γ)Πη(1+γ)(1−χw)fEt exp
bft+1+η(1+γ)(bΠt+1−χw bΠt+∆bew∗t+1+bezt+1) .It can be shown that in steady-state:
1− βθwezη(1+γ)Πη(1+γ)(1−χw) =ψdϕ(ld)1+γ
f
and since Etbezt+1 = 0, that impliesbft =
¡1− βθwezη(1+γ)Πη(1+γ)(1−χw)
¢ ³bdt + bϕt + η (1 + γ)³bewt − bew∗t´+ (1 + γ)bldt´
+βθwezη(1+γ)Πη(1+γ)(1−χw)Et³ bft+1 + η (1 + γ)
³bΠt+1 − χwbΠt +∆bew∗t+1´´ . (14)
32
Let us loglinearize the law of motion for g1t and g2t . First consider
g1t =eλtmcteydt + βθpEt
µΠχt
Πt+1
¶−εg1t+1
that can be rewritten as:
g1 expbg1t = eλmceyd expbeλt+cmct+beydt +βθpg1Πε(1−χ)Et expε(bΠt+1−χbΠt)+bg1t+1 .
If we loglinearize that last expression, we get:
g1bg1t = eλmceydµbeλt + cmct + beydt¶+ βθpg1Πε(1−χ)Et
³ε(bΠt+1 − χbΠt) + bg1t+1´ .
It can shown that in steady state
1− βθpΠε(1−χ) =
eλmceydg1
therefore,
bg1t = ¡1− βθpΠε(1−χ)¢µbeλt + cmct + beydt¶+ βθpΠ
ε(1−χ)t Et
³ε(bΠt+1 − χbΠt) + bg1t+1´ . (15)
Let us now consider:
g2t =eλtΠ∗t eydt + βθpEt
µΠχt
Πt+1
¶1−εµΠ∗tΠ∗t+1
¶g2t+1,
that can rewritten as:
g2 expbg2t = eλΠ∗eyd expbeλt+bΠ∗t+beydt +βθpΠ−(1−ε)(1−χ)g2Et exp−(1−ε)(bΠt+1−χbΠt)−(bΠ∗t+1−bΠ∗t )+bg2t+1 .If we loglinearize that last expression, we get:
g2bg2t = eλΠ∗eydµbeλt + bΠ∗t + beydt¶+βθpΠ
−(1−ε)(1−χ)g2Et³−(1− ε)
³bΠt+1 − χbΠt´− ³bΠ∗t+1 − bΠ∗t´+ bg2t+1´ .It can be shown that:
1− βθpΠ−(1−ε)(1−χ) =
eλΠ∗eydg2
,
33
therefore:
bg2t =¡1− βθpΠ
−(1−ε)(1−χ)¢µbeλt + bΠ∗t + beydt¶+βθpΠ
−(1−ε)(1−χ)Et³−(1− ε)
³bΠt+1 − χbΠt´− ³bΠ∗t+1 − bΠ∗t´+ bg2t+1´ . (16)
Note that is easy to show that εg1t = (ε− 1)g2t loglinearizes to:
bg1t = bg2t . (17)
Now, let us loglinearize the relationship between the capital-labor ratio and the real wage-
real interest rateutekt−1ldt
=α
1− α
ewtert ztzt−1
μtμt−1
.
It is easy to show that but + bekt−1 − bldt = bewt − bert + bezt + beμt. (18)
Let us loglinearize the marginal cost
mct =
µ1
1− α
¶1−αµ1
α
¶α
(ewt)1−α erαtto get cmct = (1− α)bewt + αbert. (19)
Let us now concentrate on the aggregate wage law of motion:
1 = θw
µΠ
χwt−1Πt
¶1−η µwt−1wt
zt−1zt
¶1−η+ (1− θw)
¡Πw
∗t
¢1−ηthe above expression can be rewritten as:
1 = θwΠ−(1−χw)(1−η)ez−(1−η) exp−(1−η)(bΠt−χw bΠt−1+bΠwt +ezt)+(1− θw) (Π
w∗)1−η exp(1−η)bΠw∗t ,
and loglinearized to:
θwΠ−(1−χw)(1−η)ez−(1−η)(bΠt − χwbΠt−1 + bΠwt + ezt) = (1− θw) (Π
w∗)1−ηbΠw∗t ,
34
that we can write as:
θwΠ−(1−χw)(1−η)ez−(1−η)(1− θw) (Πw
∗)1−η(bΠt − χwbΠt−1 + bΠwt + ezt) = bew∗t − bewt. (20)
Now we concentrate on the aggregate price law of motion:
1 = θp
µΠχt−1Πt
¶1−ε+ (1− θp)Π
∗1−εt
that can be rewritten as:
1 = θpΠ−(1−ε)(1−χ) exp−(1−ε)(
bΠt−χbΠt−1)+(1− θp) (Π∗)(1−ε) exp(1−ε)
bΠ∗tthat loglinearizes to:
θpΠ−(1−ε)(1−χ)
(1− θp) (Π∗)(1−ε)(bΠt − χbΠt−1) = bΠ∗t . (21)
The Taylor rule loglinnearizes to:
bRt = γR bRt−1 + (1− γR)³γΠbΠt + γy(4beydt + bezt)´+ bmt. (22)
The market clearing conditions:
lt = vwt ldt ,
ect + ext + a [ut]ekt−1eμtezt = eydt ,and
vpt eydt = eAtezt³utekt−1´α ¡ldt ¢1−α − φ
can be written as:
l expblt = vwld expbvwt +bldt ,
ec expbect +ex expbext +aheu expbeuti ek expbekt−1ezeμ expbeμt+bezt = eyd expbeydt ,
and
vpeyd expbvpt+beydt = eAez ³uek´α ³eld´1−α expbeAt−bezt+αµbut+bekt−1¶+(1−α)eldt −φ
respectively, where eAt+1 = At+1At.
35
Loglinearizing we get: blt = bvwt + bldt , (23)
cbect + xbext + γ1ekezeμ but = ydbeydt , (24)
and
(ydvp)³bvpt + beydt´ = eAez ³uek´α ³eld´1−α
µbeAt − bezt + α
µbut + bekt−1¶+ (1− α)eldt¶ . (25)
Let us consider now
vpt = θp
µΠχt−1Πt
¶−εvpt−1 + (1− θp)Π
∗−εt
that can be written as
vp expbvpt = θpΠε(1−χ)vp expε(
bΠt−χbΠt−1)+bvpt−1 +(1− θp)Π∗−ε expε
bΠ∗t .Using ¡
1− θpΠε(1−χ)¢ vp = (1− θp)Π
∗−ε
we get: bvpt = θpΠε(1−χ)
³ε(bΠt − χbΠt−1) + bvpt−1´− ¡1− θpΠ
ε(1−χ)¢ εbΠ∗t . (26)
Let us know consider the law of motion of the wage dispersion:
vwt = θw
µΠ
χwt−1Πt
1ezt wt−1wt¶−η
vwt−1 + (1− θw) (Πw∗t )
−η .
that can be written
vwebvwt = θwΠη(1−χw)ezηvweη(bΠt−χw bΠt−1+bewt−bewt−1+bezt)+bvwt−1 + (1− θw) (Π
w∗)−η e−η(bew∗t−bewt).
Using ¡1− θwΠ
η(1−χw)ezη¢ vw = (1− θw) (Πw∗)−η
we get:
bvwt = θwΠη(1−χw)ezη ³η ³bΠt − χwbΠt−1 + bewt − bewt−1 + bezt´+ bvwt−1´−¡1− θwΠ
η(1−χw)ezη¢ η(bew∗t−bewt).(27)
Finally, let us loglinearize the law of motion of capital
36
ktezteμt = (1− δ) kt−1 + eμteztµ1− S ∙ xtxt−1ezt¸¶xt.
If we rearrange terms, we get:
kezeμ expbkt+bezt+beμt = (1− δ) k expbkt−1 +ezeμ expbezt+beμt ³1− S hzebezt+4bexti´ x expbext .
Loglinearizing:
kezeμ³bkt + bezt + beμt´ = (1− δ) kbkt−1 + ezeμx(bezt + beμt + bext).Note that, using k = ezeμezeμ−(1−δ) x, we can rearrange the previous expression to get:
bkt + bezt + beμt = (1− δ)ezeμ bkt−1 + ezeμ− (1− δ)ezeμ (bezt + beμt + bext)or bkt = (1− δ)ezeμ bkt−1 + ezeμ− (1− δ)ezeμ bext − 1− δezeμ ³bezt + beμt´ . (28)
4.3. System of Linear Stochastic Difference Equations
We now present the equations in the system as ordered in Uhlig algorithm model2fun.m
Equation 1 The first equation is
θwΠ−(1−χw)(1−η)z−(1−η)
(1− θw) (Πw∗)1−η
(bΠt − χwbΠt−1 + bΠwt + ezt) = bew∗t − bewtWe make use of the fact that bΠwt = bewt − bewt−1, and define the auxiliary parameter a1 =θwΠ−(1−χw)(1−η)z−(1−η)
(1−θw)(Πw∗)1−η . In the Uhlig code this expression appears as a1 = θwΠ−(1−χw)(1−η)z−(1−η)
(1−θw)exp[log(Πw∗ )]1−η ,
because when we solve for the steady state of Πw∗, we express it in log-levels.
Then, the equation boils down to:
a1bΠt − χwa1bΠt−1 + a1bewt − a1bewt−1 + a1ezt = bew∗t − bewtand rearranging:
a1bΠt − χwa1bΠt−1 + (1 + a1)bewt − a1bewt−1 + a1ezt − bew∗t = 0 (29)
37
Equation 2 The second equation is:
θpΠ−(1−ε)(1−χ)
(1− θp) (Π∗)(1−ε)(bΠt − χbΠt−1) = bΠ∗t
In order to make notation for compact, define a2 =θpΠ−(1−ε)(1−χ)
(1−θp)(Π∗)(1−ε) . Note that in the file this
expression appears as a2 =θpΠ−(1−ε)(1−χ)
(1−θp)exp[log(Π∗)](1−ε), because when we solve for the steady state
value Π∗, we express it in log-levels. Substituting for a2:
a2(bΠt − χbΠt−1) = bΠ∗tRearranging:
a2bΠt − a2χbΠt−1 − bΠ∗t = 0 (30)
Equation 3 The third equation is bert = φuut,
where φu = γ2/γ1. Then,
−bert + φuut = 0 (31)
Equation 4 The fourth equation is bg1t = bg2tRearranging: bg1t − bg2t = 0 (32)
Equation 5 The fifth equation is:
but + bekt−1 − bldt = bewt − bert + bezt + beμtRearranging: but + bert + bekt−1 − bldt − bewt − bezt − beμt (33)
Equation 6 The sixth equation is:
cmct = (1− α)bewt + αbertRearranging:
(1− α)bewt + αbert − cmct = 0 (34)
38
Equation 7 The seventh equation is:
bRt = γR bRt−1 + (1− γR)³γΠbΠt + γy(4beydt + bezt)´+ bmt
Rearranging:
− bRt+γR bRt−1+(1−γR)γΠbΠt+(1−γR)γybezt+(1−γR)γy
beydt − (1−γR)γybeydt−1+ bmt = 0 (35)
Equation 8 The eighth equation is:
cbect + xbext + γ1ekezeμ but = ydbeydtNote that in the code, because we have solved for the log-steady state, constants enter
as follows: c = exp [log (c)], x = exp [log (x)] , k = exphlog³k´i, yd = exp
£log¡yd¢¤.
Rearranging:
cbect + xbext + γ1ekezeμ but − ydbeydt = 0 (36)
Equation 9 The ninth equation is:
(ydvp)³bvpt + beydt´ = eAez ³uek´α ³eld´1−α
µbeAt − bezt + α
µbut + bekt−1¶+ (1− α)eldt¶
Define the parameter produc = eAez³uek´α ³eld´1−α. Note that in terms of Uhlig notation, this
is defined as produc = eAeznexp [log(u)] exp
hlog(ek)ioα n
exphlog(eld)io1−α. Also note that in
terms of the code, we have that yd = exp£log¡yd¢¤, vp = exp [log (vp)]. Substituting:
(ydvp)³bvpt + beydt´ = producµbeAt − bezt + α
µbut + bekt−1¶+ (1− α)eldt¶Rearranging:
(ydvp)bvpt + (ydvp)beydt − (produc)beAt + (produc)bezt − (α)(produc)but−(α)(produc)bekt−1 − (1− α) (produc)eldt = 0 (37)
39
Equation 10 The tenth equation is:
bvpt = θpΠε(1−χ)
³ε(bΠt − χbΠt−1) + bvpt−1´− ¡1− θpΠ
ε(1−χ)¢ εbΠ∗tDefine a3 = βθpΠ
ε(1−χ). Then, θpΠε(1−χ) = a3β. This type of parameter definition will become
clearer when we analyze the price setting equations. Then, substituting:
bvpt = a3βεbΠt − χε
a3βbΠt−1 + a3
βbvpt−1 −µ1− a3β
¶εbΠ∗t
And rearranging:
a3ε
βbΠt − a3εχ
βbΠt−1 + a3
βbvpt−1 −µ1− a3β
¶εbΠ∗t − bvpt = 0 (38)
Equation 11 The eleventh equation is:
bvwt = θwΠη(1−χw)ezη ³η ³bΠt − χwbΠt−1 + bewt − bewt−1 + bezt´+ bvwt−1´−¡1− θwΠ
η(1−χw)ezη¢ η(bew∗t−bewt)First, let’s define a4 = θwΠ
η(1−χw)ezη. Substituting:bvwt = a4 ³η ³bΠt − χwbΠt−1 + bewt − bewt−1 + bezt´+ bvwt−1´− (1− a4) η(bew∗t − bewt)
Rearranging:
bvwt = a4ηbΠt − χwηa4bΠt−1 + a4ηbewt − a4ηbewt−1 + a4ηbezt + a4bvwt−1 − (1− a4) ηbew∗t + (1− a4) ηbewtThen,
a4ηbΠt − χwηa4bΠt−1 + ηbewt − a4ηbewt−1 + a4ηbezt + a4bvwt−1 − (1− a4) ηbew∗t − bvwt = 0 (39)
Equation 12 The twelfth equation is:
blt = bvwt + bldtWhich we rearrange in the code to appear as:
blt − bvwt − bldt = 0 (40)
40
Equation 13 The thirteenth equation is:
bkt = (1− δ)ezeμ bkt−1 + ezeμ− (1− δ)ezeμ bext − 1− δezeμ ³bezt + beμt´which we rearrange to:
(1− δ)ezeμ bkt−1 + ∙1− (1− δ)ezeμ¸ bext − 1− δezeμ ³bezt + beμt´− bkt = 0 (41)
Equation 14 The fourteenth equation is:
bezt = beAt + αbeμt1− α
which we rearrange to:1
1− αbeAt + α
1− αbeμt − bezt = 0 (42)
Equation 15 The fifteenth equation is:
(1− bβez)beλt = bdt − bβezEt bdt+1 − 1 + b2β¡1− bez¢bect + bez ¡1− bez¢bect−1 + βbz¡
1− bez¢Etbect+1 − bez ¡1− bez¢beztRearranging:
bdt−bβezEt bdt+1−1 + b2β¡1− bez¢bect+ bez ¡1− bez¢bect−1+ βbz¡
1− bez¢Etbect+1− bez ¡1− bez¢bezt−(1−bβez)beλt = 0 (43)Equation 16 The sixteenth equation is:
beλt = Etbeλt+1 + bRt − bΠt+1which we rearrange to:
Etbeλt+1 − beλt + bRt − bΠt+1 = 0 (44)
Equation 17 The seventeenth equation is:
beqt = Et∆beλt+1 + β (1− δ)ezeμ Etbeqt+1 +µ1− β(1− δ)ezeμ¶Etbert+1
41
which we rearrange to:
Etbeλt+1 − beλt + β (1− δ)ezeμ Etbeqt+1 +µ1− β(1− δ)ezeμ
¶Etbert+1 − beqt = 0 (45)
Equation 18 The eighteenth equation is:
κez2 ³∆bext + bezt´ = beqt + βκez2Et∆bext+1which we rearrange by undoing the first-difference operator:
beqt + βκez2Etbext+1 − (1 + β)κez2bext + κez2bext−1 − κez2bezt = 0 (46)
Equation 19 The nineteenth equation is:
bft =¡1− βθwezη−1Π−(1−η)(1−χw)¢µ(1− η) bew∗t + beλt + ηbewt + bldt¶+βθwΠ
−(1−η)(1−χw)ezη−1Et ³ bft+1 − (1− η)³bΠt+1 − χwbΠt +∆bew∗t+1´´
define a5 = βθwezη−1Π−(1−η)(1−χw). Substituting:bft = (1− a5) ∙(1− η) bew∗t + beλt + ηbewt + bldt ¸+ a5Et h bft+1 − (1− η)
³bΠt+1 − χwbΠt +∆bew∗t+1´iRearranging:
(1− η) bew∗t + (1− a5) beλt + (1− a5) ηbewt + (1− a5)bldt + a5Et bft+1+(η − 1)a5EtbΠt+1 − (η − 1)a5χwbΠt − (1− η)a5Etbew∗t+1 − bft = 0 (47)
Equation 20 The twentieth equation is:
bft =¡1− βθwezη(1+γ)Πη(1+γ)(1−χw)
¢ ³bdt + bϕt + η (1 + γ)³bewt − bew∗t´+ (1 + γ)bldt´
+βθwezη(1+γ)Πη(1+γ)(1−χw)Et³ bft+1 + η (1 + γ)
³bΠt+1 − χwbΠt +∆bew∗t+1´´Define a6 = βθwezη(1+γ)Πη(1+γ)(1−χw). Then,
bft = (1− a6)³bdt + bϕt + η (1 + γ)
³bewt − bew∗t´+ (1 + γ)bldt´+a6Et
³ bft+1 + η (1 + γ)³bΠt+1 − χwbΠt +∆bew∗t+1´´
42
Rearranging,
(1− a6) bdt + (1− a6) bϕt + η (1 + γ) (1− a6) bewt − η (1 + γ) bew∗t + (1 + γ) (1− a6)bldt − bft+a6Et bft+1 + a6η (1 + γ)EtbΠt+1 − a6η (1 + γ)χwbΠt + a6η (1 + γ)Etbew∗t+1 = 0 (48)
Equation 21 The twenty first equation is
bg1t = ¡1− βθpΠε(1−χ)¢µbeλt + cmct + beydt¶+ βθpΠ
ε(1−χ)t Et
³ε(bΠt+1 − χbΠt) + bg1t+1´
As before, define a3 = βθpΠε(1−χ). Then:
(1− a3) beλt + (1− a3) cmct + (1− a3)beydt + εa3EtbΠt+1 − χεa3bΠt + a3Etbg1t+1 − bg1t = 0 (49)
Equation 22 The twenty second equation is
bg2t =¡1− βθpΠ
−(1−ε)(1−χ)¢µbeλt + bΠ∗t + beydt¶+βθpΠ
−(1−ε)(1−χ)Et³−(1− ε)
³bΠt+1 − χbΠt´− ³bΠ∗t+1 − bΠ∗t´+ bg2t+1´Define: a7 = βθpΠ
−(1−ε)(1−χ). Substituting:
(1− a7) beλt+ bΠ∗t +(1− a7)beydt +(ε−1)a7EtbΠt+1−χ(ε−1)a7bΠt−a7EtbΠ∗t+1+a7Etbg2t+1−bg2t = 0Shocks The preference shocks has the following structure:
bdt = ρd bdt−1 + εd,tbϕt = ρϕbϕt−1 + εϕ,t
Note that Uhlig does not allow to write something like bdt = ρbdt−1 + σdεd,t. We declare the
variance-covariance matrix later. The following shocks are not defined because of their i.i.d.
nature.
beμt = zμ,tbeAt = zA,t
mt = σmεm,t
43
4.4. Solving the Model
Now, let
statet =
µbΠt, bewt,bg1t ,bg2t ,bekt, bRt,beydt ,bect,bvpt , bvwt ,beqt, bef t,bext, beλt,bezt¶0 ,nstatet =
³bert, but, bΠ∗t ,bldt , cmct,blt, bew∗t´0 ,exot =
³zμ,t, bdt, bϕt, zA,t,mt
´0,
and
εt = (εμ,t, εd,t, εϕ,t, εA,t, εm,t)0 .
Then, we need to write the system defined above in Uhlig’s format, i.e.:
0 = AA ∗ statet +BB ∗ statet−1 + CC ∗ nstatet +DD ∗ exot,
0 = Et
ÃFF ∗ statet+1 +GG ∗ statet +HH ∗ statet−1
+JJ ∗ nstatet+1 +KK ∗ nstatet + LL ∗ exot+1 +MM ∗ exot
!,
and
exot+1 = NN ∗ exot + Σ1/2 ∗ εt+1 with Etεt+1 = 0.
4.4.1. Writing the Model in Uhlig’s Form
First, note that from this section on, and in the codes, we define the variables in terms of
their loglinear deviation from steady-state. The matrices in Uhlig’s notation are as following
44
AA =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
a1 1 + a1 0 0 0 0 0 0 0 0 0 0 0 0 a1
a2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 −1 0 0 0 0 0 0 0 0 0 0 0
0 −1 0 0 0 0 0 0 0 0 0 0 0 0 −10 1− α 0 0 0 0 0 0 0 0 0 0 0 0 0
(1− γR)γΠ 0 0 0 0 −1 (1− γR)γy 0 0 0 0 0 0 0 (1− γR)γy
0 0 0 0 0 0 −yd c 0 0 0 0 x 0 0
0 0 0 0 0 0 ydvp 0 ydvp 0 0 0 0 0 produc
a3ε/β 0 0 0 0 0 0 0 −1 0 0 0 0 0 0
ηa4 η 0 0 0 0 0 0 0 −1 0 0 0 0 ηa4
0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0
0 0 0 0 −1 0 0 0 0 0 0 0 1− (1−δ)zμ
0 − (1−δ)zμ
0 0 0 0 0 0 0 0 0 0 0 0 0 0 −1
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
BB =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
−χwa1 −a1 0 0 0 0 0 0 0 0 0 0 0 0 0
−χa2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 γR −(1− γR)γy 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 −α(produc) 0 0 0 0 0 0 0 0 0 0−a3εχ
β0 0 0 0 0 0 0 a3
β0 0 0 0 0 0
−χwηa4 −ηa4 0 0 0 0 0 0 0 a4 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1−δzμ
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
45
CC =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 −10 0 −1 0 0 0 0
−1 φu 0 0 0 0 0
0 0 0 0 0 0 0
1 1 0 −1 0 0 0
α 0 0 0 −1 0 0
0 0 0 0 0 0 0
0 γ1kzμ
0 0 0 0 0
0 −α(produc) 0 −(1− α)(produc) 0 0 0
0 0 −(1− a3β)ε 0 0 0 0
0 0 0 0 0 0 −η(1− a4)0 0 0 −1 0 1 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
DD =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
−1 0 0 0 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 0
0 0 0 −produc 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
−1−δzμ
0 0 0 0α1−α 0 0 1
1−α 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
46
FF =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 0 βbz
1− bz
0 0 0 0 0 0 0
−1 0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 β(1−δ)zμ
0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 βκz2 0 0
a5(η − 1) 0 0 0 0 0 0 0 0 0 0 a5 0 0 0
a6η(1 + γ) 0 0 0 0 0 0 0 0 0 0 a6 0 0 0
a3ε 0 a3 0 0 0 0 0 0 0 0 0 0 0 0
a7(ε− 1) 0 0 a7 0 0 0 0 0 0 0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
GG =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 0 GG1,8 0 0 0 0 0 −(1− bβz) GG1,15
0 0 0 0 0 1 0 0 0 0 0 0 0 −1 0
0 0 0 0 0 0 0 0 0 0 −1 0 0 −1 0
0 0 0 0 0 0 0 0 0 0 1 0 GG4,13 0 −κz2
−a5χw(η − 1) (1− a5)η 0 0 0 0 0 0 0 0 0 −1 0 1− a5 0
−a6χwη(1 + γ) GG6,2 0 0 0 0 0 0 0 0 0 −1 0 0 0
−a3εχ 0 −1 0 0 0 1− a3 0 0 0 0 0 0 1− a3 0
−a7(ε− 1)χ 0 0 −1 0 0 1− a7 0 0 0 0 0 0 1− a7 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠where
GG1,8 = −1 + βb2
1− bz
GG1,15 = − b
z(1− bz)
GG6,2 = (1− a6)η(1 + γ)
GG4,13 = −(1 + β)κz2
HH =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 0 bz(1− b
z)0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 κz2 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
47
JJ =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1− β(1−δ)zμ
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 −a5(1− η)
0 0 0 0 0 0 a6η(1 + γ)
0 0 0 0 0 0 0
0 0 −a7 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
KK =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1− a5 0 0 1− η
0 0 0 (1− a6)(1 + γ) 0 0 −η(1 + γ)
0 0 0 0 1− a3 0 0
0 0 1 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
LL =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 −βbz 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
MM =
⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 1− a6 1− a6 0 0
0 0 0 0 0
0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠
48
NN =
⎛⎜⎜⎜⎜⎜⎜⎝0 0 0 0 0
0 ρd 0 0 0
0 0 ρϕ 0 0
0 0 0 0 0
0 0 0 0 0
⎞⎟⎟⎟⎟⎟⎟⎠
Σ =
⎛⎜⎜⎜⎜⎜⎜⎝σ2μ 0 0 0 0
0 σ2d 0 0 0
0 0 σ2ϕ 0 0
0 0 0 σ2A 0
0 0 0 0 σ2m
⎞⎟⎟⎟⎟⎟⎟⎠4.4.2. Writing the Likelihood function
Uhlig’s solution method gives us the following solution:
statet = PP ∗ statet−1 +QQ ∗ exot
and
nstatet = RR ∗ statet−1 + SS ∗ exot.
We observe obst = (logΠt, logRt,4 logwt,4 log yt)0. Therefore, to write the likelihoodfunction, we need to write the model in the following state space form:
St = A ∗ St−1 +B ∗ εtobst = C ∗ St−1 +D ∗ εt
where St−1 = (1, statet, statet−1, exot−1).
4.4.3. Building the A and B matrices
Hence,
A =
⎡⎢⎢⎢⎢⎣1 0 0 0
0 PP 0 QQ ∗NN0 I 0 0
0 0 0 NN
⎤⎥⎥⎥⎥⎦
49
and
B =
⎡⎢⎢⎢⎢⎣0
0
I
⎤⎥⎥⎥⎥⎦ ∗ Σ1/2.
4.4.4. Building the C and D matrices
Define the observables vector:
obst = (logΠt, logRt,4 logwt,4 log yt)0 .
Note that:
bΠt = PP (1, :) ∗ statet−1 +QQ (1, :) ∗ exot =PP (1, :) ∗ statet−1 +QQ (1, :) ∗NN ∗ exot−1 +QQ (1, :) ∗Σ1/2 ∗ εt,
bRt = PP (6, :) ∗ statet−1 +QQ (6, :) ∗ exot =PP (6, :) ∗ statet−1 +QQ (6, :) ∗NN ∗ exot−1 +QQ (6, :) ∗ Σ1/2 ∗ εt,
bewt − bewt−1 = PP (2, :) ∗ statet−1 +QQ (2, :) ∗ exot − PP (2, :) ∗ statet−2 −QQ (2, :) ∗ exot−1 =PP (2, :) ∗ statet−1 − PP (2, :) ∗ statet−2+QQ (2, :) ∗NN ∗ exot−1 −QQ (2, :) ∗ exot−1 +QQ (2, :) ∗ Σ1/2 ∗ εt,
and
beyt − beyt−1 = PP (7, :) ∗ statet−1 +QQ (7, :) ∗ exot − PP (7, :) ∗ statet−2 −QQ (7, :) ∗ exot−1 =PP (7, :) ∗ statet−1 − PP (7, :) ∗ statet−2+QQ (7, :) ∗NN ∗ exot−1 −QQ (7, :) ∗ exot−1 +QQ (7, :) ∗ Σ1/2 ∗ εt,
Also, remember that bΠt = logΠt − logΠss, bRt = logRt − logRss, bewt − bewt−1 = 4 log ewt =4 logwt −4 log zt, and beyt − beyt−1 = 4 log eyt = 4 log yt −4 log zt. Since 4 log zt = αΛμ+ΛA
1−α +αzμ,t+zA,t
1−α , we have:
obst = C ∗ St−1 +D ∗ εt.
50
where
C =
⎡⎢⎢⎢⎢⎣logΠss PP (1, :) 0 QQ (1, :) ∗NNlogRss PP (6, :) 0 QQ (6, :) ∗NNαΛμ+ΛA1−α PP (2, :) −PP (2, :) QQ (2, :) ∗ (NN − I)
αΛμ+ΛA1−α PP (7, :) −PP (7, :) QQ (7, :) ∗ (NN − I)
⎤⎥⎥⎥⎥⎦and
D =
⎡⎢⎢⎢⎢⎢⎢⎢⎣
QQ (1, :)
QQ (6, :)
QQ (2, :) +
µα 0 0 1 0
¶1−α
QQ (7, :) +
µα 0 0 1 0
¶1−α
⎤⎥⎥⎥⎥⎥⎥⎥⎦∗ Σ1/2
51