Notes Log Linearization sp24
Notes Log Linearization sp24
Notes on Log-Linearization
Eric Sims
University of Notre Dame
Spring 2024
The solution to many discrete time dynamic economic problems take the form of a system of
non-linear difference equations. There generally exists no closed-form solution for such problems.
As such, we must result to numerical and/or approximation techniques.
One easy and common approximation technique is that of log linearization. There are multiple
ways to log-linearize conditions. All of these result in a system of linear difference equations in which
the variables of interest are interpreted as percentage (i.e. log) deviations from the non-stochastic
steady state. The way I typically proceed is:
Note: for variables that already have units that are in percentages (like interest rates or inflation
rates) or that are mean zero (like exogenous shocks), we will leave those variables as absolute
deviations (rather than percentage deviations) about steady state.
First, a quick review of Taylor series approximations. First consider some arbitrary univariate
function, f (x). Taylor’s theorem tells us that this can be expressed as a power series about a
particular point x∗ , where x∗ belongs to the set of possible x values:
′′
f ′ (x∗ ) f (x∗ ) f (3) (x∗ )
∗
f (x) = f (x ) + (x − x∗ ) + (x − x∗ )2 + (x − x∗ )3 + ...
1! 2! 3!
′′
Here f ′ (x∗ ) is the first derivative of f with respect to x evaluated at the point x∗ , f (x∗ ) is the
second derivative evaluated at the same point, f (3) is the third derivative, and so on. n! reads “n
factorial” and is equal to n! = n(n − 1)(n − 2) · ... · 1. In words, the factorial of n is the product of
all non-negative integers less than or equal to n. Hence 1! = 1, 2! = 2 · 1 = 2, 3! = 3 · 2 · 1 = 6, and
so on.
1
For a function that is sufficiently smooth, the higher order derivatives will be small, and the
function can be well approximated (at least in the neighborhood of the point of evaluation, x∗ )
linearly as:
Taylor’s theorem also applies equally well to multivariate functions. As an example, suppose
we have f (x, y). The first order approximation about the point (x∗ , y ∗ ) is:
Here fx denotes the partial derivative of the function with respect to x and similarly for y. Note
that partial derivatives are functions; these partial derivatives are evaluated at a known point (the
steady state).
Suppose that we have the following (non-linear) function:
g(x)
f (x) =
h(x)
The way I approach log-linearization as is follows. First take natural logs of both sides:
Next, take the total derivative about the point of approximation, where the notation is dx =
x − x∗ . The total derivative is just a Taylor series approximation of the change in the value of the
function relative to a point:
g ′ (x∗ ) g(x∗ ) ′ ∗
f ′ (x∗ )dx = dx − h (x )dx
h(x∗ ) h(x∗ )2
2
This can be written:
g(x∗ ) ′ ∗
1
f ′ (x∗ )dx = g ′ (x∗ )dx − h (x )dx
h(x∗ ) h(x∗ )
We can simplify this further:
g (exp(ln x))
f (exp(ln x)) =
h (exp(ln x))
This is fine because exp(·) and ln(·) are inverse operators. Now do a total derivative
of ln x (not of x, i.e. we will have d ln x, not dx). We have:
g ′ (exp(ln x∗ )) g (exp(ln x∗ )) ′
f ′ (exp(ln x∗ )) ln x∗ d ln x = ln x∗
d ln x− h (exp(ln x∗ )) ln x∗ d ln x
h (exp(ln x∗ )) h (exp(ln x∗ ))2
We can simplify – the function arguments evaluated at steady state are just x∗ , and
the ln x∗ cancel out, so we have:
g ′ (x∗ ) g(x∗ ) ′ ∗
f ′ (x∗ )d ln x = ∗
d ln x − h (x )d ln x
h(x ) h(x∗ )2
Which can be written:
3
f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )
d ln x = d ln x − d ln x
f (x∗ ) g(x∗ ) h(x∗ )
But note, the first order Taylor series approximate of ln x is:
dx
ln x = ln x∗ +
x∗
Where dx = x − x∗ . We have been defining x
e= dx
x∗ , so we have:
ln x − ln x∗ = x
et
Using the tilde notation, we have the same expression we’ve been getting:
The point here is that there are multiple ways to skin a cat, and they all give you the same
thing – a linear expression where the variable of interest is the percentage difference relative to
steady state (which is approximately the log difference relative to steady state).
1 Economic Examples
I’m going to go through log-linearization of several examples.
Yt = At Ktα Nt1−α
Expressions that are multiplicative are particularly easy to log-linearize because they are already
linear in the log. Take logs:
ln Yt = ln At + α ln Kt + (1 − α) ln Nt
Totally differentiate about the steady state (which I will denote with the absence of a time
subscript, rather than a superscript ∗):
Yet = A e t + (1 − α)N
et + αK et (4)
4
Note, since what I did is equivalent to totally differentiate the logs of variables, i.e. d ln Yt ,
rather than dYt , since the expression is already linear in the logs you could skip straight to the
tilde expression.
Ct σ
1 = Et β (1 + rt )
Ct+1
Now, there appears to be a little bit of an issue here with my approach: in general, you cannot
move a natural log through an expectation operator (you can only move linear operators, like a
derivative, through a linear operator like an expectations operator). It turns out that, since we are
ultimately doing a first-order approximation, this doesn’t matter – we can “cheat” and pretend like
the expectations operator isn’t there. But, just to convince you of that, let me start out a harder
way.
Note that Ct = Ct+1 = C in the steady state. Start by totally differentiating (i.e. don’t take a
log first):
0 = βdrt + σβ(1 + r)C σ−1 C −σ dCt + σβ(1 + r)C σ C −σ−1 dEt Ct+1
The first term on the right-hand side is the partial with respect to rt , which is just β evaluated
at the steady state, times drt . The second term is the partial with respect to Ct , evaluated in the
steady state, times dCt . And the third term is the partial with respect to Ct+1 , evaluated in the
steady state, times the expected change in future consumption, dEt Ct+1 . Evidently, we must have
1 + r = β −1 in steady state, so this simplified a bit. Further, we can multiply and divide by C
where necessary to write this condition as:
σ σ
C dCt C dEt Ct+1
0 = βdrt + σ +σ
C C C C
Note that we will define ret = drt = rt − r∗ – i.e. the absolute difference relative to steady state,
rather than the percentage difference. This is because rt is already in percentage terms. We now
have everything in tilde notation:
0 = βe et − σEt C
rt + σ C et+1
et+1 − C β
Et C et = ret (5)
σ
Okay, now let’s do my trick where we take logs and ignore the expectations operator until the
end. We have:
5
ln 1 = ln β + ln(1 + rt ) + σ ln Ct − σ ln Ct+1
Et C et = β ret
et+1 − C (6)
σ
Note, when linearizing the Euler equation, it is very common to make an additional approxi-
mation. A good approximation is that ln(1 + x) ≈ x when x is close to zero. So, above, most of
the time people will approximate ln(1 + rt ) = rt . This gives the linearized Euler equation:
et+1 − C 1
Et C et = ret (7)
σ
The only difference is that there is no β. As long as β is close to one (which it will be; which
then implies that r is in fact close to zero), this will not be a problem. With iso-elastic preferences,
1
σ is often referred to as the intertemporal elasticity of substitution (IES). It tells you how strongly
expected consumption growth is to the deviations in the real interest rate.
1 1 k
= βEt Rt+1 + (1 − δ)
Ct Ct+1
Take logs, ignoring the expectations operator:
k
− ln Ct = ln β − ln Ct+1 + ln Rt+1 + (1 − δ)
dCt dCt+1 1 k
− =− + k (dRt+1
C C R + (1 − δ)
Now, in steady state, we must have: Rk + (1 − δ) = β −1 . Hence, we have:
−C et+1 + βdRk
et = −Et C
t+1
1
Multiply and divide the last term by Rk = β − (1 − δ) to get:
k
dRt+1
1
−C
et = −Et C
et+1 = β − (1 − δ)
β R
6
Or, using tilde notation and simplifying:
et+1 − C
Et C ek
et = (1 − β(1 − δ)) Et R (8)
t+1
Now, a reasonable person might ask: “why expression the rental rate on capital in percentage
deviations, when we do the real interest rate in absolute deviations?” That’s a perfectly reasonable
question to ask. I’ve just always done it this way. It doesn’t really matter how we do things, as
long as we are consistent and remain mindful of how to interpret units.
v ′ (Nt )
= wt
u′ (Ct )
Ct1−σ Nt1+η
Suppose we have the function formal: u(Ct ) = 1−σ and v(Nt ) = θ 1+η . The labor supply
condition becomes:
θNtη = Ct−σ wt
This is already log-linear, since it is multiplivative. But go through the steps anyway:
ln θ + η ln Nt = −σ ln Ct + ln wt
et = − σ C
N et + 1 w
et (9)
η η
The Frisch labor supply elasticity is defined as the elasticity of labor with respect to the wage,
holding the marginal utility of wealth fixed. The marginal utility of wealth is the Lagrange multiplier
on a household’s budget constraint, which with these preferences equals Ct−σ . Hence, σ C et is the
marginal utility of wealth for these preferences. Holding this constant, we could compute the Frisch
elasticity as:
∂N
et 1
=
∂w
et η
Because the tilde variables are already percentage deviations (i.e. log deviations), the simply
7
derivative is the percentage change over the percentage change, or the elasticity. Hence, the Frisch
elasticity is 1/eta (similar to how the IES is 1/σ with isoleastic preferences over consumption, as
shown above).
Yt = C t + I t + G t
Now, this is already linear, but in levels. To make it linear in log levels, proceed as I laid out
above. First, take logs.
ln Yt = ln (Ct + It + Gt )
dYt 1
= (dCt + dIt + dGt )
Y C +I +G
Now, C + I + G = Y , so we have:
dYt 1 1 1
= dCt + dIt + dGt
Y Y Y Y
Multiply and divide the terms on the RHS by their own steady-state values:
Ce I e Ge
Yet = C t+ It + Gt (10)
Y Y Y
In other words, when log-linearizing a linear expression, the log-linear sum is going to be the
share-weighted percentage deviations.
Kt+1 = It + (1 − δ)Kt
Take logs:
Totally differentiate:
8
dKt+1 1
= (dIt + (1 − δ)dKt )
K I + (1 − δ)K
Now, we have I + (1 − δ)K = K, so:
dKt+1 1 dKt
= dIt + (1 − δ)
K K K
Multiply and divide the first term on the right-hand side by steady state I: