Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005....

27
Convergence Analysis of Rannacher Timestepping Becky Carter and Mike Giles [email protected] Oxford University Computing Laboratory Rannacher convergence analysis – p. 1/27

Transcript of Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005....

Page 1: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Convergence Analysisof Rannacher Timestepping

Becky Carter and Mike Giles

[email protected]

Oxford University Computing Laboratory

Rannacher convergence analysis – p. 1/27

Page 2: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

In option pricing, the Black-Scholes equation is

Ut + r S US + σ2S2USS = r U.

In the case of European options, this is to be solvedbackwards in time from final conditions U(S, T ) = P (S),where P (S) is the discounted option payoff.

What is sought are values for U(S0, 0), US(S0, 0) andUSS(S0, 0) at the current time t=0 and underlying assetprice S0.

Rannacher convergence analysis – p. 2/27

Page 3: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

Spatial discretisation leads to coupled o.d.e.’s

dUh

dt= LhUh

Crank-Nicolson time discretisation gives

Un+1h − Un

h = 12 k Lh

(Un+1

h + Unh

).

Backward Euler time discretisation with half-timestep:

Un+1h − Un

h = 12 k LhUn+1

h .

Rannacher (1984): replace first CN timestep by twohalf-timesteps of Backward Euler to recover second orderL2 convergence (h → 0, λ = k/h = const) for discontinuousinitial data.

Rannacher convergence analysis – p. 3/27

Page 4: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

0 0.5 1 1.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

S

V

Crank−Nicolson time−marching

numericalanalyticinitial data

0 0.5 1 1.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

S

V

Rannacher startup with 4 half−steps

numericalanalyticinitial data

Rannacher convergence analysis – p. 4/27

Page 5: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

0 0.5 1 1.50

0.2

0.4

0.6

0.8

1

S

∆ =

VS

Crank−Nicolson time−marching

numericalanalytic

0 0.5 1 1.50

0.2

0.4

0.6

0.8

1

S

∆ =

VS

Rannacher startup with 4 half−steps

numericalanalytic

Rannacher convergence analysis – p. 5/27

Page 6: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

0 0.5 1 1.5−3

−2

−1

0

1

2

3

4

5

S

Γ =

VS

S

Crank−Nicolson time−marching

numericalanalytic

0 0.5 1 1.5−3

−2

−1

0

1

2

3

4

5

S

Γ =

VS

S

Rannacher startup with 4 half−steps

numericalanalytic

Rannacher convergence analysis – p. 6/27

Page 7: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

101

102

103

10−8

10−6

10−4

10−2

1 / dS

max

err

or in

V

Crank−Nicolson time−marching

λ=2λ=3λ=4λ=5

101

102

103

10−8

10−6

10−4

10−2

1 / dS

max

err

or in

V

Rannacher startup with 4 half−steps

λ=2λ=3λ=4λ=5

Rannacher convergence analysis – p. 7/27

Page 8: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

101

102

103

10−6

10−4

10−2

100

1 / dS

max

err

or in

Crank−Nicolson time−marching

λ=2λ=3λ=4λ=5

101

102

103

10−6

10−4

10−2

100

1 / dS

max

err

or in

Rannacher startup with 4 half−steps

λ=2λ=3λ=4λ=5

Rannacher convergence analysis – p. 8/27

Page 9: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

101

102

103

10−5

10−3

10−1

101

1 / dS

max

err

or in

Γ

Crank−Nicolson time−marching

λ=2λ=3λ=4λ=5

101

102

103

10−5

10−3

10−1

101

1 / dS

max

err

or in

Γ

Rannacher startup with 4 half−steps

λ=2λ=3λ=4λ=5

Rannacher convergence analysis – p. 9/27

Page 10: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

But isn’t Crank-Nicolson a good method?

Error is O(h2+k2) for smooth initial data

L2 stability ensures convergence for initial data in C∞

(Lax equivalence theorem)

But this doesn’t include Dirac initial data, and we wantsecond order L∞ convergence

Objective: convergence analysis to understand

