You are on page 1of 92

Perturbation Methods

Jess Fernndez-Villaverde
University of Pennsylvania

June 13, 2010

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

1 / 92

Introduction
Remember that we want to solve a functional equations of the form:

H (d ) = 0
for an unknown decision rule d.
Perturbation solves the problem by specifying:
d n (x, ) =

i (x

x0 )i

i =0

We use implicit-function theorems to nd coe cients i s.


Inherently local approximation. However, often good global properties.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

2 / 92

Motivation
Many complicated mathematical problems have:
1

either a particular case

or a related problem.

that is easy to solve.


Often, we can use the solution of the simpler problem as a building
block of the general solution.
Very successful in physics.
Sometimes perturbation is known as asymptotic methods.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

3 / 92

Applications to Economics
Judd and Guu (1993) showed how to apply it to economic problems.

Recently, perturbation methods have been gaining much popularity.

In particular, second- and third-order approximations are easy to


compute and notably improve accuracy.

Perturbation theory is the generalization of the well-known


linearization strategy.

Hence, we can use much of what we already know about linearization.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

4 / 92

Regular versus Singular Perturbations


Regular perturbation: a small change in the problem induces a small
change in the solution.
Singular perturbation: a small change in the problem induces a large
change in the solution.
Example: excess demand function.
Most problems in economics involve regular perturbations.
Sometimes, however, we can have singularities. Example: introducing
a new asset in an incomplete market model.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

5 / 92

References
General:
1

A First Look at Perturbation Theory by James G. Simmonds and


James E. Mann Jr.

Advanced Mathematical Methods for Scientists and Engineers:


Asymptotic Methods and Perturbation Theory by Carl M. Bender,
Steven A. Orszag.

Economics:
1

Perturbation Methods for General Dynamic Stochastic Models by


Hehui Jin and Kenneth Judd.

Perturbation Methods with Nonlinear Changes of Variables by


Kenneth Judd.

A gentle introduction: Solving Dynamic General Equilibrium Models


Using a Second-Order Approximation to the Policy Function by
Martn Uribe and Stephanie Schmitt-Grohe.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

6 / 92

A Baby Example: A Basic RBC


Model:
max E0

t log ct

t =0

s.t. ct + kt +1 = e zt kt + (1
zt = zt

+ t , t

) kt , 8 t > 0

N (0, 1)

Equilibrium conditions:
1
1
= Et
1 + e zt +1 kt+11
ct
ct + 1
ct + kt +1 = e zt kt + (1 ) kt
zt = zt

Jess Fernndez-Villaverde (PENN)

+ t

Perturbation Methods

June 13, 2010

7 / 92

Computing the RBC


The previous problem does not have a known paper and pencil
solution.
One particular case the model has a closed form solution: = 1.
Why? Because, the income and the substitution eect from a
productivity shock cancel each other:
1

Labor is constant.

Consumption is a xed fraction of income.

Not very realistic, but we are trying to learn here.


Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

8 / 92

Solution
Equilibrium conditions with = 1.
e zt +1 kt+11
1
= Et
ct
ct + 1
ct + kt +1 = e zt kt
zt = zt

+ t

By guess and verify


ct = ( 1

) e zt kt

kt +1 = e zt kt
How can you check? Plug the solution in the equilibrium conditions.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

9 / 92

Another Way to Solve the Problem


Now let us suppose that you missed the lecture when guess and
verify was explained.
You need to compute the RBC.
What you are searching for? A decision rule for consumption:

ct = c (kt , zt )
and another one for capital:
kt +1 = k (kt , zt )
Note that our d is just the stack of c (kt , zt ) and k (kt , zt ).
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

10 / 92

Equilibrium Conditions
We substitute in the equilibrium conditions the budget constraint and
the law of motion for technology.

And we write the decision rules explicitly as function of the states.

Then, we have:
e zt +t +1 k (kt , zt ) 1
1
= Et
c (kt , zt )
c (k (kt , zt ) , zt + t +1 )
c (kt , zt ) + k (kt , zt ) = e zt kt
This is a system of functional equations.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

11 / 92

Main Idea

Transform the problem rewriting it in terms of a small perturbation


parameter.
Solve the new problem for a particular choice of the perturbation
parameter.
This step is usually ambiguous since there are dierent ways to do so.
Use the previous solution to approximate the solution of original the
problem.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

12 / 92

A Perturbation Approach
Hence, we want to transform the problem.

Which perturbation parameter? Standard deviation .

Why ? Discrete versus continuous time.

Set = 0 )deterministic model, zt = 0 and e zt = 1.


We know how to solve the deterministic steady state.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

13 / 92

A Parametrized Decision Rule


We search for decision rule:
ct = c (kt , zt ; )
and
kt +1 = k (kt , zt ; )

Note new parameter .

We are building a local approximation around = 0.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

14 / 92

Taylors Theorem
Equilibrium conditions:

Et

1
c (kt , zt ; )

e zt +t +1 k (kt , zt ; ) 1

c (k (kt , zt ; ) , zt + t +1 ; )

c (kt , zt ; ) + k (kt , zt ; )

=0

e zt kt = 0

We will take derivatives with respect to kt , zt , and .


Apply Taylors theorem to build solution around deterministic steady
state. How?

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

15 / 92

Asymptotic Expansion I

ct

= c (kt , zt ; )jk ,0,0 = c (k, 0; 0)


