exponential fitting, finite volume and box methods …356530/fulltext01.pdfexponential fitting,...

69
Technical report, IDE1024 , September 17, 2010 Master’s Thesis in Financial Mathematics Dmitry Shcherbakov and Sylwia Szwaczkiewicz School of Information Science, Computer and Electrical Engineering Halmstad University Exponential Fitting, Finite Volume and Box Methods in Option Pricing

Upload: others

Post on 18-Jun-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Technical report, IDE1024 , September 17, 2010

Master’s Thesis in Financial Mathematics

Dmitry Shcherbakov and Sylwia Szwaczkiewicz

School of Information Science, Computer and Electrical EngineeringHalmstad University

Exponential Fitting, FiniteVolume and Box Methods in

Option Pricing

Page 2: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz
Page 3: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Exponential Fitting, Finite Volume andBox Methods in Option Pricing

Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Halmstad University

Project Report IDE1024

Master's thesis in Financial Mathematics, 15 ECTS credits

Supervisor: Prof. Dr. Matthias Ehrhardt

Examiner: Prof. Dr. Ljudmila A. Bordag

External referees: Prof. Dr. Vladimir Roubtsov

September 17, 2010

Department of Mathematics, Physics and Electrical engineeringSchool of Information Science, Computer and Electrical Engineering

Halmstad University

Page 4: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz
Page 5: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Preface

First, we would like to especially thank our supervisor Prof. Dr. MatthiasEhrhardt for his strong support, in particular for his conscientious help duringtwo weeks in Germany.

Moreover, we wish to thank to the director of our master program Prof.Dr. Ljudmila A. Bordag and all other lectures from Halmstad University fortheir eorts and interesting lectures during the year. We are grateful that wecould participate in Master's Programme in Financial Mathematics, it wasfor us an amazing and unforgettable experience. We make also gratitudesfor our external referee Vladimir Roubtsov.

Finally we would like to mention our families, without whose support wewould not be here.

Page 6: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

ii

Page 7: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Abstract

In this thesis we focus mainly on special nite dierences and nite vol-

ume methods and apply them to the pricing of barrier options. The

structure of this work is the following: in Chapter 1 we introduce the

denitions of options and illustrate some properties of vanilla European

options and exotic options. Chapter 2 describes a classical model used

in the nancial world, the Black-Scholes model. We derive the Black-

Scholes formula and show how stochastic dierential equations model

nancial instruments prices. The aim of this chapter is also to present

the initial boundary value problem and the maximum principle. We

discuss boundary conditions such as: the rst boundary value problem,

also called Dirichlet problem that occur in pricing of barrier options and

European options. Some kinds of put options lead to the study of a

second boundary value problem (Neumann, Robin problem), while the

Cauchy problem is associated with one-factor European and American

options. Chapter 3 is about nite dierences methods such as theta,

explicit, implicit and Crank-Nicolson method, which are used for solving

partial dierential equations. The exponentially tted scheme is pre-

sented in Chapter 4. It is one of the new classes of a robust dierence

scheme that is stable, has good convergence and does not produce spuri-

ous oscillations. The stability is also advantage of the box method that

is presented in Chapter 5. In the beginning of the Chapter 6 we illustrate

barrier options and then we consider a novel nite volume discretization

for a pricing the above options. Chapter 7 describes discretization of the

Black-Scholes equation by the tted nite volume scheme. In Chapter

8 we present and describe numerical results obtained by using the nite

dierence methods illustrated in the previous chapters.

iii

Page 8: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

iv

Page 9: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Contents

1 Introduction 1

2 The Black-Scholes Model 52.1 The Black-Scholes Formula . . . . . . . . . . . . . . . . . . . . 62.2 An Initial Boundary Value Problem . . . . . . . . . . . . . . . 72.3 The Maximum Principle . . . . . . . . . . . . . . . . . . . . . 10

3 Finite Dierence Methods 133.1 Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2 The classical nite dierence methods . . . . . . . . . . . . . . 13

3.2.1 The theta Method . . . . . . . . . . . . . . . . . . . . 163.2.2 The Explicit Method . . . . . . . . . . . . . . . . . . . 173.2.3 The Implicit Method . . . . . . . . . . . . . . . . . . . 183.2.4 The Crank-Nicolson Method . . . . . . . . . . . . . . . 19

4 The Exponentially Fitted Scheme 21

5 The Box Method 27

6 The Finite Volume Discretization For Path Dependent Op-tions 31

7 The Fitted Finite Volume Scheme 35

8 Numerical results 39

9 Conclusions and Outlook 49

Bibliography 51

Appendix 53

v

Page 10: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

vi

Page 11: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 1

Introduction

In the last 20 years derivatives become very important in the world of Fi-nance. Futures and option contracts are traded on specialized exchangesthroughout the world and its signicance is evident. Hull [1] dened a deriva-tive as a nancial instrument whose value depends on the values of other,more basic underlying variables. For example, it depends on the prices ofthe traded assets. They are instruments to assist and regulate agreementson transactions of the future.

A derivatives exchange is a market where individuals trade standardizedcontracts that can be dened by the exchange.

A future and forward contract is an agreements between two parties tobuy or sell an asset at a certain time in the futere for a certain price. Eachof the parties makes a binding engagement; it is impossible to change laterthis contract. Unlike forwards, futures are traded on exchanges and moreformalized.

Contrary, an option gives the holder the right (not the obligation) to buyor sell a risky asset in the future at a previously agreed price. It is a contractbetween two parties (writer and holder) about trading the asset at a certainfuture time. The writer xes the terms of the option contract and sells theoption and the holder purchases the option and pays the market price (pre-mium). Depending on the market situation the holder has to decide what todo with the rights of the option.

Options have a limited life time. At the maturity date T the rights of theholder expire and for later times t > T the contract is worthless. The priceof the option contract K is called strike (exercise) price.

1

Page 12: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

2 Chapter 1. Introduction

There are two basic types of options

• The call option gives the holder the right to buy the underlying assetfor a xed price K by the maturity date T .

• The put option gives the holder the right to sell the underlying assetfor a xed price K by the maturity date T .

Option contracts can be of European or American type

• The European option can be exercised only at expiry.

• American options can be exercised at any time before expiry.

Consequently, American options are more exible and more valuable thanEuropean ones. This is the reason why options on stocks are mostly of Amer-ican style. For an American option, mostly there exist no explicit formulasand hence numerical solution techniques are required.

Two sides to every option contract exist. One side is the investor whotakes the long position (buy the option). On the other side the investor whotakes the short position (sell the option). The writer of an option obtain cashup front, has later some potential money obligations [3]. The writer's gainor loss is the opposite of that for the buyer of the option. There exist fourtypes of option positions:

• A long position in a call option,

• A long position in a put option,

• A short position in a call option,

• A short position in a put option.

The value of the option V = V (S, t) depends on the price of the underlyingasset S and the time t. The nal condition for V (S, T ) is called payofunction:

• for a call option

VC(S, T ) = max S(T )−K, 0 = (S(T )−K)+, (1.1a)

• for a put option

VP (S, T ) = max K − S(T ), 0 = (K − S(T ))+. (1.1b)

Page 13: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 3

The value of the option also depends on other factors. The dependenceon the strike price K and the maturity T is obvious. Market parametersaecting the price are the risk-free interest rate r, the volatility σ of theprice St, and the dividend yield D if the asset pays dividends. The volatilityparameter σ can be identied as a standard deviation in St, for scaling dividedby the square root of the observed time period. The larger the uctuations,represented by large values of σ, the harder it is to predict a future value ofthe asset. Hence the volatility is a standard measure of risk. The dependenceof V on σ is highly sensitive [2].

The standart notation for pricing options are following

current stock price Ststrike price Ktime to expiration (maturity) Tvolatility of the stock price σrisk-free interest rate rcontinuous dividends (dividend paying asset ) D

The options are called plain vanilla options, if they depend on one underlying,and their payos are given by (1.1a) and (1.1b) with S evaluated at thecurrent time moment. All other options are called exotic. One of the maindierence between exotic and vanilla options lies in the payo or in theincreasing of the dimension, from a singe-factor to a multifactor option. Theexotic options are harder to price and can be very model dependent. Thereare six main features to classify exotic options [3]:

• Time dependence

It means that, for example, early exercise might only be permittedon specied dates or during xed periods. Such options are calledBermudan options.

• Cashows

The value of the option depends on an amount of the cashows. If gdenotes the amount of money that the contract pays at time t0 and thevalue of the option V (t) just before t−0 and just after t+0 the cashow,then arbitrage considerations lead to

V (t+0 ) = V (t−0 ) + g.

This is a so-called jump condition.

Page 14: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

4 Chapter 1. Introduction

• Path dependence

A lot of options have payos that depend on the path of the asset price,and not only on the value of the asset at expiration. There are two typeof path dependence

Weak path dependency

This means that the option depends only on the asset price in thepast and time. The simplest example is a barrier option. Barrieroptions become worth (knock-in options) or worthless (knock-outoptions) when the asset price reaches some setting level (barrier).

Strong path dependency

In that case we have to keep track of another variable and thepayos depend on the properties of the asset price path in addi-tion to the value of the underlying at the present moment. Forexample, Asian options have a payo that depends on the averagevalue of the underlying asset.

