0% found this document useful (0 votes)
5 views

Notes Log Linearization sp24

log linearization
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Notes Log Linearization sp24

log linearization
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Graduate Macro Theory II:

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:

1. Take logs of both sides of an equation

2. Totally differentiate about the non-stochastic steady state

3. Do algebraic manipulations as necessary so that all variables are expressed in percentage


deviations from steady state

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:

f (x) = f (x∗ ) + f ′ (x∗ ) (x − x∗ )

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:

f (x, y) ≈ f (x∗ , y ∗ ) + fx (x∗ , y ∗ ) (x − x∗ ) + fy (x∗ , y ∗ ) (y − y ∗ )

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:

ln f (x) = ln g(x) − ln h(x)

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:

f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )


dx = dx − dx
f (x∗ ) g(x∗ ) h(x∗ )
Multiply and divide both sides by x∗ , which puts deviations in percentage form (i.e. dx/x∗ =
(x − x∗ )/x∗ ):

x∗ f ′ (x∗ ) dx x∗ g ′ (x∗ ) dx x∗ h′ (x∗ ) dx


= −
f (x∗ ) x∗ g(x∗ ) x∗ h(x∗ ) x∗
e = dx/x∗ as the percentage deviation of x about the point x∗ . We therefore have:
Now, define x

f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )


 
− + x
e=0 (1)
f (x∗ ) g(x∗ ) h(x∗ )
Now, there a couple of other ways one can get at the same thing. I will discuss these below.

Alternative 1: One alternative is to not take logs. We would just go directly to


the total differentiation stage. In particular, for this example we would have:

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(x∗ ) g ′ (x∗ ) h′ (x∗ )


 
′ ∗
f (x )dx = dx − dx
h(x∗ ) g(x∗ ) h(x∗ )
g(x∗ )
But since h(x∗ ) = f (x∗ ), this can be written:

f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )


dx = dx − dx
f (x∗ ) g(x∗ ) h(x∗ )
Now multiply and divide by x∗ so we get dx/x∗ :

x∗ f ′ (x∗ ) dx x∗ g ′ (x∗ ) dx x∗ h′ (x∗ ) dx


= −
f (x∗ ) x∗ g(x∗ ) x∗ h(x∗ ) x∗
Or, using tilde notation, the same as above:

f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )


 
− + x
e=0 (2)
f (x∗ ) g(x∗ ) h(x∗ )

Alternative 2: Another alternative is to first re-write the underlying expression in


logs using the exp(·) operator. In particular, we would have:

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:

g(x∗ ) g ′ (x∗ ) h′ (x∗ )


 
′ ∗
f (x )d ln x = d ln x − d ln x
h(x∗ ) g(x∗ ) h(x∗ )
g(x∗ )
But, since h(x∗ ) = f (x∗ ), we have:

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:

f ′ (x∗ ) g ′ (x∗ ) h′ (x∗ )


 
− + x
e=0 (3)
f (x∗ ) g(x∗ ) h(x∗ )

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.

1.1 Cobb-Douglas Production Function


Suppose we have the production function:

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 ∗):

dYt dAt dKt dNt


= +α + (1 − α)
Y A K N
But using tilde notation, we are finished:

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.

1.2 Euler Equation for Bonds


A typical consumption Euler equation for bonds looks like:

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

Which can be written:

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

Totally differentiating, we have:

drt dCt dCt+1


0= +σ −σ
1+r C C
Since 1 + r = β −1 , using tilde notation we have the same expression we had above:

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.3 Euler Equation for Physical Capital


The typical Euler equation for physical capital, assuming log utility, looks something like:

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 − δ)

Totally differentiate about the steady state:

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.

1.4 Labor Supply Condition


Suppose a household has intratemporal preferences that look like: u(Ct ) − v(Nt ). A labor supply
condition will equate the marginal rate of substitution between labor and consumption to the real
wage (the relative price of leisure):

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

Totally differentiate about the steady state:

dNt dCt dwt


η = −σ +
N C w
Or, in tilde notation:

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).

1.5 Aggregate Resource Constraint


The aggregate resource constraint in a closed economy is:

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 )

Now totally differentiate:

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:

dYt C dCt I dIt G dGt


= + +
Y Y C Y I Y G
But now we’re in tilde notation:

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.

1.6 Capital Accumulation Equation


The law of motion for physical capital is typically:

Kt+1 = It + (1 − δ)Kt

Take logs:

ln Kt+1 = ln (It + (1 − δ)Kt )

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:

dKt+1 I dIt dKt


= + (1 − δ)
K K I K
Now we’re in tilde notation. Furthermore, we know that I/K = δ in steady state. So we have:

e t+1 = δ Iet + (1 − δ)K


K et (11)

You might also like