+ck (k, 0; 0) (kt k ) + cz (k, 0; 0) zt + c (k, 0; 0)
1
1
+ ckk (k, 0; 0) (kt k )2 + ckz (k, 0; 0) (kt k ) zt
2
2
1
1
+ ck (k, 0; 0) (kt k ) + czk (k, 0; 0) zt (kt k )
2
2
1
1
+ czz (k, 0; 0) zt2 + cz (k, 0; 0) zt
2
2
1
1
+ ck (k, 0; 0) (kt k ) + cz (k, 0; 0) zt
2
2
1
+ c2 (k, 0; 0) 2 + ...
2

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

16 / 92

Asymptotic Expansion II

kt +1 =

k (kt , zt ; )jk ,0,0 = k (k, 0; 0)

+kk (k, 0; 0) (kt k ) + kz (k, 0; 0) zt + k (k, 0; 0)


1
1
+ kkk (k, 0; 0) (kt k )2 + kkz (k, 0; 0) (kt k ) zt
2
2
1
1
+ kk (k, 0; 0) (kt k ) + kzk (k, 0; 0) zt (kt k )
2
2
1
1
+ kzz (k, 0; 0) zt2 + kz (k, 0; 0) zt
2
2
1
1
+ kk (k, 0; 0) (kt k ) + kz (k, 0; 0) zt
2
2
1
+ k2 (k, 0; 0) 2 + ...
2

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

17 / 92

Comment on Notation
From now on, to save on notation, I will write
#
"
e zt +t +1 k (k t ,zt ;) 1
1
c (k (kt ,zt ;),zt +t +1 ;)
c (k t ,zt ; )
=
F (kt , zt ; ) = Et
c (kt , zt ; ) + k (kt , zt ; ) e zt kt

0
0

Note that:
F (kt , zt ; ) = H (ct , ct +1 , kt , kt +1 , zt ; )

= H (c (kt , zt ; ) , c (k (kt , zt ; ) , zt +1 ; ) , kt , k (kt , zt ; ) , zt ; )


I will use Hi to represent the partial derivative of H with respect to
the i component and drop the evaluation at the steady state of the
functions when we do not need it.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

18 / 92

Zero-Order Approximation
First, we evaluate = 0:
F (kt , 0; 0) = 0
Steady state:
1
k
=
c
c

1 = k

or,
Then:
c = c (k, 0; 0) = () 1

() 1

k = k (k, 0; 0) = () 1

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

19 / 92

First-Order Approximation
We take derivatives of F (kt , zt ; ) around k, 0, and 0.
With respect to kt :
Fk (k, 0; 0) = 0
With respect to zt :
Fz (k, 0; 0) = 0
With respect to :
F (k, 0; 0) = 0

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

20 / 92

Solving the System I


Remember that:
F (kt , zt ; )

= H (c (kt , zt ; ) , c (k (kt , zt ; ) , zt +1 ; ) , kt , k (kt , zt ; ) , zt ; ) = 0


Because F (kt , zt ; ) must be equal to zero for any possible values of
kt , zt , and , the derivatives of any order of F must also be zero.
Then:
Fk (k, 0; 0) = H1 ck + H2 ck kk + H3 + H4 kk = 0

Fz (k, 0; 0) = H1 cz + H2 (ck kz + ck ) + H4 kz + H5 = 0
F (k, 0; 0) = H1 c + H2 (ck k + c ) + H4 k + H6 = 0

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

21 / 92

Solving the System II


Note that:
Fk (k, 0; 0) = H1 ck + H2 ck kk + H3 + H4 kk = 0

Fz (k, 0; 0) = H1 cz + H2 (ck kz + ck ) + H4 kz + H5 = 0

is a quadratic system of four equations on four unknowns: ck , cz , kk ,


and kz .
Procedures to solve quadratic systems:
1

Blanchard and Kahn (1980) .

Uhlig (1999).

Sims (2000).

Klein (2000).

All of them equivalent.


Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

22 / 92

Solving the System III


Also, note that:
F (k, 0; 0) = H1 c + H2 (ck k + c ) + H4 k + H6 = 0
is a linear, and homogeneous system in c and k .
Hence:
c = k = 0
This means the system is certainty equivalent.
Interpretation)no precautionary behavior.
Dierence between risk-aversion and precautionary behavior. Leland
(1968), Kimball (1990).
Risk-aversion depends on the second derivative (concave utility).
Precautionary behavior depends on the third derivative (convex
marginal utility).
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

23 / 92

Comparison with Linearization


After Kydland and Prescott (1982) a popular method to solve
economic models has been the use of a LQ approximation of the
objective function of the agents.
Close relative: linearization of equilibrium conditions.
When properly implemented linearization, LQ, and rst-order
perturbation are equivalent.
Advantages of linearization:
1

Theorems.

Higher order terms.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

24 / 92

Some Further Comments

Note how we have used a version of the implicit-function theorem.


Important tool in economics.
Also, we are using the Taylor theorem to approximate the policy
function.
Alternatives?

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

25 / 92

Second-Order Approximation
We take second-order derivatives of F (kt , zt ; ) around k, 0, and 0:
Fkk (k, 0; 0) = 0
Fkz (k, 0; 0) = 0
Fk (k, 0; 0) = 0
Fzz (k, 0; 0) = 0
Fz (k, 0; 0) = 0
F (k, 0; 0) = 0
Remember Youngs theorem!
We substitute the coe cients that we already know.
A linear system of 12 equations on 12 unknowns. Why linear?
Cross-terms k and z are zero.
Conjecture on all the terms with odd powers of .
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

