22
Finite Element Methods for Implementing the Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1 / 22

Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Finite Element Methods for Implementing theBlack-Scholes Pricing Model

Lianna Patterson Ware

Brown University

December 10, 2019

1 / 22

Page 2: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Overview

1 The Black-Scholes Model and Options Pricing

2 Finite Element Method (FEM)

3 The Continuous Problem

4 The Discrete Problem

5 MATLAB Implementation

6 Takeaways and Future Improvements

2 / 22

Page 3: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

The Black-Scholes Model and Options Pricing

The PDE:∂V

∂t+ rS

∂V

∂S+

1

2σ2S2∂

2V

∂2S− rV = 0 (1)

Parameters: V is the option price, r is the given risk-free interest rate, Sis the underlying asset price, σ is the given volatility or risk of theunderlying asset, and K is exercise price

3 / 22

Page 4: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

European Call Options

V (S ,T ) = max (S − K , 0)

Intrinsic Value of an European Call Option

Figure: European Call with Exercise Price = $60

We have the following boundary conditions for an European call option:

V (0, t) = 0,

∂V∂S (V∞, t) = 1, ∀t

4 / 22

Page 5: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Finite Element Method (FEM)

Goal:

to discretize space using FEM and to discretize time using a firstorder approximation

dividing the domain into smaller pieces and using locally validapproximations to generate an approximate solution

Linear Finite Element

Figure: ϕ0.5

5 / 22

Page 6: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Norms

1 Energy Norm∥∥u′ − u′h

∥∥2 L2 Norm

‖u − uh‖

6 / 22

Page 7: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Boundary Conditions

Dirichlet conditions:u(0) = u(1) = 0

Neumann conditions:u′(0) = u′(1) = 0

Robin conditions:

u(0) = u′(0), u(1) = −u′(1)

7 / 22

Page 8: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

The Continuous Problem

a1(x)u′′ + a2(x)u′ + a3(x)u = f (x) (2)

with boundary conditions:

α1u(a) + β1u′(a) = γ1

α2u(b) + β2u′(b) = γ2

where the type of boundary conditions depend on the values of theparameters: α1, α2, β1, andβ2

8 / 22

Page 9: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

The Model Problem

Let Ω = (0,1) and f ∈L2(Ω). In Ω :

−u′′ = f (3)

u(0) = u(1) = 0

Multiply by a test function, v , and integrate to get:

a(u, v) = F (v) ∀v ∈ V

where a(u, v) =∫

Ω u′v ′ and F (v) =∫

Ω fv , for all u, v ∈ V . This is theweak or variational formulation

9 / 22

Page 10: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Lax-Milgram Lemma

Let V be a Hilbert space and let a : VxV → R be a bilinear form andF : V → R be a linear form. Assume

1 a is bounded: | a(u, v) |≤ M ‖u‖V ‖v‖V ∀u, v ∈ V

2 F is bounded: there exists > 0 such that | F (v) |≤ Λ ‖v‖V ∀v ∈ V

3 a is V-elliptic: there exists α > 0 such that a(v , v) ≥ α ‖v‖2V ∀v ∈ V

Then, there exists a unique u ∈ V such that

a(u, v) = F (v) where ∀v ∈ V

This lemma shows that a variational formulation is well-posed.

10 / 22

Page 11: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Other Key Inequalities for FEM

1 Cauchy-Schwartz Lemma:Let (V , (·, ·)) be a pre-Hilbert space. Then,

| (u, v) |≤ ‖u‖V‖v‖

V∀u, v ∈ V

2 Friedrisch-Poincare Inequality:There exists c > 0, depending only on Ω, such that

‖v‖L2(Ω)≤ c ‖v ′‖

L2(Ω)∀v ∈ H1

0(Ω)

3 Trace Inequality:There exists c > 0, depending only on Ω = (a, b) such that

| v(a) |≤ c ‖v‖H1(Ω)

| v(b) |≤ c ‖v‖H1(Ω)

11 / 22

Page 12: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

The Discrete Problem

Instead of an infinitely dimensional space V , we use Vh, a finitedimensional space.

The domain, Vh, will be discretized to approximate the solution. Thisis the spatial discretization.

In a steady-state case of a problem, there is no time derivative toworry about.

12 / 22

Page 13: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Solving The Model Problem

1 Assemble matrices

2 Solve for RHS (independent of t?)

3 Invert to solve for ~u

13 / 22

Page 14: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Solving the Model Problem

∫Ω u′v ′ =

∫Ω fv , ∀v

h∈ V