how many Backward Euler timesteps are needed torecover second order convergence

how to maximise accuracy for fixed computational cost.

Rannacher convergence analysis – p. 10/27

Page 11: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

Model problem:

∂u

∂t=

∂2u

∂x2, −∞ < x < ∞, 0 < t < 1

with initial data u(x, 0) = δ(x).

Discretisation on uniform grid:

dUj

dt=

k

h2δ2xUj ≡ k

h2

(Uj+1 − 2Uj + Uj−1

)

with initial data U0j = h−1δj,0.

Objective is to analyse error UNj − u(xj , 1) at time t = 1.

Rannacher convergence analysis – p. 11/27

Page 12: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

Numerical analysis is based on Fourier (von Neumann)analysis using the transform pair

Unj =

1

∫ π/h

−π/hUn(κh) eiκxj dκ,

Un(θ) = h∞∑

−∞

Unj e−iκxj = h

∞∑

−∞

Unj e−ijθ.

where θ = κh.

Note this gives initial Fourier data U0(θ) = 1.

Rannacher convergence analysis – p. 12/27

Page 13: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

−4 −2 0 2 4

−0.2

0

0.2

0.4

0.6

0.8

x

U

Crank−Nicolson time−marching

uU

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

θ / π

Fou

rier

ampl

itude

uU

−4 −2 0 2 4

−0.2

0

0.2

0.4

0.6

0.8

x

U

Rannacher startup with 4 half−steps

uU

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

θ / π

Fou

rier

ampl

itude

uU

Rannacher convergence analysis – p. 13/27

Page 14: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

−4 −2 0 2 4

−0.2

0

0.2

0.4

0.6

0.8

x

U

Crank−Nicolson time−marching

uU

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

θ / π

Fou

rier

ampl

itude

uU

−4 −2 0 2 4

−0.2

0

0.2

0.4

0.6

0.8

x

U

Rannacher startup with 4 half−steps

uU

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

θ / π

Fou

rier

ampl

itude

uU

Rannacher convergence analysis – p. 14/27

Page 15: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

100

101

102

10−6

10−5

10−4

10−3

10−2

10−1

1 / h

max

err

or

Crank−Nicolson time−marching

λ=0.4λ=0.35λ=0.3λ=0.25

100

101

102

10−6

10−5

10−4

10−3

10−2

10−1

1 / h

max

err

or

Rannacher startup with 4 half−steps

λ=0.4λ=0.35λ=0.3λ=0.25

Rannacher convergence analysis – p. 15/27

Page 16: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

The Fourier transform of the discrete equations gives

Un+1 =1 − 2d sin2 θ

2

1 + 2d sin2 θ2

Un, d =k

h2

for Crank-Nicolson, and

Un+1 =1

(1 + 2d sin2 θ2)2

Un

for two half-timesteps of Backward Euler, so

UN = zN1 (θ) zR

2 (θ), N ≥ R,

where R is the number of Crank-Nicolson timestepsreplaced by two half-timesteps of Backward Euler.

Rannacher convergence analysis – p. 16/27

Page 17: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

Proposition 0.1 (Low wavenumber region)

For |κ| < h−m, fixed m< 13 , as h → 0 with λ = k/h held fixed,

UN (κ) − u(κ, 1) ≈ h2 exp(−κ2)(

112κ4 − 1

12λ2κ6 + 14R λ2κ4

).

Proof standard asymptotic analysis. �

The inverse transform then gives the leading orderlow-wavenumber error

Elowj = h2

{1+3R λ2

48√

2N (4)

(xj√2

)+

λ2

96√

2N (6)

(xj√2

) }.

Rannacher convergence analysis – p. 17/27

Page 18: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

Proposition 0.2 (High wavenumber region)

For h−p < |κ|, fixed p> 12 , as h → 0 with λ = k/h held fixed,

UN ≈ (−1)N−R h2R

(2λ sin2 θ2)2R

exp

(1

λ2 sin2 θ2

)

Proof standard asymptotic analysis. �

Hence, the leading order high-wavenumber error is

Ehighj = (−1)N−R h2R−1 (2λ)−2R fj ,

where

fj =1

π

∫ π

0

cos jθ

sin4R θ2

exp

(1

λ2 sin2 θ2

)dθ.

Rannacher convergence analysis – p. 18/27

Page 19: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

fj is a maximum at j = 0, and for R = 0 one gets

f0 =1

π

∫ π

0exp

(1

λ2 sin2 θ2

)dθ = erfc

(λ−1

)

which approaches zero rapidly as λ → 0.

Proposition 0.3 (Intermediate region)For h−m < |κ| < h−p, as h → 0 with λ = k/h held fixed,UN (κ) = o(hq), for any q>0.

Rannacher convergence analysis – p. 19/27

Page 20: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

100

101

102

10−6

10−5

10−4

10−3

10−2

10−1

1 / h

max

err

or

Crank−Nicolson time−marching

error, λ=0.3low frequency errorhigh frequency error

100

101

102

10−6

10−5

10−4

10−3

10−2

10−1

1 / h

max

err

or

Rannacher startup with 4 half−steps

error, λ=0.3low frequency error

Rannacher convergence analysis – p. 20/27

Page 21: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Diffusion equation

Extensions:

addition of uniform convection

different Rannacher startup (e.g. replace first timestepfor four quarter-timesteps of Backward Euler)

non-unit diffusivity and terminal time, leads to keynon-dimensional parameter

λ =k

h

√ε

T

In Black-Scholes application this becomes

λ =k

h

√σ2K2

2T

based on local diffusivity at the strike. Rannacher convergence analysis – p. 21/27

Page 22: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

Conclusions from model problem:

For small values of λ, one appears to get second orderaccuracy on reasonable size grids.

For large values of λ, need at least three BackwardEuler steps to recover second order accuracy for Γ forEuropean call (four for digital call)

Final questions:

Is it better to use four quarter-timesteps of BackwardEuler, or four half-timesteps?

What is optimal value for λ – maximum accuracy forfixed computational cost?

Rannacher convergence analysis – p. 22/27

Page 23: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

Four half-timesteps adds four time as much lowwavenumber error as four quarter-timesteps– is it significant?

Computational cost C ∝ 1

hk=

1

h2λ

andError ≈ h2

(a + bλ2

)∝ C−1

(aλ−1 + bλ

)

so the optimum value for λ is

λopt =

√a

b

Rannacher convergence analysis – p. 23/27

Page 24: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

10−1

100

10−4

10−3

λ

max

err

or in

V

European call

CNRT2/2RT1/4

10−1

100

10−4

10−3

λ

max

err

or in

V

Digital call

CNRT2/2RT1/4

Rannacher convergence analysis – p. 24/27

Page 25: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

10−1

100

10−4

10−3

10−2

λ

max

err

or in

European call

CNRT2/2RT1/4

10−1

100

10−3

10−2

λ

max

err

or in

Digital call

CNRT2/2RT1/4

Rannacher convergence analysis – p. 25/27

Page 26: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

10−1

100

10−3

10−2

10−1

λ

max

err

or in

Γ

European call

CNRT2/2RT1/4

10−1

100

10−2

10−1

100

λ

max

err

or in

Γ

Digital call

CNRT2/2RT1/4

Rannacher convergence analysis – p. 26/27

Page 27: Convergence Analysis of Rannacher Timesteppingpeople.maths.ox.ac.uk/gilesm/talks/ini05.pdf · 2005. 12. 28. · Euler steps to recover second order accuracy for for European call

Black-Scholes equation

Final advice:

Replace first Crank-Nicolson timestep by four BackwardEuler quarter-timesteps;

Use λ ≈ 1 for optimal accuracy;

Don’t forget careful treatment of discontinuous initialdata (Forsyth 2002).

Future work: extension to 2D/3D incorporating Craig-Sneydcorrection for cross-derivatives due to correlations.

Rannacher convergence analysis – p. 27/27