26 / 92

Correction for Risk

We have a term in 2 .
Captures precautionary behavior.
We do not have certainty equivalence any more!
Important advantage of second order approximation.
Changes ergodic distribution of states.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

27 / 92

Higher Order Terms


We can continue the iteration for as long as we want.
Great advantage of procedure: it is recursive!
Often, a few iterations will be enough.
The level of accuracy depends on the goal of the exercise:
1

Welfare analysis: Kim and Kim (2001).

Empirical strategies: Fernndez-Villaverde, Rubio-Ramrez, and Santos


(2006).

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

28 / 92

A Numerical Example
Parameter
Value

0.99

0.33

0.95

0.01

Steady State:
c = 0.388069

k = 0.1883

First-order components:
ck (k, 0; 0) = 0.680101
cz (k, 0; 0) = 0.388069

kk (k, 0; 0) = 0.33
kz (k, 0; 0) = 0.1883

Second-order components:
ckk (k, 0; 0) = 2.41990
ckz (k, 0; 0) = 0.680099
czz (k, 0; 0) = 0.388064
c2 (k, 0; 0) ' 0

kkk (k, 0; 0) = 1.1742


kkz (k, 0; 0) = 0.33
kzz (k, 0; 0) = 0.1883
k2 (k, 0; 0) ' 0

c (k, 0; 0) = k (k, 0; 0) = ck (k, 0; 0) = kk (k, 0; 0) =


cz (k, 0; 0) = kz (k, 0; 0) = 0.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

29 / 92

Comparison

ct = 0.6733e zt kt0.33
ct ' 0.388069 + 0.680101 (kt k ) + 0.388069zt
2.41990
0.388064 2
zt
(kt k )2 + 0.680099 (kt k ) zt +
2
2
and:
kt +1 = 0.3267e zt kt0.33
kt +1 ' 0.1883 + 0.33 (kt
1.1742
(kt k )2 + 0.33 (kt
2

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

k ) + 0.1883zt
0.1883 2
k ) zt +
zt
2

June 13, 2010

30 / 92

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

31 / 92

A Computer
In practice you do all this approximations with a computer:
1

First-,second-, and third- order: Matlab and Dynare.

Higher order: Mathematica, Dynare++, Fortran code by Jinn and


Judd.

Burden: analytical derivatives.


Why are numerical derivatives a bad idea?
Alternatives: automatic dierentiation?
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

32 / 92

Local Properties of the Solution


Perturbation is a local method.
It approximates the solution around the deterministic steady state of
the problem.
It is valid within a radius of convergence.
What is the radius of convergence of a power series around x? An
0
0
r 2 R
z j < r , the power series of x 0 will
+ such that 8x , jx
converge.

A Remarkable Result from Complex Analysis


The radius of convergence is always equal to the distance from the center
to the nearest point where the policy function has a (non-removable)
singularity. If no such point exists then the radius of convergence is innite.
Singularity here refers to poles, fractional powers, and other branch
powers or discontinuities of the functional or its derivatives.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

33 / 92

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

34 / 92

Remarks

Intuition of the theorem: holomorphic functions are analytic.


Distance is in the complex plane.
Often, we can check numerically that perturbations have good non
local behavior.
However: problem with boundaries.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

35 / 92

Non Local Accuracy Test


Proposed by Judd (1992) and Judd and Guu (1997).
Given the Euler equation:
1
= Et
i
c (kt , zt )

e zt +1 k i (kt , zt ) 1
c i (k i (kt , zt ), zt +1 )

we can dene:
EE i (kt , zt )

c i (kt , zt ) Et

e zt +1 k i (kt , zt ) 1
c i (k i (kt , zt ), zt +1 )

Units of reporting.
Interpretation.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

36 / 92

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

37 / 92

The General Case


Most of previous argument can be easily generalized.

The set of equilibrium conditions of many DSGE models can be


written as (note recursive notation)
Et H(y , y 0 , x, x 0 ) = 0,
where yt is a ny
states.

1 vector of controls and xt is a nx

1 vector of

Dene n = nx + ny .
Then H maps R ny
Jess Fernndez-Villaverde (PENN)

R ny

R nx

R nx into R n .

Perturbation Methods

June 13, 2010

38 / 92

Partitioning the State Vector

The state vector xt can be partitioned as x = [x1 ; x2 ]t .


x1 is a (nx
x2 is a ne

ne )

1 vector of endogenous state variables.

1 vector of exogenous state variables.

Why do we want to partition the state vector?

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

39 / 92

Exogenous Stochastic Process


x20 = x2 + e e0
Process with 3 parts:
1

The deterministic component x2 :


1
2

The scaled innovation e e0 where:


1
2

is a ne ne matrix, with all eigenvalues with modulus less than one.


More general: x20 = (x2 ) + e e0 , where is a non-linear function
satisfying that all eigenvalues of its rst derivative evaluated at the
non-stochastic steady state lie within the unit circle.

e is a known ne ne matrix.
e is a ne 1 i.i.d innovation with bounded support, zero mean, and
variance/covariance matrix I .

The perturbation parameter .

We can accommodate very general structures of x2 through changes


in the denition of the state space: i.e. stochastic volatility.
Note we do not impose gaussianity.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

40 / 92

The Perturbation Parameter

The scalar

0 is the perturbation parameter.