• Dimensionality

It refers to number of the underlying independent variables. For ex-ample, a three-dimensional problem can be represented by the strongpath-dependence. In other case, the option contract depends on someanother underlying asset.

• Order

Higher order options are options whose payo is a contingent on thevalue of another option. For example, compound options (a option givesthe right to buy another option)

• Embedded decisions

Holder and writer can make decisions during the life of the contract.This assumes to have the possibility to early exercise like, for example,American style option.

In order to obtain the fair value of the option we need to use a mathe-matical model of the market, that can serve as an approximation of thenancial world.

Page 15: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 2

The Black-Scholes Model

In 1973 Fischer Black and Myron Scholes published in their paper "ThePricing of Options and Corporate Liabilities" a new model that is knownas the Black-Scholes (BS) partial dierential equation (PDE) and is usedin nancial markets to price dierent kinds of options. As Gutowska [8]describes, the Black-Scholes model assumes that the nancial market consistsof shares and risk-free nancial instruments (bonds, bank account). Buyingand selling these instruments is a continuous process, meaning that theirprices processes can be modeled by stochastic dierential equations (SDE)in the case of a risk instrument or by ordinary dierential equations (ODE) inthe case of a risk-free instrument. A share price, which does not pay dividendsis modeled by a geometric Brownian motion (GBM), which is written in theform of the following SDE [8]:

dSt = µStdt+ σStdWt, (2.1)

where

St represent the stock price in time t,µ > 0 the drift rate of the stock (constant),σ > 0 is the volatility of the stock (constant),dWt is a stochastic dierential, this means a variable with normal distribu-tion.

The process of a risk-free price of an instrument is described as an ODE

dBt = rBtdt, (2.2)

where

5

Page 16: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

6 Chapter 2. The Black-Scholes Model

Bt represent the risk-free instrument price in time t,r is a short-term riskless interest rate.

The main assumptions in the Black-Scholes model exclude the arbitrageopportunity.

2.1 The Black-Scholes Formula

This section is based on the work of Gutowska [8]. Let V (St, t) denote avalue of an option in time t when the asset price is St. Assume that V (St, t)is a continuous and a dierentiable function with respect to St and t, whereSt is a GBM process.

Lemma 1 (Ito) [2]Suppose Xt follows an Ito process, dXt = a(Xt, t)dt + b(Xt, t)dWt, and let

g(x, t) be a C2,1 smooth function (with continuous ∂g∂x, ∂2g∂x2

, ∂g∂t). Then Yt :=

g(Xt, t) follows an Ito process with the same Wiener process Wt

dYt =

(∂g

∂t+ a

∂g

∂x+

1

2b2 ∂

2g

∂x2

)dt+ b

∂g

∂xdWt (2.3)

where the derivatives of g as well as the coecient functions a and b ingeneral depend on the arguments (Xt, t).

Then, according to Ito 's Lemma

dV = (µS∂V

∂S+∂V

∂t+

1

2σ2S2∂

2V

∂S2)dt+ σS

∂V

∂SdW. (2.4)

Now let Πt be a value of the portfolio in time t, i.e.

Πt = V (St, t)−∆tSt, (2.5)

where ∆ := ∂V∂S. The change of the portfolio value between times t and t+dt

is given bydΠt = dV (St, t)−∆tdSt. (2.6)

By the substitution of (2.1) and (2.4) to equation (2.6) we obtain

dΠt =

(∂V

∂t+

1

2σ2S2∂

2V

∂S2

)dt. (2.7)

Page 17: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 7

Assuming that, there is no arbitrage opportunity, the rate of return on theportfolio must be equal to the rate of return on the risk-free instrument, whatis written as

rΠtdt = dΠt =

(∂V

∂t+

1

2σ2S2∂

2V

∂S2

)dt. (2.8)

Finally, after substituting (2.5) and ∆ = ∂V∂S

in (2.8) we obtain the so-calledBlack-Scholes equation

∂V

∂t+

1

2σ2S2∂

2V

∂S2+ rS

∂V

∂S− rV = 0. (2.9)

Solving the above PDE backward in time with the nal pay-o condition andwith appropriate boundary conditions we obtain the price V (St, t), [8].

We obtain for an european call option the following formula

VC(St, t) = StN(d1)− e−r(T−t)KN(d2), (2.10)

and for an european put option

VP (St, t) = −StN(−d1) + e−r(T−t)KN(−d2), (2.11)

where

d1 =lnStK

+(r+ 12σ2)(T−t)

σ√T−t ,

d2 =lnStK

+(r− 12σ2)(T−t)

σ√T−t = d1 − σ(T − t), where

N denotes the Normal distribution,

K denotes the strike price.

To obtain an unique solution we should use the suitable boundary condi-tions. The next section is devoted to this problem.

2.2 An Initial Boundary Value Problem

Let us consider the following general PDE of a second order, [5],

∂u

∂τ=

n∑i,j=1

aij(x, τ)∂2u

∂xi∂xj+

n∑j=1

bj(x, τ)∂u

∂xj+ c(x, τ)u− f(x, τ), (2.12)

Page 18: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

8 Chapter 2. The Black-Scholes Model

wheref , aij, bj and c are real functions and they take nite values,x is a point in the n-dimensional space, x ∈ Rn,τ is a positive variable representing time.

We will focus on the one-dimensional case. Setting n = 1 the equation(2.12) covers the case of the well-known Black-Scholes equation

∂V

∂τ=

1

2σ2S2∂

2V

∂S2+ (r −D)S

∂V

∂S− rV, (2.13)

where we have employed in (2.9) a time-reversal τ := T − t. Comparing(2.13) and (2.9) we can see that in (2.13), there is a new value. This is avalue D that denotes the continuous dividend yield. Now let us consider thefollowing equation

∂V

∂τ=

1

2

n∑i,j=1

ρijσiσjSiSj∂2V

∂Si∂Sj+

n∑j=1

(r −Dj)Sj∂V

∂Sj− rV. (2.14)

This equation models a multi-asset environment and is obtained by general-ization of (2.13), whereσi represent the volatility of the ith asset,ρij represent the correlation between assets i and j.

Let us focus on the sequel of equation (2.12). We have to supply (2.12)with an initial condition and boundary conditions. The three types of bound-ary conditions are [5]

1. The rst boundary value problem (Dirichlet problem)

The domain of the rst boundary value problem is D = Ω × (0, T )where Ω is a bounded subset of Rn and T is a positive number. Thesolution should satisfy the following conditions

• u|t=0 = ϕ(x) (initial condition),

• u|Γ = ψ(x, t) (boundary condition), x ∈ Γ,

where Γ denotes the boundary of Ω, i.e. Γ = ∂Ω. Such boundary con-ditions are used during modeling single and double barrier options inthe one-factor case and during modeling of an European option. Theyare called Dirichlet boundary conditions.

Page 19: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 9

2. The second boundary value problem (Neumann, Robin problem)

The second boundary value problem is very similar to the previous oneand also the initial condition is the same, just the boundary conditionis changed

• u|t=0 = ϕ(x) (initial condition),

• (∂u∂η

+ a(x, t)u)|Γ = ψ(x, t) (boundary condition), x ∈ Γ,

∂u∂η

is the derivative of u with respect to η at Γ,η represent unit outward normal,a(x, t) and ψ(x, t) are given functions of x and t.

The special case for above boundary condition is when a ≡ 0 andthan such boundary condition is called the Neumann boundary condi-tion. This arise in modeling of certain kinds of put options.

3. The Cauchy problem

In this case the solution for (2.12) is dened by the following condi-tion

u|t=0 = ϕ(x) (initial condition)

whereu(x, t) is a function which satises (2.12) in Rn × (0, T ) and satisesabove initial condition,ϕ(x) is a given continuous function.

Furthermore, u(x, t) satises the above initial condition and (2.12).Also, here we have a special case which arise in the modeling of theone-factor European and American options.Let us consider the European Call. For an option VC = C(S, τ) theinitial condition at τ = 0 reads

VC(S, 0) = max(S −K, 0),

where S denote the underlying asset price and K is the strike price.The boundary conditions are the following

S = 0, VC(0, τ) = 0,S → +∞, VC(S → +∞, τ) = S.

Page 20: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

10 Chapter 2. The Black-Scholes Model

For the European put option the initial condition is

VP (S, 0) = max(K − S, 0).

The boundary conditions are the following

S = 0, VP (0, τ) = Ke−rτ ,S → +∞, VP (S → +∞, τ) = 0,

wherer is risk-free interest rate,τ is current time, for the forward-in-time BS equation (2.13)T is the maturity time.

2.3 The Maximum Principle

In this section we describe the continuous maximum principles for a parabolictype of PDE. The main purpose of this principle is to show conditions thatare needed that solutions to (2.13) remain positive if the initial and boundaryconditions are positive.

Let D = Ω × (0, T ) and D is closure of D. The following theorem statesthat if the initial and boundary conditions are positive then the solution inthe domain D is also positive.

Theorem 1 [5]. Assume that the function u(x,t) is continuous in D andassume that the coecients in (2.14) are continuous. Suppose that Lu ≤ 0in D\Γ where b(x,t) <M (M is some constant) and suppose furthermore thatu(x, t) ≥ 0 on Γ. Then

