Академический Документы
Профессиональный Документы
Культура Документы
Lecture 1
Stochastic Dynamic Programming
Isaac Baley
UPF & Barcelona GSE
January 7, 2016
1 / 38
Introduction
References:
2 / 38
Roadmap
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
3 / 38
Sequence Problem (1): Setup
Subject to:
(control) yt Ge (xt , zt )
(state) xt+1 fe (xt , yt , zt )
(initial conditions) x0 , z0 given
zt is a stationary shock.
Z {z1 , z2 , ..., zN }
such that:
N
X
qji 0 and qji = 1 for any i = 1, ..., N
j=1
" #
X
t
max E0 U (xt , yt , zt )
{yt }
t=0
t=0
(control) yt Ge (xt , zt )
(state) xt+1 fe (xt , yt , zt )
(initial conditions) x0 , z0 given
Constraint sets:
I Ge (xt , zt ) constraint on admissible controls, for given states.
I fe (xt , yt , zt ) law of motion of the state.
7 / 38
Roadmap
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
8 / 38
Recursive Formulation (1): Principle of Optimality
I In an optimal policy, whatever the initial state and decision are, the
remaining decisions must be an optimal policy with regard to the state
resulting from the first decision.
Suppose xt+1 t=0
is a solution to the problem and V (x0 , z0 ) is finite.
9 / 38
Recursive Formulation (2): Bellman Equation
In period 1, the state variables are x1 and z1 , and the sequence xt+1 t=0
is
also optimal from period 1 onwards:
V (x0 , z0 ) = U (x0 , z0 , x1 ) + E0 [U (x1 , z1 , x2 ) + . . . ]
= U (x0 , z0 , x1 ) + E0 [V (x1 , z1 )]
I xt and zt are states and xt+1 is the vector of controls (tomorrows state)
I We usually assume that z is an exogenous first order stochastic process:
Et (zt+1 ) only depends on zt .
10 / 38
Recursive Formulation (3): Important Notes
xt+1 = (xt , zt )
12 / 38
Roadmap
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
13 / 38
Role of Uncertainty
Once we make sure the assumptions we need to solve the recursive problem
hold, then not much.
The expectation is just a weighed average of outcomes in different states:
( N
)
X
V (xt , zt ) = max U (xt , zt , xt+1 ) + pr [zt+1 = zj | zt ] V (xt+1 , zj )
xt+1 =(xt ,zt )
j=1
It is key the fact that the process is exogenous, and hence pr [zt+1 = zj | zt ]
is not affected by the control variable xt+1 . This implies that:
N
Et [V (xt+1 , zt+1 )] X V (xt+1 , zj ) V (xt+1 , zt+1 )
= pr [zt+1 = zj | zt ] = Et
xt+1 j=1
xt+1 xt+1
14 / 38
Roadmap
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
15 / 38
Contraction Mapping Theorem (1): Motivation
Bellman Equation can be written as map in value functions and policy rules.
For any function W , define the map T as:
V = T(V )
The Contraction Mapping Theorem ensures that you can find the fixed point
with an iterative procedure.
16 / 38
Contraction Mapping Theorem (2): Example
= T (V (Rat ct + yt ))
where the mapping is defined as:
T (W (a)) max u (c) + Et [W (Ra c + y )]
c
i.e. functions Tf1 (x) and Tf2 (x) are closer than f1 (x) and f2 (x).
Why is this useful? Consider a sequence of functions {fn (x)}
n=0 given as:
Theorem 1
Let (F, || ||) be a complete metric space and T a contraction mapping. Then it
has a unique fixed point, Tf = f .
Moreover, for any initial guess f0 , the sequence fn = Tfn1 will converge to f .
fn (x) n f (x)
Very useful in practice: take any arbitrary initial guess for V , iterate the
Bellman equation until convergence.
The key is to check that our Bellman equation is a contraction map!
19 / 38
Contraction Mapping Theorem (5): Blackwell Conditions
f1 (x) f2 (x) for all x = Tf1 (x) Tf2 (x) for all x
(B2) Discounting: There exists a [0, 1) such that, for any constant k
and any function f , we have:
T (f + k) Tf + k
20 / 38
Contraction Mapping Theorem (6): Bellman & Blackwell
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
22 / 38
Characterization (1): First Order Conditions
Bellman Equation:
Dx 0 U(x, z, x 0 ) + DE[V (x 0 , z 0 )] = 0
where D denotes the gradient and Dx 0 the gradient wrt the vector x 0 .
23 / 38
Characterization (2): Envelope Conditions
DE[V (x 0 , z 0 )] = E[DV (x 0 , z 0 )]
= Dx U(x, z, x 0 )
Dx 0 U(x, z, x 0 ) + E[DV (x 0 , z 0 )] = 0
The second term is the derivative we just computed with envelope condition,
but one period forward:
Substituting back:
25 / 38
Characterization (4): Transversality Condition
The Euler Equation establishes the optimality of the solution between two
contiguous periods (one period deviations from optimal policy are not
profitable).
26 / 38
Characterization (5): One-dimensional case
V (x, z) U(x, z, x 0 )
=
x x
27 / 38
Characterization (5): One-dimensional case (cont...)
V (x 0 , z 0 ) U(x 0 , z 0 , x 00 )
0
=
x x 0
U(x, z, x 0 ) U(x 0 , z 0 , x 00 )
= E
x 0 x 0
28 / 38
Characterization (5): One-dimensional case (cont...)
U(xT , zT , xT +1 )
T xT +1 = 0
xT +1
U(xT ,zT ,xT +1 )
I Either an interior solution is optimal xT +1 = 0 or we go to a
corner solution xT +1 = 0.
29 / 38
Characterization (6): Our previous example
Bellman:
V (a, y ) = max
0
u (Ra + y a0 ) + E [V (a0 , y 0 )]
a
FOC:
V (a0 , y 0 )
u(c)
= E
c a0
Envelope:
V (a, y ) u(c) V (a0 , y 0 ) u(c 0 )
=R =forward = R
a c a0 c 0
Euler = FOC + Forward Envelope
u(c 0 )
u(c)
= RE
c c 0
Transversality
u(ct )
lim t at = 0
t ct
30 / 38
Roadmap
1 Sequence Problem
2 Recursive Formulation
3 Role of Uncertainty
6 Solution Methods
31 / 38
Solution Methods
32 / 38
Guess and Verify (Undetermined Coefficients)
st : kt+1 = t kt ct , k0 , 0 given
log(t ) iid(0, 2 )
Bellman Equation:
33 / 38
Guess and Verify (Undetermined Coefficients)
Envelope condition:
V (kt , t ) t kt1
=
kt t kt kt+1
Forwarding by one period:
" #
1
V (kt+1 , t+1 ) t+1 kt+1
Et = Et k
kt+1 t+1 kt+1 t+2
34 / 38
Guess and Verify (Undetermined Coefficients)
35 / 38
Guess and Verify (Undetermined Coefficients)
Bellman Equation:
V (kt , t ) = max ln (t kt kt+1 ) + v1 + v2 log kt+1
kt+1
FOC:
1 v2 v2
+ =0 = kt+1 = t k
t kt kt+1 kt+1 1 + v2 t
Substitute the solution into the value function:
v2 v2
V (kt , t ) = ln t kt t kt + v1 + v2 log t k
1 + v2 1 + v2 t
Rearrange as follows (For homework verify this claim):
V (kt , t ) = constant + (1 + v2 ) ln (t kt )
and conclude that:
V (kt , t ) = constant + (1 + v2 ) ln kt + (1 + v2 ) ln t
| {z } | {z }
v2 v3
36 / 38
Guess and Verify (Undetermined Coefficients)
If the guess is right, then the following equations must have a solution
(1 + v2 ) = v2
1 + v2 = v3
log t = log t1 + t
Compute the optimal policy and the value function in this case.
How does the semi-elasticity of the value function with respect to change
with the persistence parameter ?
38 / 38