If we set = 0 we have a deterministic model.

Important: there is only ONE perturbation parameter. The matrix e


takes account of relative sizes of dierent shocks.

Why bounded support? Samuelson (1970) and Jin and Judd (2002).

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

41 / 92

Solution of the Model


The solution to the model is of the form:
y = g (x; )
0

x = h (x; ) + e0
where g maps R nx

R + into R ny and h maps R nx

The matrix is of order nx

ne and is given by:


=

Jess Fernndez-Villaverde (PENN)

R + into R nx .

Perturbation Methods

June 13, 2010

42 / 92

Perturbation

We wish to nd a perturbation approximation of the functions g and


h around the non-stochastic steady state, xt = x and = 0.

We dene the non-stochastic steady state as vectors (x,


y ) such that:

H(y , y , x,
x ) = 0.

Note that y = g (x;


0) and x = h (x;
0). This is because, if = 0,
then Et H = H.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

43 / 92

Plugging-in the Proposed Solution


Substituting the proposed solution, we dene:

F (x; )

Et H(g (x; ), g (h (x; ) + e0 , ), x, h (x; ) + e0 ) = 0

Since F (x; ) = 0 for any values of x and , the derivatives of any


order of F must also be equal to zero.
Formally:
Fx k j (x; ) = 0

8x, , j, k,

where Fx k j (x, ) denotes the derivative of F with respect to x taken


k times and with respect to taken j times.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

44 / 92

First-Order Approximation
We are looking for approximations to g and h around (x, ) = (x,
0)
of the form:
g (x; ) = g (x;
0) + gx (x;
0)(x

x ) + g (x;
0)

h (x; ) = h (x;
0) + hx (x;
0)(x

x ) + h (x;
0)

As explained earlier,
g (x;
0) = y
and
h (x;
0) = x.

The remaining four unknown coe cients of the rst-order


approximation to g and h are found by using the fact that:
Fx (x;
0) = 0
and
F (x;
0) = 0
Before doing so, I need to introduce the tensor notation.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

45 / 92

Tensors
General trick from physics.
An nth -rank tensor in a m-dimensional space is an operator that has n
indices and mn components and obeys certain transformation rules.

[Hy ]i is the (i, ) element of the derivative of H with respect to y :


1
2

The derivative of H with respect to y is an n

ny matrix.

Thus, [Hy ]i is the element of this matrix located at the intersection of


the i-th row and -th column.
ny

n x H i g h
Thus, [Hy ]i [gx ] [hx ]j = =
1 =1 y x x j .

[Hy 0 y 0 ]i :
1

Hy 0 y 0 is a three dimensional array with n rows, ny columns, and ny


pages.
Then [Hy 0 y 0 ]i denotes the element of Hy 0 y 0 located at the
intersection of row i, column and page .

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

46 / 92

Solving the System I


gx and hx can be found as the solution to the system:

[Fx (x;
0)]ij = [Hy 0 ]i [gx ] [hx ]j + [Hy ]i [gx ]j + [Hx 0 ]i [hx ]j + [Hx ]ij =
i = 1, . . . , n; j, = 1, . . . , nx ; = 1, . . . , ny

Note that the derivatives of H evaluated at (y , y 0 , x, x 0 ) = (y , y , x,


x )
are known.
Then, we have a system of n nx quadratic equations in the n
unknowns given by the elements of gx and hx .

nx

We can solve with a standard quadratic matrix equation solver.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

47 / 92

Solving the System II


g and h are identied as the solution to the following n equations:

[F (x;
0)]i =
Et f[Hy 0 ]i [gx ] [h ] + [Hy 0 ]i [gx ] [ ] [e0 ] + [Hy 0 ]i [g ]

+[Hy ]i [g ] + [Hx 0 ]i [h ] + [Hx 0 ]i [ ] [e0 ] g

i = 1, . . . , n;

= 1, . . . , ny ;

= 1, . . . , nx ;

= 1, . . . , ne .

Then:

[F (x;
0)]i
= [Hy 0 ]i [gx ] [h ] + [Hy 0 ]i [g ] + [Hy ]i [g ] + [fx 0 ]i [h ] = 0;
i = 1, . . . , n;

= 1, . . . , ny ;

= 1, . . . , nx ;

= 1, . . . , ne .

Certainty equivalence: this equation is linear and homogeneous in g


and h . Thus, if a unique solution exists, it must satisfy:
h = 0/
g = 0
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

48 / 92

Second-Order Approximation I
The second-order approximations to g around (x; ) = (x;
0) is

[g (x; )]i