u(x, t) ≥ 0 in D.

Theorem 2 [5]. Suppose that u(x, t) is continuous and satises (2.14) inD\Γ where f(x,t) is a bounded function (|f | ≤ N) and b(x, t) ≤ 0. If|u(x, t)|Γ ≤ m then

|u(x, t)| ≤ Nt+m, in D .

We can use Theorem 2 in the case, where b(x, t) ≤ b0 < 0

|u(x, t)| ≤ max

−Nb0

,m

. (2.15)

Page 21: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 11

From the above inequality follows that the initial and boundary values boundthe growth of u. We can obtain the minimum and the maximum principlesfor the heat equation and its variants in a special case when b ≡ 0 and f ≡ 0.

Corollary 1 [5]. Assume that the conditions of Theorem 2 are satised andthat b ≡ 0 and f ≡ 0. Then the solution u(x, t) takes its the least and thegreatest values on Γ, that is

m1 ≡ min u(x, t) ≤ u(x, t) ≤ max u(x, t) ≡ m2

The above theorems and the corollary state that the solution u is alwayspositive if it has a positive input. We have shown that if the initial andboundary conditions are positive then the solution is also positive in thebounded domain D, but what about unbounded domains? Is the solutionpositive in such domains (for example, for the European and American optionproblem)?

Theorem 3 (The Maximum principle for the Cauchy problem),[5]. Let u(x, t) be continuous and bounded from below in H = Rn × (0, T ),that is u(x, t) ≥ −m,m > 0. Suppose further that u(x, t) has the continuousderivatives in H up to the second order in x and the rst order in t and thatLu ≤ 0. Let σ, µ and b satisfy the conditions

|σ(x, t)| ≤M(x2 + 1),

|µ(x, t)| ≤M√x2 + 1,

b(x, t) ≤M.

Then u(x, t) ≥ 0 everywhere in H if u ≥ 0 for t = 0.

To see that the price of an option can not takes negative values we can applyTheorem 3 to the Black-Scholes equation (2.13).

How describe Mark S. Joshi in his article [15], if function f is constantthen u is also constant, where u denots the solution. We can assume that f isa nonlinear function. Summarizing the maximum principle, it states that ifm is the minimum and M the maximum of the function f then respectivelym and M are also the minimum and the maximum of u and these values areon the boundary. Assume, that Xi where i = 1, . . . , n, denote non-dividendpaying nancial assets following independent Brownian motions and Ω is anopen bounded subset of Rn. Let us consider the value C(x), where x is thepoint in the interior. The above value C(x) is a product with no expiry whichpays a continuous function f at the rst time the vector (X1, . . . , Xn) touches

Page 22: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

12 Chapter 2. The Black-Scholes Model

∂Ω. The most C(x) will pay isM and the minimum C(x) will pay is m. Thisis, since it will hit the boundary with probability 1 in nite time. By theno-arbitrage assumption, the value should lie somewhere between m and M .In the case when its value isM , we consider the porfolio withM stocks minusone unit of C. Such portfolio has got the zero initial value. Nonetheless, ifthe function f is non-linear, than the nishing at a point where f(x) < Mhas non-zero probability. The conclusion is that either f is a constant orthere occure an arbitrage opportunity. Then if f is non-constant function,the maximum of C cannot be obtained in our open bounded subset.

Page 23: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 3

Finite Dierence Methods

3.1 Fundamentals

Now we are interested in how to nd a solution of the Black-Scholes equation.Because the corresponding explicit analytical formula cannot always be foundfor any initial and boundary conditions we must employ numerical methods,i.e. approximate the PDE. The most popular methods are, for example theMonte Carlo method, the binomial and trinomial methods and the nitedierence method. In our work we rst focus on one of them, that is thenite dierence method. The main idea of the nite dierence methods isto replace the partial derivatives which appear in the PDE by dierencequotients. In other words, it relies on replacing dierential equations bynite dierences equations.

3.2 The classical nite dierence methods

In this section we consider how to construct nite dierence methods to solvethe Black-Scholes equation

∂f

∂t+

1

2σ2S2 ∂

2f

∂S2+ rS

∂f

∂S= rf, (3.1)

supplied with the certain boundary conditions and initial conditions. As-suming a reversal of time, (3.1) reads

∂f

∂τ=

1

2σ2S2 ∂

2f

∂S2+ (r −D)S

∂f

∂S− rf, (3.2)

where τ = T−t, T and t denote maturity time and current time, respectively,i.e. τ denotes the remaining life time. In the above equation f = f(S, τ)

13

Page 24: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

14 Chapter 3. Finite Difference Methods

represent the value of an option, where S = S(τ) is the price of the underlyingasset at time τ . We observe that there appear three kinds of derivatives: withrespect to τ , with respect to S and the second-order derivative also withrespect to S. To solve (3.2) we should approximate the partial derivatives byusing the dierence quotients. To this end, we apply Taylor's theorem whichshows, that a smooth function f(x) can be written as

f(x± h) = f(x)± hf ′(x) +1

2h2f ′′(x)± 1

6h3f ′′′(x) + ... (3.3)

-

6

x

f(x)

x-h x x+h

Figure 3.1: A graphical illustration of the forward, backward and central approximationsof a spatial derivative f(x) with respect to x

If we approximate the rst derivative from equation (3.3) we get respec-tively the forward and backward approximation

f ′(x) =f(x+ h)− f(x)

h+O(h), (3.4)

f ′(x) =f(x)− f(x− h)

h+O(h) (3.5)

where O(h) states the order of the discretization error. To obtain a moreaccurate approximation we subtract the backward approximation from theforward approximation and obtain

f ′(x) =f(x+ h)− f(x− h)

2h+O(h2). (3.6)

Page 25: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 15

Such dierence quotient is called the central or symmetric approximation.As we mentioned earlier, in the Black-Scholes equation there is also a second-order derivative. Adding the forward and the backward approximation leadsto

f(x+ h) + f(x− h) = 2f(x)h2f ′′(x) +O(h4), (3.7)

and thus we get immediately

f ′′(x) =f(x+ h)− 2f(x) + f(x− h)

h2+O(h2). (3.8)

Now we can apply this knowledge to our issue. First, we need to createa discrete grid. In our case we consider a discretization with respect to timeτ and to the asset price S. We create a grid by dividing the S and τ axison points that have the same distance, ∆τ and ∆S, accordingly we obtainso-called uniform grid. The spatial-temporal domain (0, Smax) × (0, T ) isdivided by the grid, with the points (j∆S, n∆t), as follows

S = 0, ∆S, 2∆S, ..., M∆S ≡ Smax,τ = 0, ∆τ, 2∆τ, ..., N∆τ ≡ T.

For brevity we write∆S = h,∆τ = k.

Later we are interested in the values of the function f(S, τ) in the gridpoints (j∆S, n∆τ) and introduce the following grid notation for the pointwiseapproximation

fnj ≈ f(j∆S, n∆τ).

There exist three ways to approximate the partial derivatives in the Black-Scholes equation

• The forward dierence

∂Sf(j∆S, n∆τ) ≈

fnj+1 − fnjh

=: D+h f

nj , (3.9)

∂τf(j∆S, n∆τ) ≈

fn+1j − fnj

k=: D+

k fnj ; (3.10)

Page 26: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

16 Chapter 3. Finite Difference Methods

• The backward dierence

∂Sf(j∆S, n∆τ) ≈

fnj − fnj−1

h=: D−h f

nj , (3.11)

∂τf(j∆S, n∆τ) ≈

fnj − fn−1j

k=: D−k f

nj ; (3.12)

• The central (or symmetric) dierence

∂Sf(j∆S, n∆τ) ≈

fnj+1 − fnj−1

2h=: D0

hfnj , (3.13)

∂τf(j∆S, n∆τ) ≈

fn+1j − fn−1

j

2k=: D0

kfnj . (3.14)

We can also approximate the second derivative

∂2

∂S2f(j∆S, n∆τ) ≈

fnj+1 − 2fnj + fnj−1

h2=: D2

hfnj = D+

hD−h f

nj . (3.15)

Then according to the type of the option we apply the boundary conditions.Futher we descride some classical nite dierence methods.

3.2.1 The theta Method

The θ-method represents a whole class of the nite dierence methods. In thismethod the spatial derivative is approximated at the time τj+θ∆τ = τj+θk.The start and the end of the time interval are a weighted average of theapproximations, see [9]:

fn+1j − fnj

k︸ ︷︷ ︸I

=

((1− θ)

fn+1j−1 − 2fnj + fnj+1

h2+ θ

fn+1j−1 − 2fn+1

j + fn+1j+1

h2

)︸ ︷︷ ︸

II

,

(3.16)whereI - central dierence at τn+1/2,II - central dierence at τn + θk.

For the appropriately chosen value of the implicitness parameter θ ∈ [0, 1],we obtain dierent methods

Page 27: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 17

• for θ = 0, the explicit method (see 3.2.2),

• for θ = 1, the implicit method (see 3.2.3),

• for θ = 12, the Crank-Nicolson method (see 3.2.4).

3.2.2 The Explicit Method

If we approximate in (3.2) the derivative with respect to S by a centraldierence and the derivative with respect to t by a forward dierence, weobtain the following set of equations, [4],

