lecture 19 - purdue university · 2014-04-03 · outline 1 finite di erence method 2 explicit...
Post on 31-May-2020
5 Views
Preview:
TRANSCRIPT
Lecture 19
Xiaoguang Wang
STAT 598W
April 3rd, 2014
(STAT 598W) Lecture 19 1 / 22
Outline
1 Finite Difference Method
2 Explicit MethodConvergence, Stability and Consistency
(STAT 598W) Lecture 19 2 / 22
Outline
1 Finite Difference Method
2 Explicit MethodConvergence, Stability and Consistency
(STAT 598W) Lecture 19 3 / 22
Interested PDE
Wilmott et al (1994)
Recall: we are interested in the numerical solution of the PDE:
∂V
∂t+
1
2σ2S2∂
2V
∂S2+ rS
∂V
∂S− rV = 0
V (T ,S) = Φ(S)
where V (t, s) is the price at time t of an European Call option.(stock price=s).
By using the change of variables:
S = K · ex t = T − τ/1
2σ2
V (S , t) = Ke−12(k2−1)x−( 14 (k2−1)
2+k1)τu(x , τ)
where k1 = k2 = r/12σ2.
(STAT 598W) Lecture 19 4 / 22
PDE: transformations
We can transform the PDE into a difussion equation:
∂u
∂τ=∂2u
∂x2
with initial and boundary conditions:
u(x , 0) = max(e12(k2+1)x − e
12(k2−1)x , 0)
limx→−∞
u(x , τ) = 0
limx→∞
u(x , τ) ∼ e12(k2+1)x+ 1
4(k2+1)2τ
(STAT 598W) Lecture 19 5 / 22
Simplified format of the problem
In general, suppose we have the following PDE:
∂u
∂τ=∂2u
∂x2
with conditions:
u(x , 0) = u0(x) limx→−∞
u(x , τ) = f (x , τ)
limx→∞
u(x , τ) = g(x , τ)
Then we use finite difference method to get the numeric solution ofthe PDE.
(STAT 598W) Lecture 19 6 / 22
Types of differences
The basic idea of finite-difference methods is to approximate the differentderivatives of the PDE by finite-differences. The derivative of a function fat a point x can be approximated by any of the following types ofdifferences:
Forward difference: ∆h,1f (x) = f (x+h)−f (x)h ;
Backward difference: ∆h,0f (x) = f (x)−f (x−h)h ;
Centered difference: ∆h,1/2f (x) = f (x+h)−f (x−h)2h ;
General difference:∆h,θf (x) = θ∆h,1f (x) + (1− θ)∆h,0f (x), 0 ≤ θ ≤ 1.
In terms of accuracy, both f ′(x)−∆h,1f (x) and f ′(x)−∆h,0f (x) areO(h) as h→ 0. However, the centered differences are more accurate since
f ′(x)−∆h,1/2f (x) = O(h2)
(STAT 598W) Lecture 19 7 / 22
Approximation for higher orders of derivatives
Note that, by iterating the finite-difference operators ∆, one can easilyconstruct approximations for higher order derivatives. For instance, thefinite-difference approximation of f ′′(x) using centered differences (withmesh h/2) will be:
f ′′(x) = ∆h/2,1/2(∆h/2,1/2f ) = ∆h/2,1/2
(f (x + h/2)− f (x − h/2)
h
)
=1
h
(f (x + h)− f (x)
h− f (x)− f (x − h)
h
)=
f (x + h)− 2f (x) + f (x − h)
h2
Question: what’s the accuracy of the approximation above?
(STAT 598W) Lecture 19 8 / 22
Finite Difference Equations
Once the types of finite-difference approximations have been selected, thenext step consists of approximating the derivatives of the PDE at thepoints of a regular lattice of the solution’s domain. For instance, considerthe head equation on R+ × R and the grid pointsGδt,δx := {(tm, xn)}n∈Z ,m∈N given by
xn = nδx , tm = mδt
where δt and δx are certain mesh parameters determined by the user.Then applying the forward differences in t and centered differences in x ,the solution u can be approximated by a function u : Gδt,δx → R on thelattice that is a solution of the finite-difference equations:
u(tm+1, xn)− u(tm, xn)
δt− u(tm, xn+1)− 2u(tm, xn) + u(tm, xn−1)
δx2= 0
u(0, xn) = Φ(xn)
(STAT 598W) Lecture 19 9 / 22
Finite Difference Equations
For simplicity, we write umn := u(tm, xn), then we get
um+1n = αum
n+1 + (1− 2α)umn + αum
n−1
for any m ≤ 1 and n ∈ Z , where α = δtδx2
. This is the so-called explicitmethod (forward method).In practice, we need to restrict our lattice Gδt,δx and maybe impose someboundary conditions. For instance, if we are only interested in finding thesolution u for t = T and x = x0, we can set δt = T/M, for some large M,and take a triangle-shaped lattice
tm = mδt, xn = x0 + nδx ,m = 0, · · · ,M, n = −(N −m), · · · , (N −m),
with a small mesh δx and a large enough N. In fact, taking N ≥ M willsuffice to determine u(T , x0) uniquely from the values of u at t = 0.
(STAT 598W) Lecture 19 10 / 22
Boundary Conditions
In most cases for derivative pricing, we will be interested in approximatingthe solution in a finite domain
Gδt,δx0 := {(tm, xn) : m = 0, · · · ,M, n = −N, · · · ,N},
and, thus, we will have to impose some conditions on the upper{tm, xN}Mm=0 and on the lower boundaries {tm, x−N}Mm=0. Such conditionsshould be consistent with the behavior of u(t, x) when x →∞ andx → −∞, respectively. There are two common types of boundaryconditions:
Dirichlet conditions: e.g.u(0, x) = Φ(x), u(t,∞) = β(t), u(t,−∞) = α(t), for some knownfunctions Φ, α, β.
Neumann conditions: e.g. ∂xu(t,∞) = β(t), ∂xu(t,−∞) = α(t), forsome known functions α and β.
(STAT 598W) Lecture 19 11 / 22
Summaries: general steps of finite-difference method
Domain discretization: Discretize time and space on a region ofinterest, say [t0, tN ]× [x−N , xN ], leading to a lattice
Gδt,δx0 = {(tm, xn)} determined by given mesh parameters δt and δxas follows:
xn = x0 + nδx , tm = t0 + mδt, n = −N, · · · ,N, m = 0, · · · ,M
Discretization of the differential equations: Approximate thederivatives of the PDE at each point of the lattice by some type finitedifference. The discretization process will result in a system offinite-difference equations that the approximating function u(tm, xn)have to satisfy.
Boundary conditions: Impose boundary conditions that, together withthe finite-difference equations of step 2, determines uniquely u(tm, xn)
in the lattice Gδt,δx0 .
Solving the finite-difference equations: Solve the system offinite-differences with the boundary conditions on the lattice points.
(STAT 598W) Lecture 19 12 / 22
Outline
1 Finite Difference Method
2 Explicit MethodConvergence, Stability and Consistency
(STAT 598W) Lecture 19 13 / 22
Explicit Method
We limit our discussion on the heat equation since most PDE we areinterested in can be further transformed into this simple format.
∂u
∂τ=∂2u
∂x2
with conditions:
u(0, x) = u0(x) limx→−∞
u(τ, x) = f (τ, x)
limx→∞
u(τ, x) = g(τ, x)
Then applying the forward differences in t and centered differences in x ,the solution u can be approximated by a function u : Gδt,δx → R on thelattice that is a solution of the finite-difference equations:
u(tm+1, xn)− u(tm, xn)
δt− u(tm, xn+1)− 2u(tm, xn) + u(tm, xn−1)
δx2= 0
u(0, xn) = Φ(xn)
(STAT 598W) Lecture 19 14 / 22
Explicit Method
This method is named as ”explicit” because we can solve the function uexplicitly:
um+1n = puum
n+1 + ps umn + pd um
n−1,
where
pu = pu =δt
(δx)2, ps = 1− 2
δt
(δx)2
Question: What are the conditions needed to make this method holdingnice properties such as consistency, stability?
(STAT 598W) Lecture 19 15 / 22
Outline
1 Finite Difference Method
2 Explicit MethodConvergence, Stability and Consistency
(STAT 598W) Lecture 19 16 / 22
Basic Concepts
Let L be the differential operator associated with the heat equation:
(Lu)(t, x) =∂u
∂t(t, x)− ∂2u
∂x2(t, x)
We can write the operator L in the following shorthand notation:
L =∂
∂t− ∂2
∂x2
Let Lδt,δx be a ”finite difference” operator on the lattice Gδt,δx :
(Lδt,δx u)(tm, xn)
=u(tm+1, xn)− u(tm, xn)
δt− u(tm, xn+1)− 2u(tm, xn) + u(tm, xn−1)
δx2
(STAT 598W) Lecture 19 17 / 22
Consistency
A finite-difference operator Lδt,δx is consistent for a differential operator Lif the finite difference approximation of a function u, which is Lδt,δxu,converges to Lu as the mesh parameters shrink to 0. Concretely, for anyfunction u in the domain of L and any bounded domainD = [0,T ]× [c , d ], we have
limδt,δx→0
sup(tm,xn)∈D
|(Lδt,δx u)(tm, xn)− (Lu)(tm, xn)| = 0,
where above u is the restriction of u on the lattice Gδt,δx . Note that theexplicit method is consistent since we have
(Lδt,δx u)(tm, xn)− (Lu)(tm, xn) = O(δt) + O((δx)2)
We say the that the discretization error of Lδt,δx is O(δt) + O((δx)2).
(STAT 598W) Lecture 19 18 / 22
Convergence and Stability
Definition
We say the approximation method is convergent on a given boundeddomain D := [0,T ]× [c , d ] if
limδt,δx
sup(tm,xn)∈D
|uδt,δx(tm, xn)− u(tm, xn)| = 0
Definition
We say that the finite-difference approximation is stable on a givenbounded domain D = [0,T ]× [c , d ] and for any ”nice” bounded Φ on[c, d ] (that is, supx∈[c,d ] |Φ(x)| <∞) if there exists a constant K <∞such that the solution uδt,δx satisfy
max(tm,xn)∈D
|uδt,δx(tm, xn)| ≤ K
for any δt > 0 and δx > 0 small enough.
(STAT 598W) Lecture 19 19 / 22
LAX Equivalence Theorem
Theorem
Let L be a differential operator defining a well-posed initial value problem
Lu(t, x) = 0, u(0, x) = Φ(x)
and let Lδt,δx be a linear and consistent finite-difference approximationoperator for L. Let uδt,δx be the solution of the finite difference equationsand let D = [0,T ]× [c , d ] be a given domain. Then it holds that
limδt,δx
sup(tm,xn)∈D
|uδt,δx(tm, xn)− u(tm, xn)| = 0
if and only if Lδt,δx is stable on the domain D.
Remark: The condition α := δt(δx)2
≤ 12 is a sufficient condition for the
finite-difference approximation in the explicit method to be stable.
(STAT 598W) Lecture 19 20 / 22
Performance of explicit method under round-off errors
We assume that there is a small error in our initial conditions as a result offinite-precision computer errors. We assume that
|u0n − u(0, xn)| ≤ η
for some precision bound η. Define umn := u(tm, xn) and um
n := umn − um
n .Moreover, let’s assume some small roundoff errors εmn :
um+1n − um
n
δt−
umn+1 − 2um
n + umn−1
δx2= εmn + εmn , |εmn | ≤ η
where |εmn | ≤ K1δt + K2δx2. Then finally we can show that
|umn | ≤ (T + 1)η + T (K1δt + K2δx2)
which will converge to zero as η → 0 and δt, δx → 0.
(STAT 598W) Lecture 19 21 / 22
Exercise
Implement the Finite-difference algorithm in order to price an EuropeanCall option with the following parameters:
S = 50
K = 50
r = 0.1
σ = 0.4
T = 0.4167
(STAT 598W) Lecture 19 22 / 22
top related