= [g (x;
0)]i + [gx (x;
0)]ia [(x x )]a + [g (x;
0)]i []
1
+ [gxx (x;
0)]iab [(x x )]a [(x x )]b
2
1
+ [gx (x;
0)]ia [(x x )]a [ ]
2
1
+ [gx (x;
0)]ia [(x x )]a []
2
1
0)]i [][]
+ [g (x;
2

where i = 1, . . . , ny , a, b = 1, . . . , nx , and j = 1, . . . , nx .

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

49 / 92

Second-Order Approximation II
The second-order approximations to h around (x; ) = (x;
0) is

[h(x; )]j

= [h(x;
0)]j + [hx (x;
0)]ja [(x x )]a + [h (x;
0)]j []
1
+ [hxx (x;
0)]jab [(x x )]a [(x x )]b
2
1
+ [hx (x;
0)]ja [(x x )]a []
2
1
+ [hx (x;
0)]ja [(x x )]a []
2
1
0)]j [][],
+ [h (x;
2

where i = 1, . . . , ny , a, b = 1, . . . , nx , and j = 1, . . . , nx .

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

50 / 92

Second-order Approximation III

The unknowns of these expansions are [gxx ]iab , [gx ]ia , [gx ]ia , [g ]i ,
[hxx ]jab , [hx ]ja , [hx ]ja , [h ]j .
These coe cients can be identied by taking the derivative of F (x; )
with respect to x and twice and evaluating them at (x; ) = (x;
0).
By the arguments provided earlier, these derivatives must be zero.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

51 / 92

Solving the System I


We use Fxx (x;
0) to identify gxx (x;
0) and hxx (x;
0):

[Fxx (x;
0)]ijk =
[Hy 0 y 0 ]i [gx ] [hx ]k + [Hy 0 y ]i [gx ]k + [Hy 0 x 0 ]i [hx ]k + [Hy 0 x ]ik [gx ] [hx ]j

+[Hy 0 ]i [gxx ] [hx ]k [hx ]j + [Hy 0 ]i [gx ] [hxx ]jk

+ [Hyy 0 ]i [gx ] [hx ]k + [Hyy ]i [gx ]k + [Hyx 0 ]i [hx ]k + [Hyx ]ik [gx ]j

+[Hy ]i [gxx ]jk

+ [Hx 0 y 0 ]i [gx ] [hx ]k + [Hx 0 y ]i [gx ]k + [Hx 0 x 0 ]i [hx ]k + [Hx 0 x ]ik [hx ]j

+[Hx 0 ]i [hxx ]jk

+[Hxy 0 ]ij [gx ] [hx ]k + [Hxy ]ij [gx ]k + [Hxx 0 ]ij [hx ]k + [Hxx ]ijk = 0;
i = 1, . . . n,

Jess Fernndez-Villaverde (PENN)

j, k, , = 1, . . . nx ;
Perturbation Methods

, = 1, . . . ny .
June 13, 2010

52 / 92

Solving the System II

We know the derivatives of H.


We also know the rst derivatives of g and h evaluated at
(y , y 0 , x, x 0 ) = (y , y , x,
x ).
Hence, the above expression represents a system of n nx nx linear
equations in then n nx nx unknowns elements of gxx and hxx .

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

53 / 92

Solving the System III


Similarly, g and h can be obtained by solving:

[F (x;
0)]i

= [Hy 0 ]i [gx ] [h ]
+[Hy 0 y 0 ]i [gx ] [ ] [gx ] [ ] [I ]

+[Hy 0 x 0 ]i [ ] [gx ] [ ] [I ]

+[Hy 0 ]i [gxx ] [ ] [ ] [I ] + [Hy 0 ]i [g ]

+[Hy ]i [g ] + [Hx 0 ]i [h ]
+[Hx 0 y 0 ]i [gx ] [ ] [ ] [I ]

+[Hx 0 x 0 ]i [ ] [ ] [I ] = 0;
i = 1, . . . , n; , = 1, . . . , ny ; , = 1, . . . , nx ; , = 1, . . . , ne

a system of n linear equations in the n unknowns given by the elements of


g and h .
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

54 / 92

Cross Derivatives
The cross derivatives gx and hx are zero when evaluated at (x,
0).
Why? Write the system Fx (x;
0) = 0 taking into account that all
terms containing either g or h are zero at (x,
0).
Then:

[Fx (x;
0)]ij = [Hy 0 ]i [gx ] [hx ]j + [Hy 0 ]i [gx ] [hx ]j +

[Hy ]i [gx ]j + [Hx 0 ]i [hx ]j = 0;

i = 1, . . . n;

= 1, . . . , ny ;

, , j = 1, . . . , nx .

This is a system of n nx equations in the n


the elements of gx and hx .

nx unknowns given by

The system is homogeneous in the unknowns.


Thus, if a unique solution exists, it is given by:
gx
hx
Jess Fernndez-Villaverde (PENN)

= 0
= 0

Perturbation Methods

June 13, 2010

55 / 92

Structure of the Solution


The perturbation solution of the model satises:
g (x;
0) = 0
h (x;
0) = 0
gx (x;
0) = 0
hx (x;
0) = 0
Standard deviation only appears in:
1
2

A constant term given by 12 g 2 for the control vector yt .


The rst nx ne elements of 21 h 2 .

Correction for risk.


Quadratic terms in endogenous state vector x1 .
Those terms capture non-linear behavior.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

56 / 92

Higher-Order Approximations
We can iterate this procedure as many times as we want.
We can obtain n-th order approximations.
Problems:
1

Existence of higher order derivatives (Santos, 1992).

Numerical instabilities.

Computational costs.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

57 / 92

Erik Eady
It is not the process of linearization that limits insight.
It is the nature of the state that we choose to linearize about.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

58 / 92

Change of Variables
We approximated our solution in levels.
We could have done it in logs.
Why stop there? Why not in powers of the state variables?
Judd (2002) has provided methods for changes of variables.
We apply and extend ideas to the stochastic neoclassical growth
model.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

59 / 92

A General Transformation
We look at solutions of the form:

c0

= a k

k0 + bz

k 0

k0

= c k

k0 + dz

Note that:
1

If , , and are 1, we get the linear representation.

As , and tend to zero, we get the loglinear approximation.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

60 / 92

Theory
The rst order solution can be written as
f (x ) ' f (a ) + (x

a ) f 0 (a )

Expand g (y ) = h (f (X (y ))) around b = Y (a), where X (y ) is the


inverse of Y (x ).
Then:
g (y ) = h (f (X (y ))) = g (b ) + g (b ) (Y (x )

b )

where g = hA fi A Xi comes from the application of the chain rule.


From this expression it is easy to see that if we have computed the
values of fi A , then it is straightforward to nd the value of g .
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

61 / 92

Coe cients Relation

Remember that the linear solution is:


k0

= a1 ( k
l0 ) = c1 ( k

k0

(l

k0 ) + b1 z
k0 ) + d1 z

Then we show that:

a3 = k0
c3 =

Jess Fernndez-Villaverde (PENN)

a1

1 1
k0 c1
l0

b3 = k0
d3 =

Perturbation Methods

b1
1
l0 d1

June 13, 2010

62 / 92

Finding the Parameters

Minimize over a grid the Euler Error.


Some optimal results

1
0.986534

Jess Fernndez-Villaverde (PENN)

Euler Equation Errors

SEE
1
1
0.0856279
0.991673 2.47856 0.0279944

Perturbation Methods

June 13, 2010

63 / 92

Sensitivity Analysis
Dierent parameter values.
Most interesting nding is when we change :
Optimal Parameters for dierent s

0.014 0.98140 0.98766 2.47753


0.028 1.04804 1.05265 1.73209
0.056 1.23753 1.22394 0.77869

A rst order approximation corrects for changes in variance!

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

64 / 92

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

65 / 92

A Quasi-Optimal Approximation
Sensitivity analysis reveals that for dierent parametrizations
'
This suggests the quasi-optimal approximation:
k 0

k0

= a3 k

k0 + b3 z

l0

= c3 k

k0 + d3 z

Note that if dene kb = k

Linear system:
1
2

k0 and bl = l

l0 we get:

kb0 = a3 kb + b3 z
bl = c3 kb + d3 z

Use for analytical study.


Use for estimation with a Kalman Filter.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

66 / 92

Perturbing the Value Function


We worked with the equilibrium conditions of the model.
Sometimes we may want to perform a perturbation on the value
function formulation of the problem.
Possible reasons:
1

Gain insight.

Di culty in using equilibrium conditions.

Evaluate welfare.

Initial guess for VFI.

Perturbation
Methods
June 13,
2010 we 67 / 92
More general point: we can
perturb
any operator problem
that

Jess Fernndez-Villaverde (PENN)

Basic Problem
Imagine that we have:
"

c
) t
+ Et V (kt +1 , zt +1 )
1