fn+1j −fnj

k= 1

2σ2j2h2 f

nj+1−2fnj +fnj−1

h2+ rjh

fnj+1−fnj−1

2h− rfnj , (3.17)

since Sj = jh. Let n = 0, we have only one unknown quantity, f 1j . Ap-

plying the boundary conditions the equations can be solved forward in time.Rewriting the equations, we get an explicit scheme

fn+1j = a∗jf

nj−1 + b∗jf

nj + c∗jf

nj+1

n = 0, 1, 2, . . . , N − 1; j = 1, 2, . . . , M − 1,(3.18)

wherea∗j = 1

2k(σ2j2 − rj),

b∗j = 1− k(σ2j2 − r),

c∗j = 12k(σ2j2 + rj).

(3.19)

u u u

u

j, nj − 1, n j + 1, n

j, n+ 1

Figure 3.2: The stencil of the explicit method for the Black-Scholes equation (3.2).

Page 28: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

18 Chapter 3. Finite Difference Methods

3.2.3 The Implicit Method

The implicit method is obtained by using a backward dierence to approx-imate the partial derivative with respect to t and a central dierence toapproximate the partial derivative with respect to S, [4]. The dierenceequations is following

fn+1j −fnj

k= 1

2σ2j2h2 f

n+1j+1 −2fn+1

j −fn+1j−1

h2+ rjh

fn+1j+1 −f

n+1j−1

2h− rfn+1

j . (3.20)

We can rewrite (3.20) (for j = 1, 2, . . . , M − 1 and n = 0, 1, . . . , N − 1)as

ajfn+1j−1 + bjf

n+1j + cjf

n+1j+1 = fnj , (3.21)

where, for each j,

aj = 12rjk − 1

2σ2j2k,

bj = 1 + σ2j2k − rk,

cj = −12rjk − 1

2σ2j2k.

(3.22)

For each time level we have M − 1 equations for M − 1 unknowns. We haveto solve a sequence of systems of linear equations for n = 0, 1, 2, . . . , N − 1by going forward in time. The tridiagonal system looks like

b1 c1

a2 b2 c2

. . . . . . . . .

aM−2 bM−2 cM−2

aM−1 bM−1

fn+1

1

fn+12...

fn+1M−2

fn+1M−1

(3.23)

=

fn1fn2...

fnM−2

fnM−1,n

a1fn+10

0...0

cM−1fn+1M

and can be solved eciently with the Thomas algorithm [12].

Page 29: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 19

u u u

u

j, n+ 1j − 1, n+ 1 j + 1, n+ 1

j, n

Figure 3.3: The stencil of the implicit method for the Black-Scholes equation (3.2).

3.2.4 The Crank-Nicolson Method

The Crank-Nicolson method is a combination of the explicit and the implicitmethods [4]. We apply this idea to the Black-Scholes equation and obtainthe following grid equations

fn+1j −fnj

k= rjh

2

(fn+1j+1 −f

n+1j−1

2h

)+ rjh

2

(fnj+1−fnj−1

2h

)+σ2j2h2

4

(fn+1j+1 −2fn+1

j +fn+1j−1

h2

)+σ2j2h2

4

(fnj+1−2fnj +fnj−1

h2

)− r

2fn+1j − r

2fnj .

(3.24)

for j = 1, 2, . . . , M − 1 and n = 0, 1, . . . , N − 1.

These equations may be written as

−αjfn−1j+1 + (1− βj)fn+1

j − γjfn+1j+1 = αjf

nj−1 + (1 + βj)f

nj − γjfnj+1,

whereαj = k

4(σ2j2 − rj),

βj = −k2(σ2j2 + r),

γj = k4(σ2j2 + rj).

(3.25)

Applying the boundary conditions, we have to solve the tridiagonal systemof equations

M1fn−1 = M2f

n,

Page 30: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

20 Chapter 3. Finite Difference Methods

where

M1 =

1− β1 −γ1

−α2 1− β2 −γ2

. . . . . . . . .

−αM−2 1− βM−2 −γM−2

−αM−1 1− βM−1

,

M2 =

1 + β1 γ1

α2 1 + β2 γ2

. . . . . . . . .

αM−2 1 + βM−2 γM−2

αM−1 1 + βM−1

,

fn =[fn1 , f

n2 , . . . , f

nM−1

]>.

(3.26)

u u u

uu u u

j, n+ 1j − 1, n+ 1 j + 1, n+ 1

j, nj − 1, n j + 1, n

Figure 3.4: The stencil of the Crank-Nicolson method for the Black-Scholes equation(3.2).

Page 31: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 4

The Exponentially Fitted Scheme

At the beginning let us consider the linear two-point boundary value problem(TPBVP)

σ d2udx2

+ 2dudx

= 0 in (0, 1),

u(0) = 1, u(1) = 0,(4.1)

with the assumption that σ is a positive constant. Equation (4.1) contains ofa rst-order derivative with respect to x and a second-order derivative alsowith respect to x so now we replace these derivatives by the correspondingcentered nite dierences, where uj ≈ u(j∆x)

σD+D−Uj + 2D0Uj = 0,

U0 = 1, UJ = 0.(4.2)

Equation (4.2) is equivalent to the following equation

σUj+1−2Uj+Uj−1

h2+ 2

Uj+1−Uj−1

2h= 0, j = 1 , 2 , · · · , J − 1,

U0 = 1, UJ = 0.(4.3)

According to such nite dierence scheme our aim is to nd a mesh functionUj, j = 1, · · · , J − 1 that solves (4.3). We rewrite (4.3) in the following form(

1 +σ

h

)Uj+1 − 2

σ

hUj +

(σh− 1)Uj−1 = 0. (4.4)

Equation (4.4) is a homogeneous second-order dierence equation with theconstant coecients which have solutions of the form

Uj = λj. (4.5)

21

Page 32: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

22 Chapter 4. The Exponentially Fitted Scheme

We insert (4.5) into (4.4) yielding(1 +

σ

h

)λ2 − 2

σ

hλ+

(σh− 1)

= 0,

i.e.

λ2 −2σh(

1 + σh

)λ+

(σh− 1)(

1 + σh

) = 0. (4.6)

We obtain a quadratic equation (4.6) so now we must solve this

∆ :=4(

1 + σh

)2

Due to, ∆ > 0 we have two solutions λ1 or λ2:

λ1 = 1, λ2 =1− h

σ

1 + hσ

.

The general solution to (4.4) is a linear combination

Uj = aλj + b = a1− h

σ

1 + hσ

+ b . (4.7)

Variables a and b are obtained from the boundary conditions (4.3)

• U0 = 1 at j = 0,

a+ b = 1, (4.8)

• UJ = 0 at j = J,aλJ + b = 0. (4.9)

Solving the system of equations (4.7) and (4.8) we obtain

a =1

1− λJ, b =

−λJ

1− λJ. (4.10)

Replacing (4.9) in (4.6) we have the solution

Uj =λj − λJ

1− λJ, where λ =

1− hσ

1 + hσ

. (4.11)

Let us note that the exact solution of (4.1) is given by

e−2x/σ − e−2/σ

1− e−2/σ. (4.12)

Page 33: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 23

Figure 4.1: The exact solution of the equa-tion (4.1), where x ∈ [0, 1], h = 0.1, σ = 0.2.

Figure 4.2: The discrete solution of theequation (4.1), where x ∈ [0, 1], h = 0.1, σ =0.2.

With the assumption that σ < h in (4.10) we can predict that λ < 0, sodepending on the value j, λj is positive or negative. In the limit case σ → 0we have

limσ→0

Uj =(−1)j + 1

2.

Therefore for all σ < h, Uj oscillates in a bounded region. Hence, we concludethat, the centered nite dierence scheme is inadequate for the numerical so-lution of (4.1) with the assumption σ < h. A very important remark here isthat the grid solutions certainly depend on the chosen discretization.

The exponentially tted schemes is one of the new class of the robustdierence schemes. The properties of such schemes are a good convergenceand the fact that they are stable. Furthermore, they do not produce spuriousoscillations, as the centered nite dierence scheme before. We wish to usethe following scheme to solve the Black-Scholes equation. Firstly, let usconsider the slightly more general TPBVP

σ d2udx2

+ µdudx

= 0 in (A,B),

u(A) = β0, u(B) = β1,(4.13)

with the exact solution

u =(β0 − β1)e−

µσx − β0e

−µσB + β1e

−µσA

e−µσA − e−µσB

(4.14)

Page 34: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

24 Chapter 4. The Exponentially Fitted Scheme

where σ and µ are positive constants. We apply the standard centered dif-ference scheme for the approximation (4.13)

σρD2Uj + µD0Uj = 0, j = 1, · · · , J − 1

U0 = β0, UJ = β1,(4.15)

with the discrete solution

uj =(β0 − β1)λj − β0λ

J + β1

1− λJ, (4.16)

where ρ denotes the so-called tting factor and λ = 2ρσ−µh2ρσ+µh

.

The tting factor was introduced to make the solution (4.14) and (4.16)identical at the mesh-points. As it follows from the form of solutions (4.14)and (4.16), the sucient condition for this purpose is

e−µσx = λj.