h

which gives rise to a linear system of equations where uh

=∑n

j=1 ujϕj . We

get A~u = ~b where A = (∫

Ω ϕ′jϕ′i )ni ,j=1, ~b = (

∫Ω f ϕj)

nj=1

A =

2 −1 0 · · · 0

−1 2 −1. . .

...

0 −1 2. . . 0

.... . .

. . .. . . −1

0 · · · 0 −1 2

14 / 22

Page 15: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

1-D Evolution Problems

Evolution problems require the reintroduction of time discretizationsince we are no longer working in the steady-state case.

For our time discretization, we will use a first-order approximation.

The Heat equation:

ut = κuxx + f in Ωx [0,T ]

with conditions:

u(x , 0) = uo (x), x ∈ Ω

u(0, t) = u(1, t) = 0, t ∈ [0,T ]

Multiplying by a test function vh∈ V

h⊆ H1

0, we obtain:

(uh, v

h) + κ(u′

h, v ′

h) = (f , v

h) ∀v

h∈ V

h

15 / 22

Page 16: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Time Discretization and Linear Interpolation for the HeatEquation

We discretize time

0 = t0 < t1 < ... < tM

= T

and consider for θ ∈ [0, 1]

(um+1h− um

h

∆t, v

h) + κa(um+θ

h, v

h) = (f m+θ, v

h)

and

u0h

= πu0 , the grid points interpolation

Rearrange to obtain

um+θh

= (1− θ)umh

+ θum+1h

f m+θ = (1− θ)f (·, tm) + θf (·, tm+1)

16 / 22

Page 17: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Setting θ

We want to obtain the max of∥∥um+1

h

∥∥:

If 12 ≤ θ ≤ 1 , ie. where 2θ − 1 ≥ 0:∥∥um+1

h

∥∥ ≤ C∥∥um

h

∥∥+ ∆t∥∥f m−1

∥∥, 0 ≤ m ≤ M − 1

This scheme is unconditionally stable.

If 0 ≤ θ < 12 :

CFL condition : ∆t ≤ h2

6(1− 2θ)(1− ε) for some ε ∈ (0, 1)

This scheme is conditionally stable.

17 / 22

Page 18: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Setting θ

Explicit Scheme, θ = 0

Mum+1h

= (M − κ∆tS)umh

+ ∆tf m

M is very easy to invertyou need ∆t ≤ ch2

Implicit Scheme, θ = 1

(M + κS)um+1h

= Mumh

+ ∆tf m

unconditionally stableM + κS is hard to invert

Crank-Nicholson Scheme, θ = 12

unconditionally stablemore accurateM + κS

2 is hard to invert

18 / 22

Page 19: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

MATLAB Implementation

inputs:

x = the points on the mesh in omega, includes left endpoint but notright

n = number of interior points on the mesh

h = space between each point on the mesh

T = time of maturity of the option and at right endpoint; due tonature of pricing model T is actually the initial condition as time goesin reverse

R = value of the option at time T

θ = parameter of the theta-method, allows us to do a linearinterpolation between u at time n and u at time n+1, affects stabilityof approximation

19 / 22

Page 20: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Implementing Black-Scholes

The PDE:

∂u∂t + rx ∂u∂x + 1

2σ2x2 ∂2u

∂2x− ru = 0

where we define b(x) = rx and a(x) = 12σ

2x2.The variational formulation:

−∫ L

0uv −

∫ L

0(b − da

dx)∂u

∂xv +

∫ L

0a∂u

∂x

∂v

∂x+ r

∫ L

0uv = a(L)v(L)

where we define A =∫ L

0 (b − dadx )∂u∂x v and S =

∫ L0 a∂u∂x

∂v∂x

So we have:

−M~u(t)− A~u + S~u + rM~u = ~b(t)

but it turns out that the RHS is independent of t.

20 / 22

Page 21: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Takeaways and Future Improvements

an error estimate and rate of convergence functions in MATLAB forBlack-Scholes

To extend the model to European put option and American call andput options

To use a higher order of polynomial to approximate the model

To control the size of the condition numbercondition number = the ratio between largest and smallest eigenvalues1h2 ∼ condition number

To extend the model to 2-dimensional space, with a financialinterpretation that there are two underlying assets that are somehowrelated for an option

21 / 22

Page 22: Finite Element Methods for Implementing the Black-Scholes ... · Black-Scholes Pricing Model Lianna Patterson Ware Brown University December 10, 2019 1/22. Overview 1 The Black-Scholes

Thank you!

22 / 22