Finite Difference Methods For HJB PDEs
Finite Difference Methods For HJB PDEs
PDEs in Finance
Lecture given on June 2 2010 at the Fields Institute, Toronto
First version
Agnes Tourin,
Fields Institute, Immersion Fellowship
[email protected]
1 Introduction
In this lecture, I discuss the practical aspects of designing Finite Difference
methods for Hamilton-Jacobi-Bellman equations of parabolic type arising
in Quantitative Finance. The approach is based on the very powerful and
simple framework developed by Barles-Souganidis [3]. They prove very el-
egantly, using viscosity solutions techniques, the convergence of any consis-
tent, monotone and stable approximation scheme. The key property here
is the monotonicity which guarantees that the scheme satisfies the same
Ellipticity condition as the HJB operator. I will provide a number of exam-
ples of monotone schemes in these notes. In practice, pure Finite Difference
schemes are only useful in 1,2 or at most 3 spatial dimensions. One of their
merits is to be quite simple and easy to implement. They can also be com-
bined with Monte Carlo methods to solve nonlinear parabolic PDEs (see
[5]).
Such approximations are now fairly standard and you will find many
interesting examples available in the literature. For instance, I suggest the
articles on the subject by P. Forsyth (see [8], [6], [9] for instance). Finally,
for a basic introduction to Finite Difference methods for linear parabolic
PDEs, I recommend the book by J.W. Thomas [7].
1
where F is Elliptic
u v.
F (t, x, r, p, X) = inf {tr[a (t, x)X] b (t, x)p c (t, x)r f (t, x)}
A
where a = 21 T .
Typically, the set of control A is compact or finite, all the coefficients
in the equations are bounded and Lipschitz continuous in x, Holder with
coefficient 12 in t and all the bounds are independent of . Then the unique
viscosity solution u of (1) is a bounded and Lipschitz continuous function
and is the solution of the underlying stochastic control problem. The ideas,
concepts and techniques actually apply to a broader range of optimal control
problems. In particular, you can adapt the techniques to handle different
situations, even possibly treat some delicate singular control problems.
The aim is to build an approximation scheme which preserves the El-
lipticity. This discrete Ellipticity property is called monotonicity. The
monotonicity, together with the consistency of the scheme and some reg-
ularity ensure its convergence to the unique viscosity solution of the PDE
(1),(2). It is worth insisting on the fact that if the scheme is not monotone,
it may fail to converge to the correct solution (see [6] for an example)!
A numerical scheme is an equation of the following form
2
Monotonicity If u v,
S(h, t, x, r, u) S(h, t, x, r, v)
Consistency
For every smooth function (t, x),
Stability
For every h > 0, the scheme has a solution uh which is uniformly bounded
independently of h.
Theorem (Barles-Souganidis[3])
Under the above assumptions, if the scheme (3),(4) satisfy the consistency,
monotonicity and stability property, its solution uh converges locally uni-
formly to the unique viscosity solution of (1),(2).
3 First examples
3.1 The heat equation: the classic explicit and implicit schemes
First, let me recall the classic explicit and implicit schemes for the heat
equation and verify that these schemes satisfy the required properties.
Next consider the well-known linear heat equation whose treatment does
not require the machinery of viscosity solutions but falls into the scope
of this theory and provides the opportunity to understand the connection
between the theory for linear parabolic equations and the theory of viscosity
solutions. More precisely, our goal here is to verify that the standard finite
difference approximations for the heat equation are convergent in the Barles-
Souganidis sense.
The standard explicit scheme:
3
Since this scheme is explicit, it is very easy to compute at each time step n+1
the value of the approximation (un+1 i )i from the value of the approximation
at the time step n, namely (uni )i .
uni+1 + uni1 2uni
un+1
i = uni + t{ }
X 2
Note that here, we may define the scheme S by setting:
4
The truncation error for the approximation of the first derivative in time is
of order 1 only (for more details about computation of truncations errors,
see the book by Thomas [7]).
Furthermore, the approximation S is monotone if and only if S is decreas-
ing in uni , uni+1 and uni1 . First of all, it is unconditionally decreasing with
respect to both uni1 and uni+1 . Secondly, it is only decreasing in uni if the
following CFL condition is satisfied:
t
(1 + 2 )0
X 2
or equivalently
1
t X 2 .
2
The standard implicit scheme
For many financial applications, the explicit scheme turns out to be very
inaccurate because the CFL condition forces the time step to be so small
that the rounding error dominates the total computational error (computa-
tional error=rounding error+truncation error). Most of the time, an implicit
scheme is preferred because it is unconditionally convergent, regardless of
the size of the time step. We now evaluate the second derivative at time
(n + 1)t instead of time nt,
un+1
i uni un+1 n+1
i+1 + ui1 2ui
n+1
= .
t X 2
Implementing an algorithm allowing to compute the approximation is less
obvious here. This discrete equation may be converted into a linear system
of equations and the algorithm will then consist in inverting a tridiagonal
matrix. The truncation errors for smooth functions are the same as for the
explicit scheme and the consistency follows from this analysis.
We claim that for any choice of the time step, the implicit scheme is mono-
tone. In order to verify that claim, let us rewrite the implicit scheme using
the notation S:
5
3.2 The Black-Scholes-Merton PDE
The price of a European call u(t, x) satisfies the degenerate linear PDE
1
ut + ru 2 x2 uxx rxux = 0 in (0, T ] [0, x)
2
u(0, x) = (x K)+ .
un+1 n+1
i+1 ui
rxux rxi .
x
1
ut +u sup {((r rc )q (r rt )x)ux + 2 (xq)2 uxx }
|q|1 2
u(0, x) = max(x, 0)
where t is the time variable and x is a real number representing the wealth
in the trading account per unit of underlying stock. In this example, the
solution is no longer bounded but grows at most linearly at infinity. The
Barles-Souganidis [3] framework can be slightly modified to accommodate
the linear growth of the value function at infinity.
When the payoff is convex, it is easy to see that the optimal value for
q is either +1 or 1. When the payoff is no longer convex, the supremum
may be achieved inside the interval at q = x (rr c )ux
2 uxx
. For simplicity,
we consider only the convex case.
To simplify further , we focus on a simple case: we assume that rrt =
0 and r rc < 0. This equation is still fairly difficult to solve because
the approximation scheme depends on the control q:
6
1
ut +u max{(r rc )ux + 2 (x1)2 uxx ,
2
1 2 2
(r rc )ux + (x+1) uxx }
2
u(0, x) = max(x, 0)
One can easily construct an explicit monotone scheme by using the ap-
propriate forward or backward finite difference for the first partial derivative.
Often, this type of scheme is called upwind because you move along the
direction prescribed by the deterministic dynamics b(x, ) corresponding to
the optimal control and pick the corresponding neighbor. For instance,
for the passport option, the dynamics are
For q = 1, b (t, x) = q (r rc ) = (r rc ) < 0
For q = 1, b (t, x) = (r rc ) > 0
For q = 1, ux D uni
For q = 1, ux D+ uni
un+1 uni
i
+ uni max{
t
un uni1 1 2 un + uni1 2uni
(r rc ) i + (xi 1)2 i+1 ,
x 2 x2
un uni 1 un + uni1 2uni
(r rc ) i+1 + 2 (xi +1)2 i+1 } = 0.
x 2 x2
This scheme clearly satisfies the monotonicity assumption under the CFL
condition
1
t |rrc | 2 max{maxi {ix1}2 ,maxi {ix+1}2 }
.
+ x + x2
7
Approximating the first spatial derivative by the classic centered finite
un un
difference, i.e. ux i+12xi1 would not yield a monotone scheme here.
Note that this condition is very restrictive. First of all, as expected, t
has to be of order x2 . Furthermore, t also depends on the size of the
grid through the terms (ix 1)2 , (ix 1)2 and even approaches 0 as the
size of the domain goes to infinity. In this situation, we renounce using the
above explicit scheme and replace it by the fully implicit upwind scheme
which is unconditionally monotone.
un+1 uni
i
+ un+1
i max{
t
un+1 un+1 1 un+1 + un+1
i1 2ui
n+1
(r rc ) i i1
+ 2 (xi 1)2 i+1 ,
x 2 x2
un+1 un+1 1 un+1 + un+1
i1 2ui
n+1
(r rc ) i+1 i
+ 2 (xi +1)2 i+1 } = 0.
x 2 x2
Inverting the above scheme is challenging because it depends on the
control. This can be done using the classic iterative Howard algorithm which
we describe below in a general setting. However, it may be time-consuming
to compute the solution of a nonlinear Finite Difference scheme, i.e invert
an implicit scheme using an iterative method.
min{Ah un+1
h Bh unh } = 0.
Step 0: start with an initial value for the control 0 . Compute the solution
vh0 of Ah 0 w Bh0 unh = 0.
Step k k + 1: given vhk , find k+1 minimizing Ah vhk Bh unh . Then
compute the solution vhk+1 of Ah k+1 w Bh k+1 unh = 0.
Final step: if |vhk+1 vhk | < , then set un+1
h = vhk+1 .
8
instead of partial derivatives can be extremely useful. For example, in two
spatial dimensions, a naive discretization of the partial derivative vxy may
fail to be monotone. In fact, approximating second-order operators with
crossed derivatives in a monotone way is not easy. You actually need to be
able to interpret you second-order term as a directional derivative (of a linear
combination of directional derivatives) and approximate each directional
derivative by the adequate Finite Difference. In other words, you need to
move in the right direction in order to preserve the Elliptic structure of
the operator.
Here is for instance a naive approximation of vxy (assume x = y):
vi+1,j+1 + vi1,j1 vi+1,j1 vi1,j+1
vxy .
4x2
It is consistent but clearly not monotone (the terms vi1,j+1 , vi+1,j1 have
the wrong sign).
Instead, let us look at the second-order derivative:
In practice, if the points x+x, xx are not on the grid, you need to
estimate the value of v at these points by simple linear interpolation between
2 grid points. Of course, you have to make sure that the interpolation
procedure preserves the monotonicity of the approximation.
Comments:
9
In all the above examples, I only consider the immediate neighbors of
a given point ((n + 1)t, ix), namely (nt, ix), (nt, (i 1)x),
(nt, (i + 1)x), ((n + 1)t, (i 1)x and (n + 1)t, (i + 1)x).
Sometimes, it is worth considering a larger neighborhood and picking
neighbors located further away from ((n+1)t, ix). It is particularly
useful for the discretization of a transport term with a high speed,
when information travels fast.
10
max(ut uxx , u (t, x)) = 0 in (0, T ] IR (7)
u(0, x) = u0 (x). (8)
and set
1
un+ 2 (x) = w((n + 1)t, x)
Step 2
1
un+1 (x) = inf(un+ 2 (x), ((n + 1)t, x))
It is quite simple to prove the convergence of a splitting method using
the Barles-Souganidis framework. There are many VI arising in Quanti-
tative Finance, in particular in presence of singular controls and splitting
methods are extremely useful for this type of HJB equations. We refer to
the guest lecture by H. M. Soner for an introduction to singular control and
its applications.
References
[1] G. Barles, C. Daher, and M. Romano. Convergence of numerical schemes
for parabolic equations arising in finance theory. Math. Models Methods
Appl. Sci., 5:125143, 1995.
[2] G. Barles and E. R. Jakobsen. Error bounds for monotone approxima-
tion schemes for parabolic Hamilton-Jacobi-Bellman equations. Math.
Comp., 76:18611893, 2007.
[3] G. Barles and P. E. Souganidis. Convergence of approximation schemes
for fully nonlinear second order equations. Asymptot. Anal., 4:271283,
1991.
[4] F. Bonnans and H. Zidani. Consistency of generalized finite difference
schemes for the stochastic HJB equation. Siam J. Numerical Analysis,
41:10081021, 2003.
11
[5] A. Fahim, N. Touzi, and X. Warin. A probabilistic numerical method
for fully nonlinear parabolic PDEs. Preprint.
12