V (kt , zt ) = max (1
ct

s.t. ct + kt +1 = e zt kt + (1
zt = zt

+ t , t

) kt

N (0, 1)

Write it as:
"

V (kt , zt ; ) = max (1
ct

c
+ Et V (kt +1 , zt +1 ; )
) t
1

s.t. ct + kt +1 = e zt kt + (1
zt = zt

Jess Fernndez-Villaverde (PENN)

+ t , t

Perturbation Methods

) kt

N (0, 1)
June 13, 2010

68 / 92

Alternative
Another way to write the value function is:

max
ct

"

V (kt , zt ; ) =
1

(1 ) c1t +
Et V e zt kt + (1 ) kt ct , zt + t +1 ;

This form makes the dependences in the next period states explicit.

The solution of this problem is value function V (kt , zt ; ) and a


policy function for consumption c (kt , zt ; ).

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

69 / 92

Expanding the Value Function


The second-order Taylor approximation of the value function around the
deterministic steady state (kss , 0; 0) is:
V (kt , zt ; ) '

Vss + V1,ss (kt kss ) + V2,ss zt + V3,ss


1
1
1
+ V11,ss (kt kss )2 + V12,ss (kt kss ) zt + V13,ss (kt
2
2
2
1
1
1
+ V21,ss zt (kt kss ) + V22,ss zt2 + V23,ss zt
2
2
2
1
1
1
+ V31,ss (kt kss ) + V32,ss zt + V33,ss 2
2
2
2

kss )

where
Vss
Vi ,ss
Vij ,ss
Jess Fernndez-Villaverde (PENN)

= V (kss , 0; 0)
= Vi (kss , 0; 0) for i = f1, 2, 3g
= Vij (kss , 0; 0) for i, j = f1, 2, 3g
Perturbation Methods

June 13, 2010

70 / 92

Expanding the Value Function


By certainty equivalence, we will show below that:
V3,ss = V13,ss = V23,ss = 0

Taking advantage of the equality of cross-derivatives, and setting


= 1, which is just a normalization:
V (kt , zt ; 1) ' Vss + V1,ss (kt kss ) + V2,ss zt
1
1
+ V11,ss (kt kss )2 + V22,ss ztt2
2
2
1
+V12,ss (kt kss ) z + V33,ss
2
Note that V33,ss 6= 0, a dierence from the standard linear-quadratic
approximation to the utility functions.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

71 / 92

Expanding the Consumption Function


The policy function for consumption can be expanded as:
ct = c (kt , zt ; ) ' css + c1,ss (kt

kss ) + c2,ss zt + c3,ss

where:
c1,ss
c2,ss
c3,ss

= c1 (kss , 0; 0)
= c2 (kss , 0; 0)
= c3 (kss , 0; 0)

Since the rst derivatives of the consumption function only depend on