According to that x = jh and λ = 2ρσ−µh2ρσ+µh

, we rewrite above equation in thefollowing form

e−µσh =

2ρσ − µh2ρσ + µh

.

We can derive a value ρ from this equation

ρ =µh

2σcoth

µh

2σ,

where cothx represents the hyperbolic cotangent function dened by

cothx =ex + e−x

ex − e−x=e2x + 1

e2x − 1.

We can use the tting factor to construct a tted dierence scheme for themore general TPBVPs. To do so, let us consider

σ(x)d2udx2

+ µ(x)dudx

+ b(x)u = f(x),

u(A) = β0, u(B) = β1,(4.17)

where σ, µ and b are given continuous functions satisfying the conditions

σ(x) ≥ 0, µ(x) ≥ α > 0, b(x) ≤ 0 for x ∈ (A,B)

Page 35: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 25

Figure 4.3: The exact solution of the equa-tion (4.13), where x ∈ [0, 1], h = 0.1, σ = 0.2and µ = 2.

Figure 4.4: The discrete solution of theequation (4.13), where x ∈ [0, 1], h = 0.1,σ = 0.2 and µ = 2.

The approximation (4.15) by a tted dierence scheme is the following one

γhjD2Uj + µjD

0Uj + bjUj = fj, j = 1, · · · , J − 1,

U0 = β0, UJ = β1,(4.18)

whereγhj =

µjh

2coth

µjh

2σj,

σj = σ(xj), µj = µ(xj), bj = b(xj).

(4.19)

Now we can write the suitable results.

Theorem 4 (Uniform Stability), [5].The solution of the scheme (4.18) is uniformly stable, that is

|Uj| ≤ |β0|+ |β1|+1

αmaxk=1,···,J

|fk|, j = 1, · · · , J − 1

Furthermore, the scheme (4.18) is monotone in the sense that the matrixrepresentation of (4.18)

AU = F,

where U = (U1, · · · , UJ−1)>, F = (f1, · · · , fJ−1)> and

A =

. . . . . . 0. . . aj,j+1

. . . aj,j. . .

aj,j−1. . .

0. . . . . .

Page 36: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

26 Chapter 4. The Exponentially Fitted Scheme

aj,j−1 =γhjh2− µj

2h> 0, always,

aj,j = −2γjh2

+ bj < 0, always,

aj,j+1 =γjh2

+µj2h

> 0, always, (4.20)

produces positive solutions from the positive input.

Theorem 5 (Uniform Convergence) [5]Let u and U be the solutions of (4.17) and (4.18), respectively. Then

|u(xj)− Uj| ≤Mh,

where M is a positive constant that is independent of h and σ.

The conclusion is that the tted scheme (4.18) is stable, convergent anddoes not produce any oscillations for all parameters under consideration.

Page 37: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 5

The Box Method

To reduce sensitivities of a portfolio or an option to the movements of theunderlying asset we need to approximate the derivatives of the solution ofthe Black-Scholes equation, which are called "greeks". The most importantones are

• Delta ∆ := ∂V∂S,

• Gamma Γ := ∂V 2

∂S2 .

Dierence quotient approximations to ∆ and Γ may give rise to problemswhen the stock price is close to the exercise price. In fact we know that theCrank-Nicolson scheme yields oscillating solutions for the values ∆ and Γwhile no such oscillations occur with the tted schemes, when the option isat the money.They were obtained by the following formulas

∆ ≈(V nj+1 − V n

j−1

)/2h, h = Sj+1 − Sj,

Γ ≈(V nj+1 − 2V n

j + V nj−1

)/h2,

(5.1)

where V nj is the value of the option at the grid point Sj and at the time level

τn.The problem to approximate the greeks in the case of the Neumann

boundary conditions becomes more challenging than in the case of the Dirich-let boundary conditions, because we have to approximate the one-sidedderivatives at the boundaries. The most general case we consider is

∂V∂τ

= σ ∂2V∂S2 + µ∂V

∂S+ bV − f, (S, τ) ∈ (A,B)× (0, T ) ,

with the initial condition V (S, 0) = g(S), S ∈ (A,B) ,(5.2)

27

Page 38: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

28 Chapter 5. The Box Method

and supplied with the Robin-type boundary conditions

α0V (A, τ) + α1σ∂V∂S

(A, τ) = g0(τ),

β0V (B, τ) + β1σ∂V∂S

(B, τ) = g1(τ).(5.3)

Let us rewrite (5.2) as a system of the rst-order equations as follows

σ ∂V∂τ

= σ ∂δ∂S

+ µδ + σbV − σf,

setting σ ∂V∂S

= δ,

V (S, 0) = g(S),

α0V (A, τ) + α1δ (A, τ) = g0(τ),

β0V (B, τ) + β1δ (B, τ) = g1(τ).

(5.4)

Our goal is to approximate V and δ and after this procedure we will have thevalues for the both the option price and its delta. A scheme for approximating(5.4) was proposed by Keller in 1970, [13].Assume that σ and µ are constants, f ≡ 0, b ≡ 0 and α0 = β0 = 1, α1 =β1 = 0. Dene the quantities

Snj±1/2 =1

2

(Snj + Snj±1

),

and

τn±1/2 =1

2(τn + τn±1) ,

V nj±1/2 =

1

2

(V nj + V n

j±1

),

Vn±1/2j =

1

2

(V nj + V n±1

j

),

D+h V

nj =

(V nj+1 − V n

j

)/h,

D+k V

nj =

(V n+1j − V n

j

)/k.

The, so-called, Keller box scheme is dened as

−σD+τ V

nj+1/2 + σD+

x δn+1/2j + µD+

x δn+1/2j+1/2 = 0,

σD+h V

nj = δnj+1/2,

(5.5)

Page 39: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 29

u0(τ) = g0(τ)uJ(τ) = g1(τ)

j = 1, · · · , J − 1. (5.6)

The main advantages of this scheme are

• it has the second order accuracy in time and space,

• it is unconditionally stable,

• it requests the data and the coecients in the equation only to bepiecewise smooth

• it is A-stable (a method is called A-stable, if all numerical solutions tendto zero, as n→∞, when the method applied with the xed positive hto any dierential equation dx/dt = qx, where q is a complex constantwith negative real part), [14].

Discretising (5.4) in the space direction rst by the centered dierence andthen later in time we obtain the motivation for (5.5). After spatial discretiza-tion we have

−σ dVj+1/2

dτ+ σD+

h δj + µδj+1/2 = 0, j = 0, · · · , J − 1, (5.7)

σD+h Vj = δj+1/2,

Vj(0) = g(Sj), j = 0, 1, · · · , J,(5.8)

V0(t) = g0(τ)VJ(t) = g1(τ)

j = 1, 2, · · · , J − 1. (5.9)

We now combine the terms in (5.7) to give a system of ODEs which willbe shown to be A-stable.

Lemma 2 There are the following relations for dierence operators D0h, D

+h

and D−h(a) D0

hδj = σD+hD

−h Vj

(b) δj+1/2 + δj−1/2 = 2σD0hVj

(c) D+h δj +D+

h δj−1 = 2D0hδj

j = 1, · · · , J − 1

We now write (5.7) at two consecutive mesh points Sj and Sj−1 and add theresults to give

−σ ddt

(Vj+1/2 + Vj−1/2

)+ σ

(D+h δj +D+

h δj−1

)+ µ

(δj+1/2 + δj−1/2

)= 0

Page 40: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

30 Chapter 5. The Box Method

Using Lemma 2 the above equation can be written as

1

4

d

dt(Vj−1 + 2Vj + Vj+1) + σD+

hD−h Vj + µD0

hVj = 0.

Finally, we can rewrite this equation as a system of ODEs

C dUdτ

+ AU = 0, U(0) = U0, (5.10)

where

C =

2 1 0

1. . . . . .. . . . . . 1

0 1 2

and A is the known matrix. If we will use tting factor in equation (5.10)we see that this system is an unconditionally stable. In conclusion, there arethe advantages of the box scheme for risk [5]:

• it has the second order accuracy in time and space

• it can deal with the discontinuous coecients

• it can deal with the Neumann and Robin type boundary conditions

• it solves a lot of oscillation problems

Page 41: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 6

The Finite Volume Discretization

For Path Dependent Options

Exotic options are widely used today by banks, corporations and institutionalinvestors in their management of risk [10]. The standard call and put optionsare not suitable to hedge some types of risk and this is the main reason touse exotic options.The barrier options lie in the class of path-dependent options, which come invarious avours and forms, but their key characteristic is that these types ofoptions are either initiated or exterminated upon reaching a certain barrierlevel. There are two main types of the barrier options:

• out-options (knock-out), they only pay o if a level is not reached

• in-options (knock-in), they only pay o as long as a level is reachedbefore the expiration date

Depending on the position of the barrier related to the initial value of theunderlying asset there are another characteristics a of barrier option

• up options, if the barrier is above the initial price,

• down options, if the barrier is below the initial price.

Sometimes a rebate is paid if the barrier level is reached. The barrier optionscan also have an opportunity for an early exercise, like the American styleoptions.The barrier options are used in the foreign exchanges (FX), the interest rateand option markets. They are used by hedgers to protect the price of theunderlying asset above or below some advanced level or by speculators toobtain a somehow less expensive directional play on an underlying asset. In

31

Page 42: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

32Chapter 6. The Finite Volume Discretization For Path

Dependent Options

this chapter we will consider a novel nite volume discretization for pricingthe barrier options [3].

Let us to write the forward-in-time Black-Scholes partial dierential equa-tion in the following way

∂V

∂τ=

1

2σ2S2∂V

2

∂S2+ rS

∂V

∂S− rV, (6.1)

where τ = T − t. We employ a point-distributed nite volume scheme todiscretize (6.1). First we rewrite equation (6.1) in the conservative form.Using the properties

∂S(S2VS

)= S2VSS + 2SVS, ∂S (SV ) = V + SVS,

we obtain

∂τV =σ2

2∂S(S2VS

)− (σ2 − r)∂S (SV ) + (σ2 − 2r)V.

Further integration with respect to τ and S to the order the discretizationin time 0 = τ0 < τ1 < · · · < τN = T and in the stock prices 0 = S0 < S1 <· · · < SJ = Smax gives us the discrete version of (6.1)

V n+1j −V nj

∆τ= θF n+1

j−1/2

(V n+1j−1 , V

n+1j

)− θF n+1

j+1/2

(V n+1j , V n+1

j+1

)+ θfn+1

j

(V n+1j

)+ (θ − 1)F n

j−1/2

(V nj−1, V

nj

)− (θ − 1)F n

j+1/2

(V nj , V

nj+1

)+ (θ − 1)fnj

(V nj

),

(6.2)where V n+1

j denotes the approximate value of the option at node n + 1, ∆τis the time step size, Fj+1/2 and Fj−1/2 are so-called ux terms, fj is a asource term and θ is a weighting factor.In equation (6.2) the ux and source terms are determined as (see [6])

F n+1j−1/2

(V n+1j−1 , V

n+1j

)=

1

∆Sj

[−(

1

2σ2S2

) (V n+1j − V n+1

j−1

)∆Sj−1/2

− (rSj)Vn+1j−1/2

],

(6.3)

F n+1j+1/2

(V n+1j , V n+1

j+1

)=

1

∆Sj

[−(

1

2σ2S2

) (V n+1j+1 − V n+1

j

)∆Sj+1/2

− (rSi)Vn+1j+1/2

],

(6.4)where ∆Sj = 1

2(Sj+1 − Sj−1) , ∆Sj+1/2 = Sj+1 − Sj, and

fn+1j

(V n+1j

)= (−r)V n+1

j . (6.5)

Page 43: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 33

Note that the corresponding denitions apply at time level n. V n+1j−1/2 and

V n+1j+1/2 are the remaining terms from the (rS∂V/∂S) term in (6.1). And it

equals

V n+1j+1/2 =

V n+1j+1 + V n+1

j

2. (6.6)

The weighting factor θ denes the type of the selected scheme:

• θ = 0 - fully explicit

• θ = 12- Crank-Nicholson

• θ = 1 - fully implicit

As we know, the explicit method can be unstable, if the time step size is notsuciently small compared with the stock grid spacing, the Crank-Nicholsonmethod and fully implicit method both are unconditionally stable. Boththe fully explicit and the implicit methods are rst-order accuracy in time.On the other hand the Crank-Nicholson method is second-order accuracy intime. But the Crank-Nicholson approach may produce large and spuriousnumerical oscillations and gives very poor estimates of the option value S.The following conditions were used to prevent these spurious oscillations (andwere described in [6]). We should take

∆Sj−1/2 <σ2Sjr

(6.7)

and1

(1− θ)∆τ>σ2S2

j

2

(1

∆Sj−1/2∆Sj+

1

∆Sj+1/2∆Sj

)+ r. (6.8)

The condition (6.7) is satised for σ and r away from Sj. In the case of thefully implicit method (θ = 1) the condition (6.8) is trivially satised. Thiscondition restricts the time step size as the function of the stock grid spac-ing. Even though the Crank-Nicholson approach is unconditionally stable, itcan produce spurious oscillations unless the time step size is no more smallerthan twice that required for the fully explicit method to be stable. Abovereasons mean that it is preferable to use the fully implicit method for optionpricing [6].Depending on the nature of the constraint we have to choose a suitable strat-egy for imposing an algebraic constraint on the solution. We will consider aexample of a discretely monitored down-and-out option without any rebate.At rst we compute V n+1 and then apply the constraint

V n+1j =

0, if Sj ≤ h (tn+1, αn+1)H,

V n+1j , otherwise,

(6.9)

Page 44: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

34Chapter 6. The Finite Volume Discretization For Path

Dependent Options

where H is the initial level of the barrier, h is a function which allows thebarrier to move over time, and αn+1 is an arbitrary parameter. For theconstant barrier h is equal to one.In the case of the early exercise opportunity we solve the following dierentialequation

Φn+1j − V n

j

∆τ= F n+1

j−1/2

(V n+1j−1 , V

n+1j

)− F n+1

j+1/2

(V n+1j , V n+1

j+1

)+ fn+1

j

(V n+1j

)V n+1j = max

(Φn+1j , Sj −K, 0

). (6.10)

For the down-and-out barrier options with the American style we applythe following conditions

V n+1j =

0, if Sj ≤ h (tn+1, αn+1)H,max

(Φn+1j , Sj −K, 0

), otherwise.

(6.11)

This notation allows us to use as constant barriers as discretely ones. Itis rather important feature because in real life discretely monitored barriersare applied (daily or weekly).

Page 45: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 7

The Fitted Finite Volume Scheme

In this chapter we consider a tted nite volume scheme for the discretizationof the Black-Scholes equation. Let us rewrite this equation in the known form,which we used in the previous chapters

∂V

∂τ=

1

2σ2S2∂V

2

∂S2+ rS

∂V

∂S− rV, (7.1)

where we employed the time reversal τ = T − t.Let us rst consider the boundary conditions for equation (7.1). At τ = 0,V (S, 0) is the specied contract payo. At S = 0, equation (7.1) reduces to

∂V

∂τ= −rV. (7.2)

For S →∞, we have asymptotically the Dirichlet condition

V (S, τ) = f(S, τ), (7.3)

where f(S, τ) can be determined by nancial reasoning. For the computation,we conne the asset region (0, +∞) to (0, Smax), where Smax is sucientlylarge to ensure the accuracy of the solution (7.1). Thus, (7.3) becomes

V (Smax, τ) = f(Smax, τ). (7.4)

This localized problem can be solved by the tted nite volume method.Now, let us consider the discretization of (7.1). We rst start with thespatial discretization. For this purpose we transform (7.1) into the followingconservative form

∂τV = ∂S(aS2VS + bSV

)− cV, (7.5)

35

Page 46: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

36 Chapter 7. The Fitted Finite Volume Scheme

where

a =σ2

2, b = r + σ2, c = r + b. (7.6)

Now, we divide I = (0, Smax) into N sub-intervals

Ij = (Sj, Sj+1), j = 0, ..., N − 1,

with 0 = S0 < S1 < · · · < SN = Smax. For each j = 0, · · · , N − 1, denehj = Sj+1−Sj. Also, we let Sj−1/2 = (Sj−1+Sj)/2 and Sj+1/2 = (Sj+Sj+1)/2for each j = 2, · · · , N .

For each j = 1, · · · , N − 1, integrating (7.5) over Jj =(Sj−1/2, Sj+1/2

),

we obtain ∫Jj

∂τV dS = ∂S(aS2VS + bSV

)∣∣Sj+1/2

Sj−1/2−∫Jj

cV dS. (7.7)

Applying the one-point quadrature rule to the rst and the last terms in(7.5) we obtain

∂τVj`j = Sj+1/2ρ(V )∣∣Sj+1/2

+ Sj−1/2ρ(V )∣∣Sj−1/2

− cVj`j, (7.8)

for j = 0, · · · , N − 1, where `j = Sj+1/2 − Sj−1/2 and ρ(V ) is the ux termdened by

ρ(V ) := aSV ′ + bV. (7.9)

Let us take a look on the next boundary problem to dene an approximationof the ρ(V ) above at the mid-point, on Sj+1/2, of the interval Ij

(aSV ′ + bV )′ = 0, S ∈ Ij,

V (Sj) = Vj, V (Sj+1) = Vj+1.(7.10)

Integrating this equation yields the rst-order linear equation

ρj(V ) = aSV ′ + bV = C1,

where C1 denotes an additive constant. The integrating factor of this linearequation is Sν and the analytic solution to above equation is

V = S−ν(∫

SνC1

aSdS + C2

)=C1

b+ C2S

−ν ,

where ν = b/a and C2 is also an additive constant.Applying the boundary conditions to this equation we obtain

Vj = C1

b+ C2S

−νj and Vj+1 = C1

b+ C2S

−νj+1

Page 47: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 37

The solution of this linear system is

ρj(V ) = C1 = bSνjj+1Vj+1 − S

νjj Vi

Sνjj+1 − S

νjj

. (7.11)

By the same way we dene the approximation of ρ(V ) at Sj−1/2.

According to the fact, that such analysis does not apply to the approxi-mation to ρ(V ) on I0 = (0, S1), we reconsider (7.10) with an extra degree offreedom

(aSV ′ + bV )′ = C, S ∈ I0,

V (S0) = V0, V (S1) = V1.(7.12)

This problem has the solution

ρ0(V ) = (aSV ′ + bV )S1/2= 1

2[(a+ b)V1 − (aSV ′ + b)V0] ,

V = V0 + (V1 − V0)S/S1, S ∈ I0 = (0, S1).(7.13)

We derive an approximation to ρ(V ) by ρh(V ), using (7.11) and (7.13) sat-isfying

ρh(V ) = ρj(V ), if V ∈ Ijfor j = 0, · · · , N − 1.Substituting (7.11) and (7.13) into (7.7), we obtain

∂V

∂τ= αjVj−1 + γjVj + βjVj+1, (7.14)

for j = 1, · · · , N − 1, where

α1 = S1

4`1(a+ b),