the rst and second derivatives of the value function, we must have
that c3,ss = 0 (precautionary consumption depends on the third
derivative of the value function, Kimball, 1990).

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

72 / 92

Linear Components of the Value Function


To nd the linear approximation to the value function, we take
derivatives of the value function with respect to controls (ct ), states
(kt , zt ), and the perturbation parameter .
Notation:
1

Vi ,t : derivative of the value function with respect to its i-th argument,


evaluated in (kt , zt ; ) .

Vi ,ss : derivative evaluated in the steady state, (kss , 0; 0).

We follow the same notation for higher-order (cross-) derivatives.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

73 / 92

Derivatives
Derivative with respect to ct :

(1

) ct

Et V1,t +1 = 0

Derivative with respect to kt :


V1,t = Et V1,t +1 e zt kt

+1

Derivative with respect to zt :


h
i
V2,t = Et V1,t +1 e zt kt + V2,t +1
Derivative with respect to :

V3,t = Et [V2,t +1 t +1 + V3,t +1 ]


In the last three derivatives, we apply the envelope theorem to
eliminate the derivatives of consumption with respect to kt , zt , and .
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

74 / 92

System of Equations I
Now, we have the system:
ct + kt +1 = e zt kt + (1
V (kt , zt ; ) = (1

(1

) ct

1
ct

) kt

+ Et V (kt +1 , zt +1 ; )

Et V1,t +1 = 0

V1,t = Et V1,t +1 e zt kt 1 + 1
h
i
V2,t = Et V1,t +1 e zt kt + V2,t +1
V3,t = Et [V2,t +1 t +1 + V3,t +1 ]
zt = zt

Jess Fernndez-Villaverde (PENN)

+ t

Perturbation Methods

June 13, 2010

75 / 92

System of Equations II
If we set = 0 and compute the steady state, we get a system of six
equations on six unknowns, css , kss , Vss , V1,ss , V2,ss , and V3,ss :
css + kss = kss
1

Vss = (1

(1

) css

css
+ Vss
1
V1,ss = 0

V1,ss = V1,ss kss 1 + 1


h
i
V2,ss = V1,ss kss + V2,ss
V3,ss = V3,ss

From the last equation: V3,ss = 0.


From the second equation: Vss =
From the third equation: V1,ss =
Jess Fernndez-Villaverde (PENN)

css
1 .
1

css .

Perturbation Methods

June 13, 2010

76 / 92

System of Equations III


After cancelling redundant terms:
css + kss = kss

Then:

1 = kss 1 + 1
h
i
V2,ss = V1,ss kss + V2,ss
1
kss =

1
1

1+

css = kss
kss
1
k c
V2,ss =
1 ss ss
V1,ss > 0 and V2,ss > 0, as predicted by theory.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

77 / 92

Quadratic Components of the Value Function


From the previous derivations, we have:

(1

) c (kt , zt ; )

Et V1,t +1 = 0

V1,t = Et V1,t +1 e zt kt 1 + 1
h
i
zt
V2,t = Et V1,t +1 e kt + V2,t +1
V3,t = Et [V2,t +1 t +1 + V3,t +1 ]

where:
kt +1 = e zt kt + (1
zt

= zt

) kt

+ t , t

c (kt , zt ; )

N (0, 1)

We will now take derivatives of each of the four equations with


respect to kt , zt , and .
We will take advantage of the equality of cross derivatives.
The envelope theorem does not hold anymore (we are taking
derivatives of the derivatives of the value function).
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

78 / 92

First Equation I
We have:

(1

) c (kt , zt ; )

Et V1,t +1 = 0

Derivative with respect to kt :


h

(1

) c (kt , zt ; )

Et V11,t +1 e zt kt
In steady state:
V11,ss

(1

) css

or

c1,t

c1,t

h
c1,ss = V11,ss kss

=0

+1

V11,ss

c1,ss =
V11,ss

(1

where we have used that 1 = kss


Jess Fernndez-Villaverde (PENN)

+1

Perturbation Methods

) css

+1

.
June 13, 2010

79 / 92

First Equation II
Derivative with respect to zt :

(1

) c (kt , zt ; )

Et V11,t +1 e zt kt

c2,t

c2,t + V12,t +1 = 0

In steady state:

(1

V11,ss

) css

c2,ss = V11,ss kt + V12,ss

or

c2,ss =
V11,ss

Jess Fernndez-Villaverde (PENN)

(1

) css

Perturbation Methods

V11,ss kss + V12,ss

June 13, 2010

80 / 92

First Equation III


Derivative with respect to :

(1

) c (kt , zt ; )

c3,t

Et ( V11,t +1 c3,t + V12,t +1 t +1 + V13,t +1 ) = 0


In steady state:
V11,ss

(1

) css

c3,ss = V13,ss

or

c3,ss =
V11,ss

Jess Fernndez-Villaverde (PENN)

(1

) css

Perturbation Methods

V13,ss

June 13, 2010

81 / 92

Second Equation I
We have:
V1,t = Et V1,t +1 e zt kt

Derivative with respect to kt :


"
V11,t +1 e zt kt 1 + 1
V11,t = Et
+V1,t +1 (

+1

e zt kt

c1,t

+1

1) e zt kt

In steady state:
V11,ss = V11,ss

c1,ss

+ V1,ss (

1) kss

or
V11,ss =

Jess Fernndez-Villaverde (PENN)

V1,ss (
+ c1,ss

Perturbation Methods

1) kss

June 13, 2010

82 / 92

Second Equation II
Derivative with respect to zt :
2
V11,t +1 e zt kt c2,t e zt kt 1 + 1
V12,t = Et 4
+V12,t +1 e zt kt 1 + 1 + V1,t +1 e zt kt
In steady state:

V12,ss = V11,ss kss


or
V12,ss =

Jess Fernndez-Villaverde (PENN)

1
1

c2,ss + V12,ss + V1,ss kt

V11,ss kss

Perturbation Methods

c2,ss + V1,ss kss

3
5

June 13, 2010

83 / 92

Second Equation III


Derivative with respect to :
V13,t = Et [ V11,t +1 c3,t + V12,t +1 t +1 + V13,t +1 ]
In steady state,
V13,ss
V13,ss

= [ V11,ss c3,ss + V13,ss ] )

V11,ss c3,ss
=
1

but since we know that:

c3,ss =
V11,ss

(1

) css

V13,ss

the two equations can only hold simultaneously if V13,ss = c3,ss = 0.


Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

84 / 92

Third Equation I
We have

h
i
V2,t = Et V1,t +1 e zt kt + V2,t +1

Derivative with respect to zt :


V11,t +1 e zt kt c2,t e zt kt + V12,t +1 e zt kt
+V1,t +1 e zt kt + V21,t +1 e zt kt c2,t + V22,t +1 2

V22,t = Et

In steady state:
V22,t
V22,ss

=
=

V11,ss kt c2,ss kss + V12,ss kss + V1,ss kss


+V21,ss kss c2,ss + V22,ss 2

1 2

V11,ss kt c2,ss kss + 2V12,ss kss


+V1,ss kss V12,ss c2,ss

where we have used V12,ss = V21,ss .


Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

85 / 92

Third Equation II

Derivative with respect to :


V23,t = Et

V11,t +1 e zt kt c3,t + V12,t +1 e zt kt t +1 + V13,t +1 e zt kt


V21,t +1 c3,t + V22,t +1 t +1 + V23,t +1

In steady state:
V23,ss = 0

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

86 / 92

Fourth Equation

We have
V3,t = Et [V2,t +1 t +1 + V3,t +1 ] .
Derivative with respect to :
V33,t = Et

V21,t +1 c3,t t +1 + V22,t +1 2 2t +1 + V23,t +1 t +1


V31,t +1 c3,t + V32,t +1 t +1 + V33,t +1

In steady state:
V33,ss =

Jess Fernndez-Villaverde (PENN)

V22,ss

Perturbation Methods

June 13, 2010

87 / 92

System I
V11,ss

c1,ss =
V11,ss

(1

) css

V11,ss kss + V12,ss


1
) css