β1 =bS1+1/2S

νj2

(Sν12 −S

ν11 )`1

,

γ1 = − S1

4`1(a+ b)− bS1+1/2S

νj2

(Sν12 −S

ν11 )`1− c,

(7.15)

and

αj =bSj−1/2S

νjj−1

(Sνjj+1−S

νjj )`j

,

βj =bSj+1/2S

νjj+1

(Sνjj+1−S

νjj )`j

,

γj = − bSj−1/2Sνjj−1

(Sνjj+1−S

νjj )`j− bSj+1/2S

νjj+1

(Sνjj+1−S

νjj )`j− c,

(7.16)

Page 48: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

38 Chapter 7. The Fitted Finite Volume Scheme

for j = 2, · · · , N − 1.

Thus, the semi-discretization form is

∂Vj∂τ

= αjVj−1 + γjVj + βjVj+1. (7.17)

Further we consider the time discretization of (7.17). Let τj ∈ (0, T ) issatisfying 0 = τ0 > τ1 > · · · > τM = T , and ∆τ = τn − τn−1 > 0, whereM > 1 is a positive integer. In our case we apply the fully implicit schemeto (7.17), yielding

V n+1j − V n

j

∆τ= αjV

n+1j−1 + γjV

n+1j + βjV

n+1j+1 , (7.18)

where V nj = V (Sj, τn) derives the solution at node Sj and time level τn.

We can rewrite (7.18) in the matrix form

[1−∆τM ]V n+1 = V n + ∆τRn, (7.19)

whereV n =

[V n

1 , · · · , V nN−1

]>,

σn =[σn1 , · · · , σnN−1

]>,

Rn =[α1V

n+10 , 0, · · · , 0, βN−1V

n+1N

]>and

M =

γ1 β1

α2 γ2 β2

. . . . . . . . .

αM−2 γM−2 βM−2

αM−1 βM−1

Solving the system (7.19) forward in time we obtain the discrete approxi-mation of the equation (7.1).

Page 49: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 8

Numerical results

This chapter illustrates numerical solutions to the European option pricingproblem. The main purpose is to compare numerical option prices obtainedby using the methods of nite dierences with the corresponding exact so-lutions of the Black-Scholes equation. To this end, we created the programsthat determine prices of options by using the presented exponentially ttedscheme and the nite volume scheme. The parameter values are providedby Ehrhardt and Mickens [11]. The same values are used for each of themethods mentioned above.

interest rate r = 0.08volatility σ = 0.3strike price K = 100initial price S = 100maximum price Smax = 200maturity date T = 0.5

The exponentially tted scheme for the European put option

The rst program nds the approximation of the European put option priceby the exponentially tted scheme (4.18). These results are presented inFigure 8.1. In Figure 8.2 the analytic solution obtained by using the Black-Scholes formula (3.2) is shown.

39

Page 50: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

40 Chapter 8. Numerical results

Figure 8.1: The approximate solution of the European put option by the exponentiallytted scheme with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

Figure 8.2: The analytical solution of the Black-Scholes formula for the European putoption with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

Page 51: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 41

In Figure 8.3 the absolute error of the exponentially tted scheme to the an-alytic Black-Scholes solution is shown in the semi-logarithmic plot. Lookingat this plot we can note that the obtained results by using the exponentiallytted method are close to the results from the Black-Scholes formula. Itmeans that the exponentially tted scheme for the European put option isquite accurate.

Figure 8.3: The absolute error of the exponentially tted scheme in case of the Europeanput option with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

The exponentially tted scheme for the European call option

Figure 8.4 illustrates the approximation of the European call optionprice by the exponentially tted scheme while in Figure 8.5 the exactsolution of the Black-Scholes formula is presented.

Page 52: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

42 Chapter 8. Numerical results

Figure 8.4: The approximate solution of the European call option by the exponentiallytted scheme with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

Figure 8.5: The analytical solution of the Black-Scholes formula for the European calloption with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

Page 53: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 43

Figure 8.6: The absolute error of the exponentially tted scheme in case of the Europeancall option with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

As shown in Figure 8.6, in case of the European call our results are not soaccurate as for the European put option.

From the results of our comparisons shown above we conclude that theEuropean put option prices obtained by numerical methods are signicantlymore accurate than the European call option prices.

The tted nite volume scheme for the European put op-tionIn Figure 8.7 we present the European put option prices obtained by thetted nite volume approximation. Comparing our results for the ttednite volume scheme with the solution of the Black-Scholes formula we canstate that this method produces rather large errors.

Page 54: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

44 Chapter 8. Numerical results

Figure 8.7: The approximate solution of the European put option by the tted nitevolume scheme with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200,T = 0.5.

Figure 8.8: The absolute error of the tted volume scheme in case of the European putoption with parameters r = 0.08, σ = 0.3, K = 100, S = 100, Smax = 200, T = 0.5.

Page 55: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 45

The absolute errors of the option prices obtained by the nite volumescheme are illustrated in Figure 8.8.

The obtained results show that at least in our case the exponentially ttedmethod gives more appropriate approximations to the option prices than thetted nite volume scheme .As we can see further in Figure 8.11 and Figure 8.12 the nite volume schemedepends not so strong on the number of nodes in the grid. Figure 8.9 andFigure 8.10 illustrate that the results by using the exponentionally ttedscheme dependence is also rather weak.

Figure 8.9: The approximate solution of the European put option by the exponentiallytted scheme with dierent grid settings, where r = 0.08, σ = 0.3, K = 100, S = 100,Smax = 200, T = 0.5.

Page 56: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

46 Chapter 8. Numerical results

Figure 8.10: The absolut error of the exponentially tted scheme in case of the Europeanput option with dierent grid settings, where r = 0.08, σ = 0.3, K = 100, S = 100,Smax = 200, T = 0.5.

Figure 8.11: The approximate solution of the European put option by the tted nitevolume scheme with the dierent grid settings, where r = 0.08, σ = 0.3, K = 100, S = 100,Smax = 200, T = 0.5.

Page 57: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 47

Figure 8.12: The absolute error of the tted volume scheme in case of the Europeanput option with the dierent grid settings, where r = 0.08, σ = 0.3, K = 100, S = 100,Smax = 200, T = 0.5.

Page 58: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

48 Chapter 8. Numerical results

Page 59: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Chapter 9

Conclusions and Outlook

The Black-Scholes partial dierential equation can be solved numerically, forexample, using methods of nite dierences or analytically. This master the-sis is devoted to description some novel nite volume dierence methods toapply them for calculation of option prices. In this thesis we have describedthe main aspects of the Black-Scholes theory and the classical nite dier-ence methods such as an explicit, an implicit and a Crank-Nicolson method.

The main purpose was to consider new classes of accurate and robustmethods like the exponentially tted scheme, the nite volume discretiza-tion, the Keller box scheme and the tted nite volume scheme and try toapply this approaches for the option pricing. We have written MATLABprograms which use the exponentially tted scheme and the tted nite vol-ume scheme for some put and call options. In the Chapter 8 we showed theobtained numerical results, described them and compared with the corre-sponding analytical solution of the Black-Scholes formula.

We will study in the future in more detail the possible occurence of bound-ary layers in the Black-Scholes framework and especially how discrete numer-ical schemes can model this boundary behaviour adequately. For this purposea deeper study of discrete asymptotic analysis will be needed.

49

Page 60: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

50 Chapter 9. Conclusions and Outlook

Page 61: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Bibliography

[1] J.C. HullOptions, Futures and Other Derivatives. Fifth edition revised 2002.Addison-Prentice Hall, New Jersey, USA.

[2] R.U. Seydel (2002)Tools for Computational Finance. Fourth edition revised 2009. Springer.

[3] P. Wilmott (2006)Paul Wilmott On Quantitative Finance. Second edition. J. Wiley & Sons,Inc.

[4] P. Brandimarte (2006)Numerical Methods in Finance and Economics: A MATLAB-Based In-troduction. Second edition. J. Wiley & Sons, Inc., New Jersey, USA.

[5] D.J. DuyRobust and Accurate Finite Dierence Methods in Option Pricing OneFactor Models.http://www.datasimnancial.com/UserFiles/articles/daniel3.pdf

[6] R. Zvan, K.R. Vetzal, P.A. Forsyth (2000)PDE methods for pricing barrier options. Journal of Economic Dynamics& Control, 24, 1563 1590.

[7] K. Zhang, S. Wang (2009)A computational scheme for uncertain volatility model in option pricing.Applied Numerical Mathematics, 59, 1754 1767.

[8] A. GutowskaMetoda Skonczo«ych ró»nic w Wycenie Opcji Europejskich na IndeksWIG20 w Modelu Blacka-Scholsa.http://www.sgh.waw.pl/katedry/kzfp/konferencjeseminaria/seminarium_referat_A_Gutowska_19.11.09.pdf

51

Page 62: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

52 Bibliography

[9] I.M. Smith, D.V. Griffiths (2004)Programming the Finite Element Method. Fourth edition. Addison-Wiley, Manchester, UK

[10] B. Gao, J. Huang, M. Subrahmanyam (2000)The valuation of American barrier options using the decomposition tech-nique. Journal of Economic Dynamics & Control, 24, 1783 1827

[11] M. Ehrhardt, R.E. Mickens (2008)A fast, stable and accurate numerical method for the Black-Scholes equa-tion of American options. Int. J. Theoret. Appl. Finance, 11 , 471 501

[12] L. H. Thomas,Elliptic problems in linear dierence equations over a network, WatsonSci. Comput. Lab. Rept., Columbia University, New York, 1949.

[13] H. Keller (1970)A new Dierence Scheme for Parabolic Problems. Synspade. AcademicPress, New York

[14] G. Dahlquist (1963)A special stability problem for linear multistep methods. BIT 3, 2743.

[15] M. JoshiOption pricing and the Dirichlet problem.http://www.markjoshi.com/downloads/dirichlet.pdf

Page 63: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Appendix

Exponentially tted scheme for the put/call optionThis program nds the approximation of the put or call option price by ex-ponentially tted scheme and requires following function

function price = BlackScholesPrice(S,K,T,r,vol,CallOrPut)

d1 = (log(S/K) + (b+vol^2/2)*T) / (vol*T^0.5);

d2 = d1 - vol*T^0.5;

if CallOrPut == 'c'

price = S .* normcdf (d1)-K * exp (-r * T) * normcdf (d2) ;

end

if CallOrPut == 'p'

price = K * exp(-r*T) * normcdf(-d2) - S.* normcdf(-d1);

end

% PROGRAM CODE

close all

clear all

% Parameters

r = 0.08; % interest rate

vol = 0.3; % volatility

K = 100; % strike price

% Domain

S = 100; % initial price

Smax = 200; % maximum price

53

Page 64: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

54 Bibliography

T = 0.5; % time interval

CallOrPut = 'p'; % indicatior call option = 'c', put option = 'p'

% Discretization

M = 200*2/h; % number of spatial grid points

dx = Smax/M; % space step

stockprice = [0:dx:Smax];

M = length(stockprice)-1;

N = 200*2/h; % number of temporal grid points

dt = T/N; % time step

reversetime = [T:-dt:0];

V = zeros(M+1,N+1);

delprice = zeros(1,M+1);

% Call option price

if CallOrPut == 'c'

% Terminal condition at time level N+1

V (:,N+1) = max (0, stockprice - K);

% Boundary conditions

V (1 ,:) = 0;

V (M+1,:) = stockprice- K*exp (-r * reversetime);

end

% Put option price

if CallOrPut == 'p'

% Terminal condition at time level N+1

V(:,N+1) = max(0,K - stockprice);

% Boundary conditions

V(1,:) = K*exp(-r * reversetime);

V(M+1,:) = 0;

end

% Probabilities

b = -r;

a = dt/dx^2; % parabolic mesh ratio

mu = r * stockprice(2:M);

Page 65: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 55

% Define the exponential fitting

vo = 0.5 * vol^2 * stockprice(2:M).^2;

v = mu.* dx.* 0.5.* coth(dx * mu ./ (2*vo));

A = -(a.* v - mu.* dt.* 0.5./ dx);

B = -(-1 + b * dt - 2 * v.* a);

C = -(a.* v + mu.* dt.* 0.5./ dx);

% System matrix

Mat = zeros(M-1,M-1);

for j = 2:M-2

Mat(j,j-1) = A(j);

Mat(j,j) = B(j);

Mat(j,j+1) = C(j);

end

Mat(1,1) = B(1); Mat(1,2) = C(1); % first row

Mat(M-1,M-2) = A(M-1); Mat(M-1,M-1) = B(M-1); % last row

% Right hand side

b = zeros(M-1,1);

b(1,1) = A(1) * V(1,1);

b(M-1,1) = C(M-1) * V(M-1,1);

for n = N:-1:1 % loop backward in time

f = V(2:M,n+1)-b;

V(2:M,n) = Mat\f;

end

myindex = find(stockprice < S);

bs = BlackScholesPrice(stockprice,K,T,r,vol,CallOrPut);

delprice = interp1(stockprice(myindex), V(myindex,1) , stockprice);

% Plotting

if CallOrPut == 'c'

figure

plot(stockprice, delprice);

xlabel('S')

ylabel('V(S,0)')

title('Call Price')

Page 66: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

56 Bibliography

figure

plot(stockprice,bs);

xlabel('S')

ylabel('V (S,0)')

title('Call Price')

end

if CallOrPut == 'p'

figure

plot(stockprice, delprice);

xlabel('S')

ylabel('V(S,0)')

title('Put Price')

figure

plot(stockprice,bs);

xlabel('S')

ylabel('V (S,0)')

title('Put Price')

end

error = abs(bs- delprice);

figure

semilogy(stockprice,error);

xlabel('S')

ylabel('V(S,0)')

title('Error')

Fitted nite volume scheme for the put optionThis program nds the approximation of the put option price by tted nitevolume scheme

close all

clear all

Page 67: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 57

% Parameters

r = 0.08; % interest rate

vol = 0.3; % volatility

K = 100; % strike price

Smax = 200; % maximum price

% Temporal domain

T = 0.5; % final time (in years)

% Discretization parameters

M = 41; % number of spatial grid points

dS = Smax/M; % space step

stockprice = [0:dS:Smax]; % vector of discrete S values

M = length (stockprice)-1;

N = 21; % number of temporal grid points

dt = T/N; % time step

reversetime = [T:-dt:0];

% Put option price P = P (S,t)

P = zeros (M+1,N+1);

delprice = zeros (1,M+1);

% Initial condition at first time level

P (:,1) = max (0,K - stockprice); % payoff

% 'spatial' boundary conditions

P (1 ,:) = K*exp (-r * reversetime);

P (M+1,:) = 0;

% Quantities according to (7.6)

a = 0.5*vol^2;

b = r + vol^2;

c = r + b;

nu = b/a; % below (7.11)

Sleft = stockprice (1:M-1);

Scenter = stockprice (2:M);

Sright = stockprice (3:M+1);

% Now S _(j ± 1/2)

Sminus = (Sleft+Scenter)./2;

Page 68: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

58 Bibliography

Splus = (Sright+Scenter)./2;

alpha1 = Sleft (1)/(4*dS) * (a - b);

beta1 = b* Sminus (1)*Scenter (1)^nu ./ ((Scenter (1).^nu - Sleft

(1).^nu)*dS);

gamma1 = -Sleft(1)/(4*dS)* (a + b) - b* Sminus (1)*Sleft (1)^nu ./

((Scenter (1).^nu - Sleft (1).^nu)*dS) -c;

% Define the exponential fit

alpha = b * Sminus .* Sleft.^nu ./ ((Sright.^nu - Scenter.^nu)*dS);

beta = b * Splus .* Sright.^nu ./ ((Sright.^nu - Scenter.^nu)*dS);

gamma = - b * Sminus .* Scenter.^nu ./ ((Scenter.^nu - Sleft.^nu)*dS)...

- b * Splus .* Scenter.^nu ./ ((Sright.^nu - Scenter.^nu)*dS) - c;

% Build system matrix Mat

Mat = zeros (M-1,M-1);

for j = 2: M-2

Mat (j,j-1) = dt* alpha (j);

Mat (j,j) = 1-dt*gamma (j);

Mat (j,j+1) = dt* beta (j);

end

Mat (1 ,1) = 1-dt*gamma1; Mat (1 ,2) = dt*beta1; % first row

Mat (M-1,M-2) = dt*alpha (M-1); Mat (M-1,M-1) = 1-dt*gamma (M-1);

% last row

% Right hand side

b = zeros (M-1,1);

b (1,1) = alpha1 * P (1,1);

b (M-1,1) = beta (M-1) * P (M+1,1);

% FORWARD

for n = 2:N % loop forward in time

f = P (2:M,n-1)+b;

P (2:M,n) = Mat f;

end

myindex = find (stockprice<Smax);

delprice = interp1 (stockprice (myindex), P (myindex,N) , stockprice);

% Plotting

Page 69: Exponential Fitting, Finite Volume and Box Methods …356530/FULLTEXT01.pdfExponential Fitting, Finite Volume and Box Methods in Option Pricing Dmitry Shcherbakov and Sylwia Szwaczkiewicz

Fitting Scheme for option pricing 59

figure

plot (stockprice,delprice);

xlabel ('S')

ylabel ('P (S,0)')

title ('Put Price')

error = abs(bs- delprice);

figure

semilogy(stockprice,error);

xlabel('S')

ylabel('P(S,0)')

title('Error')