V11,ss =
V1,ss ( 1) kss 2
1
1 + c1,ss
i
1 h
V12,ss =
c2,ss + V1,ss kss 1
V11,ss kss
1

V11,ss kt c2,ss kss + 2V12,ss kss


V22,ss =
2
+V1,ss kss V12,ss c2,ss
1

2 V22,ss
V33,ss =
1
c2,ss =

V11,ss

(1

plus c3,ss = V13,ss = V23,ss = 0.


Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

88 / 92

System II
This is a system of nonlinear equations.
However, it has a recursive structure.
By substituting variables that we already know, we can nd V11,ss .
Then, using this results and by plugging c2,ss , we have a system of
two equations, on two unknowns, V12,ss and V22,ss .
Once the system is solved, we can nd c1,ss , c2,ss , and V33,ss directly.

Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

89 / 92

The Welfare Cost of the Business Cycle


An advantage of performing the perturbation on the value function is
that we have evaluation of welfare readily available.
Note that at the deterministic steady state, we have:

1
V (kss , 0; ) ' Vss + V33,ss
2
Hence 12 V33,ss is a measure of the welfare cost of the business cycle.
Note that this quantity is not necessarily negative. Indeed, it may well
be positive in many models, like in a RBC with leisure choice. See
Cho and Cooley (2000).
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

90 / 92

Our Example
We know that Vss =

css
1 .

Then, we can compute the decrease in consumption that will make


the household indierent between consuming (1 ) css units per
period with certainty or ct units with uncertainty.
To do so, note that:
1

(1

(css (1
1

css
1
+ V33,ss
1 2

)1

= (1

1 css1

=1

Jess Fernndez-Villaverde (PENN)

1+

css

1
V
2 33,ss

Perturbation Methods

1
) V33,ss
2

or
1

))1

1
1

June 13, 2010

91 / 92

A Numerical Example
We pick standard parameter values by setting
= 0.99, = 2, = 0.0294, = 0.3, and = 0.95.
Then, we get:
V (kt , zt ; 1) '

0.54000 + 0.00295 (kt


0.00007 (kt
0.975082

kss )

kss ) + 0.11684zt
0.00985zt2

0.00225 (kt

c (kt , zt ; ) ' 1.85193 + 0.04220 (kt

kss ) zt

kss ) + 0.74318zt

DYNARE produces the same policy function by linearizing the


equilibrium conditions of the problem.
Also, the consumption equivalent of the welfare cost of the business
cycle is 8.8475e-005, even lower than Lucas(1987) original
computation because of the smoothing possibilities implied by the
presence of capital.
Use as an initial guess for VFI.
Jess Fernndez-Villaverde (PENN)

Perturbation Methods

June 13, 2010

92 / 92

You might also like