0% found this document useful (0 votes)
53 views

Finite Difference

This document is Sargon Danho's degree project submitted to the KTH Royal Institute of Technology in Stockholm, Sweden in 2017. The project uses numerical methods to price financial derivatives such as European and American call options as well as stock loans. It derives the Black-Scholes partial differential equation and uses three finite difference methods, including the Crank-Nicholson method, to solve the equations and value the financial products. It also examines how the derived option and loan prices are affected by different parameters. The goal of the project is to explain important financial mathematics theories and apply numerical techniques to value various derivatives.

Uploaded by

Xiaoyue Chen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Finite Difference

This document is Sargon Danho's degree project submitted to the KTH Royal Institute of Technology in Stockholm, Sweden in 2017. The project uses numerical methods to price financial derivatives such as European and American call options as well as stock loans. It derives the Black-Scholes partial differential equation and uses three finite difference methods, including the Crank-Nicholson method, to solve the equations and value the financial products. It also examines how the derived option and loan prices are affected by different parameters. The goal of the project is to explain important financial mathematics theories and apply numerical techniques to value various derivatives.

Uploaded by

Xiaoyue Chen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 142

DEGREE PROJECT IN TECHNOLOGY,

FIRST CYCLE, 15 CREDITS


STOCKHOLM, SWEDEN 2017

Pricing Financial Derivatives with


the Finite Difference Method

SARGON DANHO

KTH ROYAL INSTITUTE OF TECHNOLOGY


SCHOOL OF ENGINEERING SCIENCES
Pricing Financial Derivatives with
the Finite Difference Method

SARGON DANHO

Degree Projects in Applied Mathematics and Industrial Economics


Degree Programme in Industrial Engineering and Management
KTH Royal Institute of Technology year 2017
Supervisor at University of Wollongong: Dr Xiaoping Lu
Supervisors at KTH: Henrik Hult,
Examiner at KTH: Henrik Hult
TRITA-MAT-K 2017:21
ISRN-KTH/MAT/K--17/21--SE

Royal Institute of Technology


School of Engineering Sciences
KTH SCI
SE-100 44 Stockholm, Sweden
URL: www.kth.se/sci
Pricing Financial Derivatives with the Finite Difference
Method
Sargon Danho
A Thesis for Bachelor of Science in Industrial Engineering and Management with
Specialization in Applied Mathematics
School of Mathematics and Applied Statistics
University of Wollongong

ABSTRACT
In this thesis, important theories in financial mathematics will be explained and de-
rived. These theories will later be used to value financial derivatives. An analytical
formula for valuing European call and put option will be derived and European call
options will be valued under the Black-Scholes partial differential equation using three
different finite difference methods. The Crank-Nicholson method will then be used to
value American call options and solve their corresponding free boundary value prob-
lem. The optimal exercise boundary can then be plotted from the solution of the free
boundary value problem.

The algorithm for valuing American call options will then be further developed to
solve the stock loan problem. This will be achieved by exploiting a link that exists
between American call options and stock loans. The Crank-Nicholson method will be
used to value stock loans and their corresponding free boundary value problem. The
optimal exit boundary can then be plotted from the solution of the free boundary
value problem.

The results that are obtained from the numerical calculations will finally be used
to discuss how different parameters affect the valuation of American call options and
the valuation of stock loans. In the end of the thesis, conclusions about the effect of
the different parameters on the optimal prices will be presented.

KEYWORDS: American Call Option, Black-Scholes Equation,European Option,


Finite Difference Method, Heat Equation, Optimal Exercise Boundary, Optimal Exit
Boundary, Stock Loan
Prissättning av finansiella derivat med den finita differensmetoden

I det här kandidatexamensarbetet kommer fundamentala teorier inom finansiell matematik


förklaras och härledas. Dessa teorier kommer lägga grunden för värderingen av finansiella
derivat i detta arbete. En analytisk formel för att värdera europeiska köp- och säljoptioner
kommer att härledas. Dessutom kommer europeiska köpoptioner att värderas numeriskt med
tre olika finita differensmetoder. Den finita differensmetoden Crank-Nicholson kommer sedan
användas för att värdera amerikanska köpoptioner och lösa det fria gränsvärdesproblemet
(free boundary value problem). Den optimala omvandlingsgränsen (Optimal Exercise
Boundary) kan därefter härledas från det fria gränsvärdesproblemet.
Algoritmen för att värdera amerikanska köpoptioner utökas därefter till att värdera lån med
aktier som säkerhet. Detta kan åstadkommas genom att utnyttja ett samband mellan
amerikanska köpoptioner med lån där aktier används som säkerhet. Den finita
differensmetoden Crank-Nicholson kommer dessutom att användas för att värdera lån med
aktier som säkerhet. Den optimala avyttringsgränsen (Optimal Exit Boundary) kan därefter
härledas från det fria gränsvärdesproblemet.
Resultaten från de numeriska beräkningarna kommer slutligen att användas för att diskutera
hur olika parametrar påverkar värderingen av amerikanska köpoptioner, samt värdering av lån
med aktier som säkerhet. Avslutningsvis kommer slutsatser om effekterna av dessa
parametrar att presenteras.

Nyckelord:

Amerikanska köpoptioner, Black-Scholes ekvation, europeiska optioner, finita


differensmetoden, värmeledningsekvationen, optimala omvandlingsgräns, optimala
avyttringsgräns, lån med aktier som säkerhet
Acknowledgements

I would like to acknowledge Dr. Xiaoping Lu for her guidance and knowledge. This
would not be possible without her.

I would also like to thank the Royal Institute of Technology and the University of
Wollongong for making this exchange semester possible.

Lastly, I would like to thank anyone unmentioned that have supported through the
project.

viii
Table of Contents

List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii


List of Figures/Illustrations . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

1 Introduction 1
Purpose and Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . 2
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Literature Review 5
Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
History of Option Pricing . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hedging with Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Put Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Call Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Option Sensitivities - The Greek Letters . . . . . . . . . . . . . . . . . . . . 10
American Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Marketable collateral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Different Types of Stock Loans . . . . . . . . . . . . . . . . . . . . . . 18
Arbitrage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Efficient-Market Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Random Walk Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3 Mathematical Background 26
Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Heat Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The Heat Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Black-Scholes Model Derivation . . . . . . . . . . . . . . . . . . . . . . . . . 32
European Call Option . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
European Put Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

i
TABLE OF CONTENTS ii

Put-Call Parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Including a Continuous Dividend Yield . . . . . . . . . . . . . . . . . . 47

4 Finite Difference Method 49


Implementing the Finite Difference Method . . . . . . . . . . . . . . . . . . 49
Applying the Finite Difference Method on Option Pricing . . . . . . . . . . . 54
Explicit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Implicit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Crank-Nicholson Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Choice of Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

5 American Options 68
Pricing American Call Options . . . . . . . . . . . . . . . . . . . . . . . . . 69
Optimal Exercise Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

6 Stock Loan 71
The Connection between American Call Options and Stock Loans . . . . . . 72
Deriving the Stock Loan Value from American Call Options . . . . . . . . . 73
Loan Value using American Call Options . . . . . . . . . . . . . . . . . . . . 74
Optimal Exit Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

7 Results and Discussion 76


American Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Stock Loan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

8 Conclusion and Future Work 100

A European Options 103

B Performance Measurement for varying δS 108

C Performance Measurement for varying δt 110

D American Options 112

E Optimal Exercise Boundary 115

F Stock Loan 117

G Optimal Exit Price 120

References 124
List of Tables

4.1 A comparison between the performance of the explicit method, implicit


method and the Crank-Nicholson method for a European option with
K = 100, r = 0.05, σ = 0.2 and T = 1. The computational time is the
average computational time for 100 trials. Explicit: dt = 0.0001 and ds
= 1. Implicit: dt = 0.001 and ds = 0.5. Crank-Nicholson: dt = 0.01
and ds = 0.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

7.1 Results for American call value using the Crank-Nicholson method. The
average computational times is for 100 calculations. Parameters used:
K = 100, r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.0001, δS = 0.5 . . . 78
7.2 Optimal exercise prices for an American call option with the parameters:
K = 100, r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.001, δS = 0.1. . . . . 80
7.3 Stock loan values for different principals. The following parameters were
used: r = 0.06, σ = 0.4, q = 0.03, T = 5, γ = 0.1, δS = 0.001, δt = 0.01 88
7.4 Optimal exit prices for a stock loan with the parameters: T = 20,
r = 0.06, σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01 . . 89
7.5 Optimal exit prices for a stock loan with the parameters: T = 5, r =
0.06, σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01 . . . . . 91

iii
List of Figures

2.1 An illustration of how the strike price and premium affects the profit or
loss of a put option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 An illustration of how the strike price and premium affects the profit or
loss of a call option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 An illustration of the variations in delta for different stock prices. The
parameters for the option with the stock as an underlying asset are the
following: K=100, T=1, σ = 0.2 and r=0.1 . . . . . . . . . . . . . . . . 12
2.4 An illustration of how a variation in the volatility affects the delta. The
constant parameters for the option are the following: K=100, T=1 and
r=0.1. The volatility is σ = 0 for the first option, σ = 0.3 for the second
option and σ = 0.6 for the third option. . . . . . . . . . . . . . . . . . . 14
2.5 A two-step binomial tree for a European option with the parameters:
2
σ = 0.2, r = 0.05, S = 30, K = 30, T = 12 and q = AU D 1. The
1
dividend is discrete and is distributed at t = 12 . The red number
indicate the stock price movement and the blue prices are the option
value for that stock price at that given time. . . . . . . . . . . . . . . . 16
2.6 A two-step binomial tree for an American option with the parameters:
2
σ = 0.2, r = 0.05, S = 30, K = 30, T = 12 and q = AU D 1. The
1
dividend is discrete and is distributed at t = 12 . The red number
indicate the stock price movement and the blue prices are the option
value for that stock price at that given time. . . . . . . . . . . . . . . . 17
2.7 An illustration of how the market-efficiency varies from weak to strong.
The level of efficiency is a scale rather than being seither weak, semi-
strong or strong. The red dot shows an semi-efficient market, which in
most cases is the highest level of efficiency a market will have in practice. 24
2.8 An illustration of the Random Walk Hypothesis. The random arrival
ofnew information will induce a random movement in the price of the
asset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1 An illustration of a normal distribution. . . . . . . . . . . . . . . . . . 31

4.1 An illustration of a graph with three different points. The distance


between each point is equal to h. . . . . . . . . . . . . . . . . . . . . . 51

iv
LIST OF FIGURES v

4.2 An illustration of how the different types of finite difference methods


approximate a given point. A forward approximation is approximating
0
f1 with a secant line through f1 and f2 . A backward approximation
0
is approximating f3 with a secant line through f2 and f3 . A central
0
approximation is approximating f2 with a secant line through f1 and f3 . 52
4.3 An illustration of the price-time mesh used for implementing the finite
difference method. The x-axis is divided into i number of steps, with
the distance δt between each step. The y-axis is divided into j number
of steps, with the distance δS between each step. . . . . . . . . . . . . 55
4.4 Explicit method: An illustration of how the blue, known values, are
used to calculate the red, unknown option value, backward in time. . . 57
4.5 Implicit method: An illustration of which points in the mesh are used
for each iteration in the implicit method. Known values are indicated
by a blue colour and unknown values are indicated by a red colour. . . 59
4.6 Crank-Nicholson method: An illustration of which points in the mesh
are used for each iteration in the Crank-Nicholson method. Known
values are indicated by a blue colour and unknown values are indicated
by a red colour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.7 A comparison between the explicit method, the implicit method and the
Crank-Nicholson method. The plot illustrates the accuracy for a con-
stant δS = 1 for an increasing number of time steps. The performance
is measured on a European option with K = 100, S = 80, r = 0.05,
σ = 0.2 and T = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.8 A comparison on the accuracy between the Crank-Nicholson method
and the Implicit method. The upper plot illustrated the accuracy for
a constant δS = 0.5 with an increasing number of time steps. The
lower plot illustrates the accuracy for a constant δt = 0.01 with an
increasing number of Stock Price steps. The performance is measured
on a European option with K = 100, S = 80, r = 0.05, σ = 0.2 and
T = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

7.1 An illustration of the value of an American call option for varying stock
prices at t = 0. The blue line is the value of the American option and
the red line is the pay-off function. The parameters of the option are
the following: K = 100, r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.0001,
δS = 0.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.2 An illustration of the optimal exercise boundary of an American call
option with the following parameters: K = 100, r = 0.05, q = 0.1,
σ = 0.2, T = 1, δt = 0.001, δS = 0.1. . . . . . . . . . . . . . . . . . . . 81
7.3 An illustration of the optimal exercise boundary of an American call
option for varying volatilities. The following parameters are used: K =
100, r = 0.05, q = 0.1, T = 1, δt = 0.001, δS = 0.1. The blue line have
the volatility σ = 0.2, the red line σ = 0.3 and the yellow line σ = 0.4. . 82
LIST OF FIGURES vi

7.4 An illustration of the optimal exercise boundary of an American call


option for varying risk free interest rates. The following parameters are
used: K = 100, σ = 0.2, q = 0.1, T = 1, δt = 0.001, δS = 0.1. The
blue line have the risk free interest rate r = 0.05, the red line r = 0.075
and the yellow line r = 0.1. . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.5 An illustration of the optimal exercise boundary of an American call
option for varying dividend yield rates. The following parameters are
used: K = 100, σ = 0.2, r = 0.05, T = 1, δt = 0.001, δS = 0.1. The
blue line have the dividend yield rate q = 0.05, the red line q = 0.1 and
the yellow line q = 0.15. . . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.6 An illustration of the optimal exit boundary of a stock loan with the
following parameters: T = 20, r = 0.06, σ = 0.4, q = 0.03, Q = 0.4,
γ = 0.1, δS = 0.001, δt = 0.01 . . . . . . . . . . . . . . . . . . . . . . . 90
7.7 An illustration of the optimal exit boundary of a stock loan with the
following parameters: T = 5, r = 0.06, σ = 0.4, q = 0.03, Q = 0.4,
γ = 0.1, δS = 0.001, δt = 0.01 . . . . . . . . . . . . . . . . . . . . . . . 92
7.8 An illustration of the optimal exit boundary of a stock loan for varying
volatilities. The following parameters are used: T = 5, r = 0.06, q =
0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01. The blue line have the
volatility σ = 0.2, the red line σ = 0.4 and the yellow line σ = 0.6. . . . 93
7.9 An illustration of the optimal exit boundary of a stock loan for varying
risk free interest rates. The following parameters are used: T = 5,
σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01. The blue
line have the risk fre interest rate r = 0.06, the red line r = 0.1 and the
yellow line r = 0.15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
7.10 An illustration of the optimal exit boundary of a stock loan for varying
dividend yield rates. The following parameters are used: T = 5, σ =
0.4, r = 0.06, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01. The blue line
have the dividend yield rate q = 0, the red line q = 0.03 and the yellow
line q = 0.05. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.11 An illustration of the optimal exit boundary of a stock loan for varying
loan interest rates. The following parameters are used: T = 5, σ = 0.4,
r = 0.06, Q = 0.4, q = 0.03, δS = 0.001, δt = 0.01. The blue line have
the loan interest rate γ = 0.1, the red line γ = 0.15 and the yellow line
γ = 0.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Nomenclature

S - Stock price
S0 - Current stock price
Sf - Optimal Price
K - Strike price
σ - Volatility
T - Expiration time
r - The risk-free interest rate
q - Continuous dividend yield rate
P (S, t) - Put option value at time t and stock price S
C(S, t) - Call option value at time t and stock price S
V (S, t) - Option value at time t and stock price S
i - Index for the time in the price-time mesh. i = 0,1,2,...,N
j - Index for the stock price in the price-time mesh. j = 0,1,2,...,M
δt - Time step in Mesh (Finite Difference Method)
δS - Stock price step in Mesh (Finite Difference Method)
fi,j - Mesh point value (Finite Difference Method)
Smax - Maximum stock price (Finite Difference Method)
L(S, t) - Stock loan value at time t and stock price S
Q - Principal
γ - Loan interest rate
φ - Standard normal cumulative distribution
RWH - Random Walk Hypothesis
EMH - Efficient-Market Hypothesis
LTP - Loan-to-portfolio ratio
LTV - Loan-to-value ratio

ix
Chapter 1

Introduction

Options are financial derivatives whose value depends on an underlying asset. Options
are traded as the most common financial derivatives to manage risk. Risk is managed
through hedging against variations in the asset price. Hedging results in a decreased
exposure to risk at the expense of a reduction in potential profits. When trading with
options, one is faced with several choices which will impact the hedge:

• The underlying asset.

• The time to expiration date.

• The strike price.

It is if great significance to understanding how these option settings affect the valua-
tion in order to efficiently hedging a portfolio.

An alternative method that can be utilized to hedge a portfolio is attaining a non-


recourse loan with the portfolio as collateral. The mechanisms behind this type of
hedging are different from the hedging with options. This is because there exists an
additional setting that will impact the possible pay-off. The loan interest rate is an

1
Purpose and Problem Formulation 2

additional parameter that must be considered when hedging with stock loans. Stock
loans can also be utilized for other purposes than hedging. They are used to increase
the liquidity or to increase the volatility of the portfolio. Understanding the impor-
tance of the effects of the stock loan settings on the valuation is important when
trading with stock loans.

Purpose and Problem Formulation

The purpose of this thesis is to immerse in important theories in financial mathemat-


ics and to use these theories to value stock loans and American call options. The
valuation of non-recourse loans with stocks as collateral will be achieved by exploiting
a relationship that exists between stock loans and American call options. From the
valuations of the stock loans and the American call options, the optimal prices will be
calculated. The optimal prices will be used to analyse how variations in parameters
will affect the valuation. The main questions that will be answered in this thesis are
the following:

• How do changes in the volatility, the dividend yield rate and the risk free interest
rate affect the optimal exercise price for an American call option?

• When is it optimal to exercise an American option?

• How do changes in the volatility, the dividend yield rate, the risk free interest
and the loan interest rate affect the optimal exit price for a non-recourse loan
where stocks are used as collateral?

• When is it optimal to exit a stock loan, i.e. sell the collateral and repay the
loan?

• How does an increased leverage affect the growth of the stock loan value?
Limitations 3

Limitations

This thesis will be limited to valuing American call options under the Black-Scholes
equation. For the valuation of stock loans, only non-recourse loans will be consid-
ered.

Methodology

In order to fulfill the purpose of this thesis, two different methods will be used. The
methods included in this thesis are:

• A literature review

• Numerical calculations

The purpose of the literature review is to present theory that will lay the foundation
on which the thesis will build on.

The purpose of the numerical calculations is to obtain results from the mathemat-
ical theory that will provide a basis for discussion from which conclusions can be
drawn from.

Overview

The thesis is organised as follows.

• Chapter 2 will present a review from literature in the area with the purpose of
laying the theoretical foundation on which the rest of the report will build on.
Overview 4

• In chapter 3, important mathematical theories will be derived and explained.


This chapter will lay the mathematical foundation of this thesis.

• Chapter 4 will present how the finite difference method will be applied on the
mathematical problems explained in chapter 3. Furthermore, different finite
difference methods will be evaluated in this chapter.

• Chapter 5 will present the American option problem and the optimal exercise
boundary.

• Chapter 6 will present the connection between American call options and stock
loans. The optimal exit price will also be presented in this chapter.

• Chapter 7 will present and comment on the results attained from the numerical
calculations.

• Chapter 8 will conclude the thesis and provide answers to the problem formula-
tion. Suggestions on future work will then be presented.
Chapter 2

Literature Review

Options

An option is a contract between two parties that agrees upon either selling or buying
an asset at a determined strike price in the future. The buyer of an option will pay a
premium to get the right to hold the contract. The price of the option depends on the
underlying asset, which most commonly is either a stock, commodity, currency or an
index. From a game theory point of view, options are a zero-sum game because the
sum of each party’s gain or loss is exactly equal [19].

Options are commonly used to eliminate risk. The idea is to buy options that have
a negative correlation with the portfolio that will be hedged. The result of this is a
decreased overall volatility of the portfolio. Important properties that are part of an
option contract are the following [32]:

• The time to expiration: This indicates the lifetime of the option.

• Put option or call option: This indicates whether the investor wants to short or

5
Options 6

long the underlying asset.

• The strike price: This is the price at which the option can be exercised. For a
put option, this is the price at which the underlying asset can be sold. For a call
option, this is the price at which the underlying asset can be purchased to.

Furthermore, there are two different option styles: European options and American
options. The fundamental difference that distinguish them from one another is that
the American option includes the additional right of exercising the option at any time
prior to or at the time of expiration. European options lack this right as they can only
be exercised at the time of expiration [17].

History of Option Pricing

The use of options can at least be traced back to 350 B.C. when Aristotle wrote
down the story of a person named Miletus who made fortunes from options on the
right to use olive presses [6]. However, it was not until the 1900s before the first
mathematical attempt to explain options was made. Louis Bachelier introduced the
important theory of Brownian motions and stated that the true value of an options is
equal to the expected value of all future pay-offs [7]. Bachelier’s findings were further
developed by Black, Scholes and Merton with their research 1973 [9]. They created
an analytical formula for valuing European options and introduced the theory of self-
financing portfolios. Since then, the popularity of options has grown tremendously
and options are now considered to be one of the most common financial derivatives
[17].
Options 7

Hedging with Options

Put Options

Put options are financial contracts that regulate the selling of an asset. The holder of
the contract aims to short the underlying asset and have the right, but not the obliga-
tion, to sell the asset to the strike price on a determined future time [17]. The writer
of the put option will, in contrast to the holder of the contract, long the underlying
asset. An example will be explained to illustrate how put options can be exploited
to minimize the risk of a portfolio. Assuming that a portfolio is worth AU D 800 and
holds ten stocks, e.g. The Commonwealth Bank of Australia, with the current stock
price 80 AU D. The owner of the portfolio aims to to minimize the exposure to risk and
speculates that the stocks will decrease in price. Therefore, the owner of the portfolio
purchases 10 put options for 1 AU D each with the strike price AU D 80. Under the
assumption that the stock price on the time of expirations is AU D 75, a profit equal
to 10 · (80 − 75) − 10 · 1 = AU D 40 will be made from the options and the total loss
is reduced from 100 AU D to 60 AU D. However, if the underlying asset price never
decreased below the strike price, then the loss would have been equal to 10 AU D.
Therefore, the total loss from the hedging with options is limited to the premium, in
this example 10 AU D, but the possible theoretical profit that can be made from each
put option in the strike price. The profit is limited to the strike price because the
underlying asset cannot be worth less than zero. The relationship between the strike
price and the premium with the profit for put options is illustrated in figure 2.1.
Options 8

Figure 2.1: An illustration of how the strike price and premium affects the profit or
loss of a put option.

The profit is equal to the pay-off minus the premium. The pay-off from a put option
can be expressed algebraically as follows:

P (S, t) = max(K − S, 0)

The profit is equal to the pay-off minus the premium as follows:

P rof it = P (S, t) − P remium


Options 9

Call Options

Call options are financial contracts that regulate the buying of an asset. The holder
of the contract aims to long the underlying asset and have the right, but not the
obligation, to purchase the underlying asset to the strike price on a determined future
time. Call options are used to eliminate risk, much like put options [17]. An example
will be presented to illustrate how call options can be exploited to minimize the risk
of a portfolio. Assuming that a portfolio is worth 50 AU D and holds 10 stocks, e.g.
Qantas Airways Limited, with the current stock price 5 AU D per stock. The investor
speculates that the stock will decrease in value because of increased oil prices and
wants to buy a call option to hedge the portfolio. Therefore, the holder of the portfolio
purchases 10 options for 1 AU D each with the commodity oil as the underlying asset
to the strike price AU D 30 and the current price AU D 30. Under the assumption that
the commodity price on the time of expiration had increased to AU D 32 and the stock
price had decreased to AU D 3, the total value of the portfolio would have been equal
to (50 − 10 · 2) + 10 · (32 − 30) − 10 · 1 = 40. The loss was reduced by 10 AU D, since
the portfolio would have been been worth AU D 30 if it was not hedged. However, if
the underlying asset never increased above the strike price, the owner of the portfolio
would have suffered a loss equal to 10 AU D. The relationship between the strike price
and the premium with the profit for a call option is illustrated in figure 2.2.
Option Sensitivities - The Greek Letters 10

Figure 2.2: An illustration of how the strike price and premium affects the profit or
loss of a call option.

The pay-off of a call option can be expressed algebraically as follows:

C(S, t) = max(S − K, 0)

The profit is equal to the pay-off minus the premium as follows:

P rof it = C(S, t) − P remium

Option Sensitivities - The Greek Letters

The option sensitives, commonly referred to as the greeks or the greek letters, are
different risk measurements for options. Each risk measurement is the derivative of
the option value with respect to an underlying paramter [15]. The following are three
Option Sensitivities - The Greek Letters 11

common sensitives used in finance:

∂V
• The delta, ∆ = ∂S
. The delta measures the rate of change of the option value
with respect to the change in the underlying asset [17]. Changes in the option
value will induce a change proportional to the delta in the underlying asset.

The delta value is important when hedging a portfolio because it tells the hedger
how sensitive the position is to fluctuations in the underlying asset. If the delta
is equal to zero, then changes in the underlying asset will have no effect on the
option value. This is referred to as delta-neutrality. [17]. Delta-neutrality will
be illustrated with the following example, where it will be assumed that a stock
is currently trading to AU D 10 and an option is currently valued AU D 1. An
investor writes call options on 200 shares and purchases 100 stock shares. If the
stock price increases by AU D 1, a profit equal to AU D1 · 100 = AU D 100 would
be made from the stocks. At the same time, the increase of the stock price would
increase the option value by ∆ · AU D1 = AU D0.5. Consequentely, a total loss
of 0.5 · 200 = AU D100 would have been suffered from the options. Since there is
a gain and a loss of AU D100, the total change of the position’s value is equal to
zero. This is a delta netural position since the changes in the underlying asset
does not affect the total value of the position. However, in practice, one cannot
hedge-and-forget a position. Static hedging does not work because of changes in
the underlying asset price over time. Dynamic hedging is preferable in order to
successfully hedge a position over a longer period of time. The hedge must be
rebalanced periodically in order to sucessfuly hedge a position. [17]. Figure 2.3
illustrates how the delta value variates for different underlying asset prices.
Option Sensitivities - The Greek Letters 12

Figure 2.3: An illustration of the variations in delta for different stock prices. The
parameters for the option with the stock as an underlying asset are the following:
K=100, T=1, σ = 0.2 and r=0.1

As illustrated in figure 2.3, the delta is affected by changes in the underlying


asset. These changes require a periodical hedge rebalancing. For European
options, the delta value can be calculated with the following equation [15]:

Call option : e−qT φ(d1 )

P ut option : e−qT [1 − φ(d1 )]


S 2
ln( K ) + (r + σ2 (T − t)
where d1 = √
σ T −t
Option Sensitivities - The Greek Letters 13

∂2V ∂∆
• The gamma, Γ = ∂S 2
= ∂S
. The gamma measures the changes of the ∆ with
respect to the underlying asset [17]. This measurement is of great importance
when delta-hedging a position because the gamma can be used to protect the
delta-hedge against fluctuations in the underlying asset price. Successfully pro-
tecting a hedge against fluctuations in the underlying asset will result in a better
hedged delta between each periodical rebalancing. A portfolio that is perfectly
protected against variations in the underlying asset price can be referred to as
gamma-neutral.

A gamma and delta hedging approach assumes constant volatility, which is not
the case in practice. The volatility in the underlying asset changes over time and
a gamma and delta hedging approach alone would not perfectly hedge a portfolio.
In figure 2.4, the effects of different volatilities on the delta are illustrated.
Option Sensitivities - The Greek Letters 14

Figure 2.4: An illustration of how a variation in the volatility affects the delta. The
constant parameters for the option are the following: K=100, T=1 and r=0.1. The
volatility is σ = 0 for the first option, σ = 0.3 for the second option and σ = 0.6 for
the third option.

As illustrated in figure 2.4, only one rebalancing needs to be done when the
volatility is equal to zero. For the volatility equal to 0.3, rebalancing is needed
for stock prices varying between 40 and 200. When the volatility is equal to 0.6,
rebalancing is needed for a broader range of underlying asset prices. In addition,
a hedge with a lower volatility will be better hedged between each periodical
rebalancing compared to a hedge with a higher volatility. The strategy to hedge
against the volatility is called vega hedging.

∂V
• The vega, ν = ∂σ
. The vega is used to hedge against fluctuations in the volatility
[17]. If the vega has a highly positive value or a highly negative value, then the
position is very sensitive to fluctuations in the volatility. A vega close to zero
American Options 15

indicates that the portfolio is insensitive to variations in the volatility.

The ideal hedging would be if all the option sensitivities were hedged neutral. However,
this is normally not possible. A gamma-neutral portfolio will generally not be vega-
neutral, for instance. In addition to this, there is a trade-off between transaction
costs and how often one choses to rebalance a hedging position, which limits the
hedger.

American Options

American options are options with an additional right for the holder of the contract.
The option can be exercised at any time prior to or on the day of expiration. An
American option can therefore be worth more than a European option because of
this additional right. The American option can never be worth less than a European
option since the American option will have the same pay-off as a European option if it
is not exercised prior to the time of expiration, but the additional right of being able
to exercise it early will make it possible to obtain a better pay-off in some cases [32].
Assuming that two different portfolios hold one call option each with a stock as the
underlying asset. The strike price is AU D 30 and the current stock price is AU D 30.
The time of expiration is in two months and a discrete dividend will be distributed
after one month. Binomial trees will be used to illustrate how an American option
can have a higher value than a corresponding European option. Portfolio A holds a
European call option and portfolio B holds an American call option. The considered
option has the following parameters: σ = 0.2, r = 0.05 and q = AU D 1. The following
American Options 16

values are obtained for the up and down movements:

√ √1
u = eσ ∆t
= e 12
1 √1
d= = e− 12
u √1
1
er∆t − d e−0.05· 12 − e− 12
p= = √1 √ 1 = 0.44...
u−d e 12 −e − 12

The binomial tree obtained for portfolio A can be seen in figure 2.5.

Figure 2.5: A two-step binomial tree for a European option with the parameters:
2
σ = 0.2, r = 0.05, S = 30, K = 30, T = 12
and q = AU D 1. The dividend is discrete
1
and is distributed at t = 12
. The red number indicate the stock price movement and
the blue prices are the option value for that stock price at that given time.

The binomial tree obtained for portfolio B can be seen in figure 2.6.
American Options 17

Figure 2.6: A two-step binomial tree for an American option with the parameters:
2
σ = 0.2, r = 0.05, S = 30, K = 30, T = 12
and q = AU D 1. The dividend is discrete
1
and is distributed at t = 12
. The red number indicate the stock price movement and
the blue prices are the option value for that stock price at that given time.

As illustrated, the value of the different options differ despite the fact that they both
hold two options with the same settings, i.e. strike price, underlying asset and time
of expiration. Portfolio B, which holds an American option, is worth 31% more than
portfolio A. The early exercise right before the dividend yield is the reason why the
American option has a higher value and this is an important relationship between
American call options and European call options, since they will always have the same
value if the underlying asset does not pay any dividends.
Marketable collateral 18

Marketable collateral

Marketable collateral refers to the use of financial assets as collateral for a loan. For
an asset to be considered marketable, it must be sold in regulated markets at a fair
market value [8]. To fulfill these requirements, the asset must have a high liquidity and
the spread between buyers and sellers must be small. A loan with a financial asset as
collateral is a good alternative to increase the liquidity without selling parts of one’s
portfolio. Henceforth, stocks will be considered as the asset used as collateral. The
way stock loans work is that the lender, often a bank or a private firm, offers a loan
in exchange for having custody of the collateral stocks. In addition, the loan can also
include agreements on lending limits and loan-to-value ratios [22]. The purpose of this
is to manage the risk for the lender. In the loan agreement, the lender may have the
right to sell the stocks if changes in the price of the collateral affects the limits in the
agreement.

Furthermore, there exists two types of loans which will be explained more in depth
in the next section. The two types of loans are recourse loans and non-recourse
loans.

Different Types of Stock Loans

Recourse Loan

This type of loan is common for home loans in Europe [23], but is also starting to
appear as an alternative for loans with stocks as collateral. Recourse loans give the
lender the right to collect the debt from all the borrower’s assets if the collateral does
not cover the loaned amount plus accumulated interest [30]. This means that the loss
Marketable collateral 19

is not limited for the borrower. In the financial industry, this type of loan exists as a
stock loan option for private investors. Avanza and Nordned are examples of brokerage
firms which offer this type of loans [2] [3]. The stock loan offered by Avanza will be
used to illustrate how recourse stock loans can work in practice.

To be able to use the service, one must apply for credit. Once a credit has been
approved, one may use the credit for stock loans and no interest will be charged as
long as the credit is not used. Interest will start to accumulate when the investor ac-
quires stocks on credit. The stocks purchased on credit will then be considered as the
collateral. The interest rate on the loan will differ depending on the risk associated
with the collateral stock. Some selected stocks are eligible for lower interest rates.
Furthermore, one must meet the diversification requirements and also not exceed the
loan-to-portfolio ratio (LTP):

Borrowed Amount + Accumulated Interest


LT P = (2.1)
Current P ortf olio V alue

If the LTP limit is exceeded, a warning will be sent to the borrower who will be given
a reasonable amount of time to either deposit cash or sell some assets. If the borrower
fails to meet the requirements, then the brokerage firm will sell the collateral assets
and make sure the loan agreement is fulfilled.

Recourse loans will not be the focus in this report and will therefore not be val-
ued. The type of loans that will be valued and elaborated upon in this thesis are
non-recourse stock loans.
Marketable collateral 20

Non-Recourse Loan

The main difference between non-recourse loans and recourse loans is the degree of
power the lender has to collect the debt. For non-recourse loans, the lender can only
seize the collateral if the borrower does not pay back the borrowed amount. The lender
cannot go after any other assets to seek compensation [30], which is the case with re-
course loans. Because of this, the loss is limited for the borrower for non-recourse loans.

This type of loan is riskier for the lender which causes the lender to execute more
thorough assessments and have stricter requirements on the borrower. One measure-
ment used to manage risk for this type of loan is the loan-to-value ratio (LTV) [22]:

Borrowed Amount + Accumulated Interest


LT V = (2.2)
V alue of Collateral

A high LTV ratio is associated with a higher risk for the lender. For stock loans, the
LTV increases if the collateral stock decreases in price. If the LTV is larger than 1,
it means that the value of the collateral is smaller than the borrowed amount. In
this case, the borrower might choose to surrender the stocks and cannot be held liable
for returning the borrowed amount that is not covered by the collateral. In the case
where the stocks increase in value, the borrower can sell the stock, repay the loan and
gain a profit equal to the difference between the stock price and the principal plus the
accumulated interest [20]. For loans where stocks are used as collateral, the borrower’s
profit can be expressed as follows:

S − (Qeγt )
Arbitrage 21

The lender will make a profit from the accumulated interest and fees.

Arbitrage

Arbitrage is a term defining the use of imbalances between different markets and a
profit completely free from risk can be made [31]. There are arbitrage opportunities
when an asset does not have the same price on all markets where it is traded. There
is also an arbitrage opportunity if an asset with a known future price is not traded
at the discounted price to the risk-free interest rate. Arbitrage can mathematically
be defined as that the (n + 1) dimensional portfolio θ(t) = θ0 (t), ..., θn (T ) and must
satisfy the following conditions for all expiration times T > 0 [17]

V θ (0) = 0





V θ (T )) ≥ 0 , where V θ is the value of the portf olio and P denotes the probability.



P (V θ (T ) > 0) > 0

An example of how an arbitrage opportunity can be exploited in an exchange market


will now be illustrated with an example where all transaction costs and spreads be-
tween buyers and sellers are ignored:
Assuming that the currencies Australian Dollar and Swedish Kronor are currently
trading at AU D 6 / SEK 1 in the currency exchange market and that a particular
stock is traded to 10 AU D per stock in the Australian market and to 90 SEK per
stock in the Swedish market. An arbitrage opportunity exists since an arbitrageur can
borrow 10 AU D, buy one stock and sell it in the Swedish market for 90 SEK. After
converting the profit back to AU D and repaying the loan, the arbitrageur will have a
risk-free profit of 5 AU D.
Efficient-Market Hypothesis 22

When arbitrage is possible, arbitrageurs will always try to fully exploit the oppor-
tunity. In the example above, arbitrageurs would not limit their profit to one share.
Instead the would buy as many stocks as possible to maximize their risk-free profit.
The consequences that would follow from this would be that the demand for borrow-
ing AU D and the demand on the shares in the Australian market would increase.
Simultaneously, the supply of the stock in the Swedish market would increase. This
would eliminate the arbitrage opportunity since the increased demand will increase the
stock price in the Australian market and the increased demand on borrowing AU D
would increase the price of the currency. At the same time, the increased supply would
decrease the stock price in the Swedish market. The arbitrage opportunity would con-
sequently be completely eliminated.

Since arbitrage opportunities instantly get eliminated, it is reasonable to assume that


no arbitrage opportunities exist when calculating option- and stock loan values. Conse-
quently, all calculations in this report are written under the assumption that arbitrage
does not exist.

Efficient-Market Hypothesis

The efficient-market hypothesis (EMH) states that there are certain conditions which
must be satisfied in order for a market to be efficient. Eugene Famas introduced the
idea that stocks trade at their true value at any given time in an efficient market,
which implies that it is not possible to buy disvalued assets with whom an investor
can obtain excess return [14]. The following conditions must be satisfied in order for
a market to be efficient according to Fama [13]:

• Arbitrage does not exist.


Efficient-Market Hypothesis 23

• All information is freely available. The market price factor in all available infor-
mation. Existing information cannot be used to create excess return.

• The market value assets rationally, even though single individuals might act
irrationally. The idea is that the net effect of all investors will result in a rational
market. If an irrational investor creates arbitrage opportunities, then rational
investors will exploit the opportunity.

Different forms of efficient markets are identified by the EMH. Markets are mainly
divided into three different forms: the weak efficient market, the semi-strong efficient
market and the strong efficient market [14].

The weak market is characterized by a lack of predictability. Prices only reflect past
information and future prices are assumed to follow random walks with no predictable
patterns. Therefore, one can assume that excess return cannot be earned using strate-
gies based on historical data. A technical analysis is consequently useless, while a
fundamental analysis can be used successfully to find disvalued stocks since all infor-
mation is not effectively factored in the price.

The semi-strong efficient market factor in all publicly available information in the
stock prices. Firm-specific information, as well as macro-economic information are
factored in. Prices reflect historical data as well as future data. Examples of future
information are annual reports, analyst reports and prognoses. New information is
reflected immediately. For semi-strong efficient markets, one can assume that neither
technical analysis or fundamental analysis can be utilized to obtain excess returns.
Only non-available information can be used to obtain excess return.

The strong efficient market is a market where all information is available, including
Random Walk Hypothesis 24

information considered as insider information. Due to the nature of this efficiency-


form, one cannot utilize strategies to beat the market, since all stocks are traded at
their true value.

Figure 2.7: An illustration of how the market-efficiency varies from weak to strong.
The level of efficiency is a scale rather than being seither weak, semi-strong or strong.
The red dot shows an semi-efficient market, which in most cases is the highest level of
efficiency a market will have in practice.

Different markets vary in efficiency, but one can assume that a market can be semi-
strong at best [5], e.g. due to legislation around insider information. Additionally, the
variation of efficiency can be seen as a scale rather than as being either strong, semi-
strong or weak. Large cap markets tend to be closer to semi-strong in figure 2.7 while
Small Cap markets tend to be weaker. Therefore, in real life, it is possible to obtain
excess return. Weaker markets offer more opportunities to find disvalued stocks. In
this thesis, all calculations will be carried on under the assumptions of markets being
strongly-efficient.

Random Walk Hypothesis

The Random Walk Hypothesis (RWH) is a theory that suggests that stocks take
random path. According to the RWH, prices of assets will change randomly as new
information arrives randomly [7] [26]. This is illustrated in figure 2.8.
Random Walk Hypothesis 25

Figure 2.8: An illustration of the Random Walk Hypothesis. The random arrival
ofnew information will induce a random movement in the price of the asset.

The RWH is connected to the efficient-market hypothesis [29], since it assumes that
assets are correctly priced and only the random arrival of information will affect the
price. A random walk is a discrete-time process but have been approached mathemat-
ically in continuous time with Brownian motions. Brownian motions are commonly
referred to as continuous-time random walks and will be further explained in the next
chapter.
Chapter 3

Mathematical Background

Brownian Motion

A Brownian motion, or a continuous-time random walk, is a stochastic process that


originally was used to explain the random walk of particles in fluids. The idea of
Brownian motions was first introduced by Robert Brown in 1827 [27], but was not
completely explained until 1905 by Albert Einstein [1]. It was not until 1965 that the
first serious attempts to apply Brownian motions to the field of financial mathematics
were made [25]. These attempts were made by Paul Samuelson with his studies of
Geometric Brownian Motions that described log-normally distributed returns from
assets. This is also called a wiener process, which is a special case of Markov stochastic
processes. The first property that must be fulfilled in order for a variable z to follow
a wiener process is the following [17]:


∆z = φ ∆t, where φ is a standard normal distribution. (3.1)

26
Brownian Motion 27

Furthermore, the following property must be fulfilled [17]:

∆z at dif f erent time steps ∆t are independent.

The first property indicates that ∆z is normally distributed with E[∆z] = 0 and

V ar[∆z] = ( ∆z)2 = ∆z. The second property indicates that z has Markovian prop-
erties.

The change of the mean for each time step is called the drift rate and the variance
is called the variance rate [17]. In this case, the drift rate is equal to zero and the
variance rate is equal to one. When the drift rate is equal to zero, means that any
expected future value of z is equal to the current value. When the variance rate is
equal to 1, it means that for a time interval T , the change in z will be equal to T .
From this, a generalized Wiener process can be expressed for x in terms of dz:

dx = αdt + βdz (3.2)

The variables α and β are constants. The first term indicates the expected drift rate
for each time step and the second term adds variability to the path of the process.
Considering a small time step ∆t and combining equation 3.2 with equation 3.1 will
give the following equation:


∆x = α∆t + βφ ∆t (3.3)

For this equation, the normal distribution φ has the mean E[∆x] = a∆t and the vari-
ance V ar[∆x] = b2 ∆t. From this, it follows that the expected drift rate is equal to α
for each time step and the added variability to the path is equal to β 2 for each time
Brownian Motion 28

step. To apply this on stock prices, one cannot assume that the drift rate and the
variance rate are constants.

A formula for the stock price movement with the assumption of no noise can be
obtained by considering equation 3.3 with the noise removed, i.e. set dz = 0. Consid-
ering a short interval of time ∆t under the assumption that the expected change in
the stock price ∆S is equal to µS∆t, one obtains the following equation:

∆S = µS∆t
(3.4)
dS
As ∆t → 0, dS = µSdt ⇔ = µdt
S

Equation 3.4 will be integrated to obtain a formula for the stock price under the
assumption that variability or noise is non-existent:

Z ST Z T
dS
= µdt
S0 S 0

⇒ [ln S]SST0 = [µt]T0

⇒ ln ST − ln S0 = µT
(3.5)
ST
⇒ ln = µT
S0
ST
⇒ = eµT
S0
⇒ ST = S0 eµT , where ST ≥ 0 and S0 ≥ 0

In other words, if there exists no uncertainties, the stock at time T would grow with
the factor eµT from the current price S0 . This formula is valid for risk-free assets, but
iis not valid for other assets as noise or variability must be included. The variable σ
which denotes the standard deviation will be introduced under the assumption that
the variability is the same regardless of the stock price. From this it follows that the
Heat Equation 29

standard deviation σ should be proportional to the stock price. The following equation
is obtained when combining this with equation 3.3 and equation 3.4:

dS = µSdt + σSdz (3.6)

Equation 3.6 is known as the geometric Brownian motion and is the most common
model for stock price behaviour. The standard deviation σ is commonly referred to as
the volatility and µ as the expected rate of return for the stock. From a risk-neutral
approach, µ is equal to the risk-free interest rate r. [17]

Heat Equation

The heat equation models the diffusion of heat in a continuous medium [18]. This
model is one of the most successfully implemented models in applied mathematics.
The heat equation have the following important features [32]:

• The heat equation is a linear equation.

• The heat equation is a second order partial differential equation.

• The heat equation is a parabolic equation and changes made at a particular point
will therefore have an instantaneous effect on everywhere else in the system.

The homogeneous heat equation is defined as follows [32]:

∂u ∂ 2u
=k· 2 (3.7)
∂t ∂x

The heat equation is in forward time and in this thesis, it will be used to solve the
Black-Scholes partial differential equation. The Black-Scholes partial differential equa-
The Heat Kernel 30

tion will be reduced into the heat equation and then solved using its fundamental
solution, which will transform the problem into an integral.

The Heat Kernel

The heat kernel is a fundamental solution for a homogeneous heat equation with a
given initial data in some point. In this thesis, the heat kernel will be used to solve
the heat equation in order to obtain an analytical solution of the Black-Scholes partial
differential equation. The fundamental solution is defined as follows [11]:

Z ∞
1 (x−y)2
u(x, t) = √ e− 4kt g(y)dy
 4πkt −∞

 ∂u = k · ∂ 2 u2
 (3.8)
∂t ∂x

u(x, 0) = g(x)

Normal Distribution

The normal distribution function is an important distribution in probability theory


and is commonly used for modelling asset returns. The normal distribution is used in
the Black-Scholes model to value European options. The normal distribution depends
on two parameters [28]:

• The mean, µ ∈ R, which is the expectation of the normal distribution.

• The variance, σ 2 > 0, which measures the magnitude of the spread from the
mean.

In the Black-Scholes formula, it is the normal cumulative distribution that is used.


The cumulative distribution, usually denoted as φ(X), is the probability that X will
Normal Distribution 31

be equal to or less than x, expressed as FX (x) = P (X ≤ x). The normal cumulative


distribution function is defined with the following equation [28]

Z x
1 t2
φ(x) = √ e− 2 dt (3.9)
2π −∞

The normal distribution is a symmetric distribution, which means that it is mirrored


around a vertical line of symmetry. This is clearer if one look at the illustration of a
normal distribution in figure 3.1.

Figure 3.1: An illustration of a normal distribution.

From this it follows that there is a relationship between any given points with the same
distance to the vertical line. This relationship is defined with the following equation
[28]:

φ(x) = 1 − φ(−x) (3.10)


Black-Scholes Model Derivation 32

Black-Scholes Model Derivation

The Black-Scholes partial differential equation will be used to derive an analytical


formula for European call, and put options. The following assumptions are made
when deriving the Black-Scholes equation:

• The asset price follows a geometric random walk.

• The risk free interest rate and the volatility are known during the lifetime of the
option.

• There are no transaction costs.

• There are no arbitrage.

From the first assumption, it follows that the asset price follows the model from equa-
tion 3.6:

dS = σSdz + µSdt

Since it is known that dS is a number, then it follows that:

dS 2 = (σSdz + µSdt)2 = σ 2 S 2 dz 2 + 2σµS 2 dtdz + µ2 S 2 dt2 (3.11)

The following convergence is true [32]:

dz 2 → dt as dt → 0 (3.12)
Black-Scholes Model Derivation 33

From equation 3.12, it follows that:

dS 2 = σ 2 S 2 dt when dt → 0 (3.13)

Assuming that V(S,t) is a function of the asset price and the time. If the asset price
S is varied by a small change dS, then the function V will also change by a small
amount. Using Taylor series expansions, this can be expressed as:

∂V ∂V 1 ∂ 2V 2
dV = dS + dt + · δS + ..., (3.14)
∂S ∂t 2 ∂S 2

Combining equation 3.14 with equation 3.6 and equation 3.11, one obtains the follow-
ing equation:

∂V ∂V 1 ∂ 2V ∂V
dV = σS dz + (µS + σ2S 2 2 + ) (3.15)
∂S ∂S 2 ∂S ∂t

This is Ito’s lemma as a small change in the random variable relates to the small
change in the function [32].

The value of one portfolio consisting of one stock can be expressed with the func-
tion V (S, t) [17]:

Π = V − ∆S (3.16)

For each time step, the change in the value of the portfolio can be expressed with the
following equation:

dΠ = dV − ∆dS (3.17)
Black-Scholes Model Derivation 34

Inserting the value for dS from equation 3.6 and the value dV from equation 3.15 into
equation 3.17 gives the following equation:

∂V ∂V 1 ∂ 2V ∂V
dΠ = σS( − ∆)dz + (µS + σ2S 2 2 + − µ∆S)dt (3.18)
∂S ∂S 2 ∂S ∂t

To eliminate eliminate the random component σS( ∂V


∂S
− ∆), the delta will be set to:

∂V
∆= (3.19)
∂S

This results in the following equation:

∂V 1 2 2 ∂ 2V
dΠ = ( + σ S )dt (3.20)
∂t 2 ∂S 2

The return on the invested amount Π must grow to the risk free interest rate in order to
eliminate arbitrage. Consequently, the following equality must be true dΠ = rΠdt for
each time step. From this, combined with equation 3.20, equation 3.19 and equation
3.16, the following equation is obtained:

∂V 1 ∂ 2V ∂V
+ σ 2 S 2 2 + rS − rV = 0 (3.21)
∂t 2 ∂S ∂S

This partial differential equation is known as the Black-Scholes equation [17].


Black-Scholes Model Derivation 35

European Call Option

The Black-Scholes partial differential equation for a European call option with Value
C(S,t) is defined with the following equation:

∂C 1 2 2 ∂ 2 C ∂C
+ σ S 2
+ rS − rC = 0 (3.22)
∂t 2 ∂S ∂S

The Black-Scholes partial differential equation [equation 3.22] has the following bound-
ary and final conditions for a call option:

C(0, t) = 0

C(S, t) = S when S → ∞ (3.23)

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

Equation 3.22 and 3.23 will be combined to obtain an analytical solution for valuing
European call options. The first step to solving the Black-Scholes partial differential
equation is to classify the differential equation in order to be able to choose an efficient
solution strategy. The following general formula for the classification of second order
partial differential equations will be used for this purpose [28]:

auxx + buxy + cuyy + dux + euy + f u + g = 0

b2 − 4ac < 0 → elliptic


(3.24)
b2 − 4ac = 0 → parabolic

b2 − 4ac > 0 → hyperbolic

The following values from the Black-Scholes partial differential equation can now be
Black-Scholes Model Derivation 36

identified for the constants a, b and c in Equation 3.24:

1
a = σ2S 2
2
b=0

c=0

This results in b2 − 4ac = 0, which implies that the partial differential equation can be
classified as parabolic. An efficient strategy for solving parabolic partial differential
equations is to reduce the differential equation into the heat equation. The first step of
this reduction is to make a substitution of variables with the purpose of reducing the
Black-Scholes partial differential equation into the heat equation. The Black-Scholes
differential equation is in backward time with the initial data given at t=T. This must
be reversed. Furthermore, the S 2 term and the S term must be eliminated. To achieve
1
that, a function whose first derivative contains S
and whose second derivative contains
1
S2
is needed. The following new variables are introduced:

 
τ σ2


 t=T− 1 2
σ


 τ= 2
(T − t)

 2 

S = Kex → x = ln KS (3.25)

 

 
C(S, t) = Kv(x, τ )
 v(x, τ ) = 1 C(S, t)

K

The following derivatives can now be calculated from the change of variables from
Black-Scholes Model Derivation 37

equation 3.25:

∂C ∂v ∂τ ∂v σ 2
=K · = −K ·
∂t ∂τ ∂t ∂τ 2

∂C ∂v ∂x ∂v 1
=K · =K ·
∂S ∂x ∂S ∂x S
(3.26)
∂ 2C ∂ ∂C ∂ ∂v 1 ∂v 1 ∂ ∂v 1
2
= ( )= (K ) = −K · 2 +K ( ) =
∂S ∂S ∂S ∂S ∂x S x S ∂S ∂x S

∂v 1 ∂ ∂v ∂x 1 ∂v 1 ∂ 2v 1
= −K · 2 +K ( ) = −K · 2 +K 2 · 2
x S ∂x ∂x ∂v S x S ∂x S

The terminal condition can now be calculated for the function v(x, τ ) from equation
3.25:

1 1
v(x, 0) = C(S, T ) = max(Kex − K, 0) = max(ex − 1, 0) (3.27)
K K

The derivatives from equation 3.26 are then substituted into the Black-Scholes partial
differential equation [equation 3.22]:

∂v σ 2 σ 2 2 ∂v 1 ∂2 1 ∂v 1
−K · + S (−K · 2 + K 2 · ) + rS(K · ) − rKv = 0 (3.28)
∂τ 2 2 ∂x S ∂x S x S

Terms are cancelled in equation 3.28 and the common factor K is factorized using the
distributive law backwards. This results in the following:

∂v ∂ 2v ∂v r
= 2
+ (k − 1) − kv, where k = σ2 (3.29)
∂τ ∂x ∂x 2

The first order derivative and the zero-order derivative must be eliminated in equa-
Black-Scholes Model Derivation 38

tion 3.29 to fully reduce the Black-Scholes partial differential equation into the heat
equation. This will be done using an ansatz for the solution to the function v:

Ansatz : v = eαx+βτ u(x, τ )

vτ = βeαx+βτ u + eαx+βτ uτ
(3.30)
αx+βτ αx+βτ
vx = αe u+e ux

vxx = α2 eαx+βτ u + 2αeαx+βτ ux + eαx+βτ uxx

The ansatz and its derivatives from equation 3.30 are substituted into equation 3.29.
The following is then obtained:

βu + uτ = α2 u + 2αux + uxx + (k − 1)(αu + ux ) − kv


(3.31)
→ uτ = uxx + ux (2α + (k − 1)) + u(α + (k − 1)α − k − β)

2
The constants α and β are set to α = − k−1
2
and β = − (k+1)
4
in order to eliminate the
unwanted terms. The full reduction of the Black-Scholes partial differential equation
into the heat equation is obtained when inserting the constants into equation 3.31 and
the terminal condition is obtained from the ansatz in equation 3.30:

ut = uxx
(3.32)
k−1
u(x, 0) = e−αx v = ex 2 max(ex − 1, 0)

At this point, the Black-Scholes partial differential equation is fully reduced into the
heat equation, and the heat kernel fundamental solution can be used to solve the heat
equation. When combining equation 3.32 with the fundamental solution [equation
Black-Scholes Model Derivation 39

3.8], the following integral is obtained:

Z ∞
1 (x−s)2
u(x, τ ) = √ u0 (s)e− 4τ ds
2 πτ −∞

The following substitution of variable is made to solve the integral:

(s − x) 1
z= √ → dz = − √ dx
2τ wτ

The following is obtained from the change of variables:

1
Z ∞ √ z2
u(x, τ ) = √ u0 (z 2τ + x)e− 2 dz
2π −∞

The following is obtained from equation 3.32:

x
z > − √ f or u0 > 0

Z ∞ √
Z ∞ √
1 k+1
− z2 1 k−1 z2
→√ e 2 (x+z 2τ )
e 2 dz − √ e 2 (x+z 2τ ) e− 2 dz = I1 − I2
2π − √x2τ 2π − √x2τ

T he integrals I1 and I2 will be solved separately.

The terms containing z will be separated from the terms which do not contain z in the
exponents:

k+1 √ z2 1 √ k+1
I1 : (x + z 2τ ) − = − (z 2 − 2τ (k + 1)z) + x=
2 2 2 2
1 √ (k + 1)2 k+1 (k + 1)2
= − (z 2 − 2τ (k + 1)z + τ )+ x+τ =
2 r 2 2 4
1 τ k+1 (k + 1)2
= − (z − (k + 1))2 + x+ τ
2 2 2 4
Black-Scholes Model Derivation 40

(k+1)2 τ
e
(k+1)x
2
+ 4
Z ∞
1
√τ
(k+1)2 )
→ I1 = √ e− 2 (z− 2 dz
2π −x

k−1 √ z2 1 √ k−1
I2 : (x + z 2τ ) − = − (z 2 − 2τ (k − 1)z) + x=
2 2 2 2
1 √ (k − 1)2 k−1 (k − 1)2
= − (z 2 − 2τ (k − 1)z + τ )+ x+τ =
2 r 2 2 4
1 τ k−1 (k − 1)2
= − (z − (k − 1))2 + x+ τ
2 2 2 4

(k−1)2 τ
e
(k−1)x
2
+ 4
Z ∞
1
√τ 2
→ I2 = √ e− 2 (z− 2 (k−1) ) dz
2π −x

Another change of variable is made to simplify the equations:

r
τ
I1 : y = z − (k + 1) ∂y = ∂z
2
(k+1)x (k+1)2 τ Z

e 2 + 4 2
− y2
→ I1 = √ √ e dz
2π −x


− τ2 /k+1)

r
τ
I2 : y = z − (k − 1) ∂y = ∂z
2
(k−1)x (k−1)2 τ Z

e 2 + 4 2
− y2
→ I2 = √ √ e dz
2π −x


− τ2 /k−1)

The equations can now be rewritten using the cumulative distribution function of a
normal distribution [equation 3.9]. When doing so, the following solutions for I1 and
Black-Scholes Model Derivation 41

I2 are obtained:
r
(k+1)x
+
(k+1)2 τ x τ
I1 = e 2 4 φ(d1 ), where d1 = √ + (k + 1)
2τ 2
r
(k−1)x
+
(k−1)2 τ x τ
I2 = e 2 4 φ(d2 ), where d2 = √ + (k − 1)
2τ 2

The variables will now be changed back to their original variables:

σ2
τ= (T − t)
2
S
x = ln
K
1
v(x, τ ) = C(S, t)
K
C(S, t) = Kv(x, τ )

The following analytical solution is obtained for the value of a call option:

C(S, t) = Sφ(d1 ) − Ke−r(T −t) φ(d2 )

where,
2
S
ln( K ) + (r + σ2 (T − t) (3.33)
d1 = √
σ T −t
2
S
ln( K ) + (r − σ2 (T − t) √
d2 = √ = d1 − S T − t
σ T −t

European Put Option

The Black-Scholes partial differential equation for a European put option with value
P(S,t) is defined with the following equation:

∂P 1 ∂ 2P ∂P
+ σ 2 S 2 2 + rS − rP = 0 (3.34)
∂t 2 ∂S ∂S
Black-Scholes Model Derivation 42

The Black-Scholes partial differential equation [equation 3.34] has the following bound-
ary and final conditions for a put option:

P (0, t) = Ke−r(T −t)

P (S, t) = 0 when S → ∞ (3.35)

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

The strategy for solving this partial differential equation is similar to the solution
strategy of the call option since the only difference is the boundary conditions. There-
fore, a reduction of the equation into the heat equation will be an efficient strategy.
The same changes of variables as for the solution for the call option are made and the
same differential equations are obtained:
 
τ σ2


 t=T− 1 2
σ


 τ= 2
(T − t)

 2 

S = Kex → S
x = ln K

 

 
P (S, t) = Kv(x, τ )
 v(x, τ ) = 1 P (S, t)

K

∂P ∂v ∂τ ∂v σ 2
=K · = −K ·
∂t ∂τ ∂t ∂τ 2

∂P ∂v ∂x ∂v 1
=K · =K ·
∂S ∂x ∂S ∂x S

∂ 2P ∂ ∂P ∂ ∂v 1 ∂v 1 ∂ ∂v 1
= ( ) = (K · ) = −K · + K ( ) =
∂S 2 ∂S ∂S ∂S ∂x S x S2 ∂S ∂x S

∂v 1 ∂ ∂v ∂x 1 ∂v 1 ∂ 2v 1
= −K · 2 +K ( ) = −K · 2 +K 2 · 2
x S ∂x ∂x ∂v S x S ∂x S
Black-Scholes Model Derivation 43

The terminal condition for a put option is different from the terminal condition for
a call option because of the difference in the boundary and final conditions [equa-
tion 3.35]. From the boundary and final conditions for a put option one obtains the
following terminal condition:

1 1
v(x, 0) = P (S, T ) = max(K − Kex , 0) = max(1 − ex , 0) (3.36)
K K

The following is obtained when substituting the derivatives into the Black-Scholes
partial differential equation [equation 3.34]:

∂v ∂ 2v ∂v r
= 2
+ (k − 1) − kv, where k = σ2 (3.37)
∂τ ∂x ∂x 2

To fully reduce the Black-Scholes partial differential equation into the heat equation,
the same ansatz as before is used. This results in the following equations:

Ansatz : v = eαx+βτ u(x, τ )

vτ = βeαx+βτ u + eαx+βτ uτ
(3.38)
αx+βτ αx+βτ
vx = αe u+e ux

vxx = α2 eαx+βτ u + 2αeαx+βτ ux + eαx+βτ uxx

The ansatz and its derivatives from equation 3.38 are substituted into equation 3.37.
The following is then obtained:

βu + uτ = α2 u + 2αux + uxx + (k − 1)(αu + ux ) − kv


(3.39)
→ uτ = uxx + ux (2α + (k − 1)) + u(α + (k − 1)α − k − β)

Choosing α and β in the same manner as before reduces the Black-Scholes partial
Black-Scholes Model Derivation 44

differential equation for put options into the heat equation:

ut = uxx
(3.40)
αx x k−1 x
u(x, 0) = e v = e 2 max(1 − e , 0)

The following is obtained when applying the fundamental solution [equation 3.8]:

Z − √x √
Z − √x √
1 2τ k−1
(x+z
2
2τ ) − z2 1 2τ k+1
(x+z
2
2τ ) − z2
√ e 2 e dz − √ e 2 e dz = I1 − I2
2π −∞ 2π −∞

T he integrals I1 and I2 will be solved separately.

Separating the terms containing z from the terms which do not contain z gives the
following integrals:

(k−1)2 τ
e
(k−1)x
2
+ 4
Z −x

2τ 1
√τ 2
I1 = √ e− 2 (z− 2 (k−1) ) dz
2π −∞

(k+1)2 τ
e
(k+1)x
2
+ 4
Z −x

2τ 1
√τ 2
I2 = √ e− 2 (z− 2 (k+1) ) dz
2π −∞

Another change of variables is made:

r
τ
I1 : y = z − (k − 1) ∂y = ∂z
2
(k−1)x (k−1)2 τ Z √
−x

− τ2 /k−1)
e 2 + 4 2τ y2
→ I1 = √ e− 2 dz
2π −∞

r
τ
I2 : y = z − (k + 1) ∂y = ∂z
2
(k+1)x (k+1)2 τ Z √
−x

− τ2 /k+1)
e 2 + 4 2τ y2
→ I2 = √ e− 2 dz
2π −∞
Black-Scholes Model Derivation 45

The integrals can now be rewritten by using the cumulative distribution function of
a normal distribution [equation 3.9]. The following solutions are obatined for I1 and
I2 :
r
(k−1)x
+
(k−1)2 τ x τ
I1 = e 2 4 φ(−d2 ), where d2 = √ + (k − 1)
2τ 2
r
(k+1)x
+
(k+1)2 τ x τ
I2 = e 2 4 φ(−d1 ), where d1 = √ + (k + 1)
2τ 2

The variables will now be changed back into their original variables:

σ2
τ= (T − t)
2
S
x = ln
K
1
v(x, τ ) = C(S, t)
K
P (S, t) = Kv(x, τ )

The following analytical solution is obtained for the value of a put option:

P (S, t) = Ke−r(T −t) φ(−d2 ) − Sφ(−d1 )

where,
2
S
ln( K ) + (r + σ2 (T − t) (3.41)
d1 = √
σ T −t
2
S
ln( K ) + (r − σ2 (T − t) √
d2 = √ = d1 − S T − t
σ T −t

Put-Call Parity

The put-call parity is an important relationship between the prices of European put
options and European call options, if they have the same strike price, the same un-
derlying asset and the same time to maturity. This relationship must always be valid,
Black-Scholes Model Derivation 46

since arbitrage will exist if it is not. The put-call parity is defined by the following
mathematical equation [17]:

C(t) − P (t) = S − Ke−r(T −t) (3.42)

Expressed in words, the difference between the price of a call option and a put option
is equal to the stock price minus the discounted strike price. The put-call parity
formula will now be confirmed using the analytical solutions obtained in equation 3.33
and equation 3.41. According to equation 3.42, the following equation can be used to
calculate the put option value:

P (t) = C(t) + Ke−r(T −t) − S

Equation 3.33 will now be inserted instead of C(t). The following is obtained:

P (t) = Sφ(d1 ) − Ke−r(T −t) φ(d2 ) + Ke−r(T −t) − S

Common factors are then factorized:

→ P (t) = Ke−r(T −t) (1 − φ[d2 ]) − S(1 − φ[d1 ])

The terms 1 − φ[d2 ] and 1 − φ[d1 ] can from equation 3.10 be rewritten to φ[−d2 ] and
φ[−d1 ]. The following is obtained:

→ P (t) = Ke−r(T −t) φ[−d2 ] − Sφ[−d1 ]

The equation above is exactly the analytical solution for put options [equation 3.41].
Black-Scholes Model Derivation 47

Hence the put-call parity is confirmed.

The put-call parity is only valid for European options. However, it is possible to
get some results for American Options. The following is valid for American options
[17]

S0 − K ≤ C(t) − P (t) ≤ S0 − Ke−r(T −t) (3.43)

Including a Continuous Dividend Yield

To extend the equations and formulas to include a continuous dividend yield, one
must look at how the stock prices were modelled with the geometric Brownian motion.
Merton suggested that if dividends are expressed continuously, then one can discount
the stock price at the dividend yield rate and insert this into the Black-Scholes formula
[21]. Considering that there must not exist arbitrage, it is reasonable to assume that
dividends are proportional to the stock price because the asset price must decrease by
the same amount of the dividend payment. This will only have an affect on the drift
ratio. A dividend paying stock will therefore pay qSdt for each time step dt instead of
Sdt. This change will result in the following random walk for the asset price:

dS = µqSdt + σSdz (3.44)

Solving this using the same framework as for a non-dividend paying asset will lead to
the following partial differential equation which includes a continuous dividend yield:

∂V 1 ∂ 2V ∂V
+ σ 2 S 2 2 + (r − q)S − rV = 0 (3.45)
∂t 2 ∂S ∂S
Black-Scholes Model Derivation 48

The following analytical solution will be obtained for a call option:

C(S, t) = Se−qT φ(d1 ) − Ke−r(T −t) φ(d2 )

where,
2
S
ln( K ) + (r + σ2 (T − t) (3.46)
d1 = √
σ T −t
2
S
ln( K ) + (r − σ2 (T − t) √
d2 = √ = d1 − S T − t
σ T −t

The following analytical solution will be obtained for a put option:

P (S, t) = Ke−r(T −t) φ(−d2 ) − Se−qT φ(−d1 )

where,
2
S
ln( K ) + (r + σ2 (T − t) (3.47)
d1 = √
σ T −t
2
S
ln( K ) + (r − σ2 (T − t) √
d2 = √ = d1 − S T − t
σ T −t
Chapter 4

Finite Difference Method

The finite difference methods are important methods used for calculating partial differ-
ential equations. The advantage of these methods is that they are easy to implement.
In financial mathematics, the explicit method were first introduced to value derivatives
by Brennan and Schwartz [10]. Hull and White continued by explaining the similari-
ties between the explicit method and the tree pricing models, e.g. binomial trees [16].
The disadvantage of the explicit method was its instability. A stable finite difference
method was later introduced by Courtadon with the Crank-Nicholson method. The
Crank-Nicholson method is not only unconditionally stable, but it also has a more
accurate representation of the behaviours of a stock price for larger steps [12].

Implementing the Finite Difference Method

Finite difference approximations are about replacing derivatives with approximations


in order to rewrite a differential equation as an algebraic equation. The derivatives are
approximated with a Taylor polynomial which is defined with the following equation

49
Implementing the Finite Difference Method 50

[28]:

00
0 f (x0 ) 2 f n (x0 ) n
f (x0 + h) = f (x0 ) + f (x0 )h + h + ... + h + Rn (x)
2! n!

When approximating the first derivative one obtains the following equation from the
Taylor polynomial:

0
f (x0 + h) = f (x0 ) + f (x0 )h + R1 (x)

By rearranging the equation, the following equation is obtained when approximating


the first derivative:

0 f (x0 + h) − f (x0 ) R1 (x)


f (x0 ) = −
h h

R1 is the difference between the approximation and the actual value. This value will
approach zero as h approaches zero. The following approximation is obtained for the
first derivative as h approaches zero:

0 f (x + h) − f (x)
f (x) = + O(h) (4.1)
h

Three different approximations are common:

• Forward approximation

• Backward approximation

• Central approximation

The difference between the different approximations will be explained using figure
Implementing the Finite Difference Method 51

4.1.

Figure 4.1: An illustration of a graph with three different points. The distance between
each point is equal to h.

How to implement the different approximations to approximate the points in figure


4.1 is illustrated with the equations below:

0 f (x+h)−f (x) 0 f2 −f1


• Forward approximation of f1 : f (x + h) = h
→ f1 = h

0 f (x)−f (x−h) 0 f3 −f2


• Backward approximation of f3 : f (x − h) = h
→ f3 = h

0 f (x+h)−f (x−h) 0 f3 −f1


• Central approximation of f2 : f (x) = 2h
→ f2 = 2h

In figure 4.2, a graphical interpretation of the approximations above is provided.


Implementing the Finite Difference Method 52

Figure 4.2: An illustration of how the different types of finite difference methods
0
approximate a given point. A forward approximation is approximating f1 with a
0
secant line through f1 and f2 . A backward approximation is approximating f3 with
0
a secant line through f2 and f3 . A central approximation is approximating f2 with a
secant line through f1 and f3 .

The Black-Scholes partial differential equation also includes one second derivative and
needs to be approximated with the taylor polynomial. This derivative will be approx-
imated from the sum of the forward approximation and the backward approximation.
From the Taylor polynomial, the following is obtained for a forward approximation:

0 1 00
f (x + h) = f (x) + hf (x) + h2 f (x) + ... (4.2)
2

The following is obtained for a backward approximation:

0 1 00
f (x − h) = f (x) − hf (x) + h2 f (x) − ... (4.3)
2

The following equation is obtained for the the second derivative when combining equa-
Implementing the Finite Difference Method 53

tion 4.2 with equation 4.3:

0 1 00 0 1 00
f (x + h) + f (x − h) = [f (x) + hf (x) + h2 f (x) + ...] + [f (x) − hf (x) + h2 f (x) − ...] =
2 2
0 0 1 00 1 00
= f (x) + f (x) + hf (x) − hf (x) + h2 f (x) + h2 f (x) + ...
2 2
00
→ f (x + h) + f (x − h) = 2f (x) + h2 f (x) + R2 (x) →
00 f (x + h) − 2f (x) + f (x − h) R2 (x)
→ f (x) = −
h2 h2

After rearranging the equation, one obtains the following approximating of the second
order derivative:

00 f (x + h) − 2f (x) + f (x − h) R2 (x)
f (x) = −
h2 h2

R2 is the difference between the approximation and the actual value. This value will
approach zero as h approaches zero. The following approximation is obtained for the
second order derivative as h approaches zero:

00 f (x + h) − 2f (x) + f (x − h)
f (x) = + O(h2 ) (4.4)
h2

The approximation of the second derivative will have a negative impact on the con-
vergence of the numerical algorithms because it has larger truncation error compared
to the approximations of the first order derivatives.
Applying the Finite Difference Method on Option Pricing 54

Applying the Finite Difference Method on Option

Pricing

To implement the finite difference method on the Black-Scholes partial differential


equation, a price-time mesh will be introduced, as shown in figure 4.3 [32]. The
vertical axis in the mesh will resemble the stock prices, while the horizontal axis will
resemble the time. Each point in the mesh will have a horizontal index j and a vertical
index i. Each point in the mesh is the option price for a certain time and a certain
stock price. At any given point, jδS is equal to the stock price and iδt is equal to the
time. There will also exist three boundary conditions for the mesh, and it is with these
that all the calculations can be made. A put option will be used to illustrate how the
boundary conditions will be calculated. First of all, there exists an upper boundary
where the option values for maximal stock value in the mesh Sm ax will be calculated.
Sm ax will be chosen large enough so that the put option is equal to zero according to
the pay-off function max(K − S, 0). For this boundary condition, the option value will
therefore be equal to zero for all times in the mesh. For the lower boundary conditions,
the stock price will be equal to zero (S = 0). Consequently, the option price will be
equal to K for this boundary condition according to the pay-off function. Therefore,
for this boundary condition, the option value will be equal to the discounted value
of the strike price for all times in the mesh. The righter boundary condition, which
is the option price at expiration date, will be calculated using the pay-off function.
The time is known at expiration, t = T , and the option can be calculated for all the
different stock prices for this boundary condition. To obtain the prices at t = 0, the
option prices will be calculated for each time step backwards from t = T .
Applying the Finite Difference Method on Option Pricing 55

Figure 4.3: An illustration of the price-time mesh used for implementing the finite
difference method. The x-axis is divided into i number of steps, with the distance δt
between each step. The y-axis is divided into j number of steps, with the distance δS
between each step.

Applying the finite difference approximations on the derivatives in the Black-Scholes


partial differential equation on the price-time mesh gives the following approximations
of the derivatives:

Forward approximation:

∂f fi+1,j − fi,j
= (4.5)
∂t δt

Backward approximation:

∂f fi,j − fi−1,j
= (4.6)
∂t δt
Explicit Method 56

Central approximations:

∂f fi,j+1 − fi,j−1
= (4.7)
∂S 2δS

∂f fi+1,j − fi−1,j
= (4.8)
∂t 2δt

Second Derivative (central approximation):

∂ 2f fi,j+1 − 2fi,j + fi,j−1


2
= (4.9)
∂S (δS)2

These approximations of the derivatives will be used to rewrite the Black-Scholes


partial differential equation. The Black-Scholes equation will for each of the different
finite difference methods be approximated by a different algebraic equation. The
methods that will be used are:

• The explicit method

• The implicit method

• The Crank-Nicholson method

Explicit Method

The explicit method is the easiest finite difference method to implement and it has the
fastest alghoritm, but it is also the most instable method [24]. The method calculates
the option prices for each time step using known quantities from the previous time step.
The calculations made with the explicit method only uses already known quantities
Explicit Method 57

and will therefore only solve linear equations for each time step.

Figure 4.4: Explicit method: An illustration of how the blue, known values, are used
to calculate the red, unknown option value, backward in time.

In order for the explicit method to converge, the option value must not increase for
each iteration backwards in time.This can be expressed as:

fi,j
fi,j ≤ fi+1,j ⇔ ≤1
fi+1,j

The Black-Scholes partial differential equation will now be rewritten using the ex-
∂f
plicit method. A backward approximation will be used for approximating ∂t
and a
∂f
central approximation will be used for approximating ∂S
. The approximation from
equation 4.9 will be used for the second derivative. Additionally, S will be replaced
by jδS. When inserting the approximations from equation 4.6, 4.7 and 4.9 together
with jδS into the Black-Scholes partial differential equation, the following equation is
Implicit Method 58

obtained:

fi,j − fi−1,j fi,j+1 − fi,j−1 1 2 2 fi,j+1 − 2fi,j + fi,j−1


+ rjδS + σ j (δS)2 − rfi,j = 0
δt 2δS 2 (δS)2

This can be simplified to:

1 1
fi−1,j = [ δt(σ 2 j 2 − rj)]fi,j−1 + [1 − δt(σ 2 j 2 + r)]fi,j + [ δt(σ 2 j 2 + rj)]fi,j+1
2 2

This indicates that calculating the option price at T − δt is explicitly dependent on


already known information. The coefficients in front of fi,j−1 , fi,j and fi,j+1 will be
called aj , bj and cj respectively. This equation does at this point only depend on the
indexes in the price-time mesh. The following equation for calculating each point in
the price-time mesh is obtained for the explicit method:

fi−1,j = aj fi,j−1 + bj fi,j + cj fi,j+1 (4.10)

Implicit Method

The implicit method is more stable than the explicit method. However, it requires
larger computations [24]. This method does not solely depend on quantities from the
previous state, instead it combines both the current and last state in an equation
system.
Implicit Method 59

Figure 4.5: Implicit method: An illustration of which points in the mesh are used for
each iteration in the implicit method. Known values are indicated by a blue colour
and unknown values are indicated by a red colour.

For the implicit method, a forward approximation will be used for approximating
∂f
∂t
. The other derivatives will be approximated in the same way as with the explicit
method. When inserting the approximations from equation 4.5, 4.7 and 4.9 together
with jδS into the Black-Scholes partial differential equation, the following equation is
obtained:

fi+1,j − fi,j fi,j+1 − fi,j−1 1 2 2 fi,j+1 − 2fi,j + fi,j−1


+ rjδS + σ j (δS)2 − rfi,j = 0
δt 2δS 2 (δS)2

This can be simplified to:

1 1
fi+1,j = [ δt(rj − σ 2 j 2 )]fi,j−1 + [1 + δt(σ 2 j 2 + r)]fi,j + [− δt(rj + σ 2 j 2 )]fi,j+1
2 2

Changing the index from fi+1,j to fi,j gives the following equation:

1 1
fi,j = [ δt(rj − σ 2 j 2 )]fi−1,j−1 + [1 + δt(σ 2 j 2 + r)]fi−1,j + [− δt(rj + σ 2 j 2 )]fi−1,j+1
2 2
Crank-Nicholson Method 60

The coefficients are then replaced with aj bj and cj . As a result, the following equation
is obtained for the implicit method:

fi,j = aj fi−1,j−1 + bj fi−1,j + cj fi−1,j+1 (4.11)

This can be formulated in a matrix form, which will be the form used for the numerical
calculations:

Fi = BFi−1

where
 
fi,1
 
 

 fi,2 

 .. 
Fi = 
 . 

..
 
.
 
 
  (4.12)
fi,M −1
 
b c 0 ··· 0
 1 1 
 
 a2 b 2 c 2
 · · · 0 

 . .. .
.. 

B=
 0 a3 b 3 
 .. .. . . ..
 
 . . . . cM −2 

 
0 0 · · · aM −1 bM −1

Crank-Nicholson Method

The Crank-Nicholson method is an implicit method that is weighted between the


explicit method and the implicit method [24].
Crank-Nicholson Method 61

Figure 4.6: Crank-Nicholson method: An illustration of which points in the mesh are
used for each iteration in the Crank-Nicholson method. Known values are indicated
by a blue colour and unknown values are indicated by a red colour.

The advantages of this method is that it is stable and that the convergence of the
accuracy is faster. For a Crank-Nicholson approximation, a central approximation
∂f
will be used for approximating ∂t
. The other derivatives will be approximated in the
same way as before. When inserting the approximations from equation 4.7, 4.8 and
4.9 together with jδS into the Black-Scholes partial differential equation, the following
equation is obtained:

δt 2 2 δt δt
[− (σ j − rj)]fi−1,j−1 + (1 − [− (σ 2 j 2 + r)])fi−1,j − [ (σ 2 j 2 + rj)]fi−1,j+1 =
4 2 4
δt 2 2 δt 2 2 δt
= [ (σ j − rj)]fi,j−1 + (1 + [− (σ j + r)])fi,j + [ (σ 2 j 2 + rj)]fi,j+1
4 2 4

The expressions inside the square brackets will be replaced with the coefficients aj bj
and cj . The following equation is obtained:

−aj fi−1,j−1 + (1 − bj )fi−1,j − cj fi−1,j+1 = aj fi,j−1 + (1 + bj )fi,j + cj fi,j+1 (4.13)

This can be formulated in a Matrix form, which will be the form used for the numerical
Choice of Method 62

calculations:

BFi−1 = CFi

where
 
1 − b1 −c1 0 ··· 0
 
 

 −a2 1 − b2 −c2 ··· 0 

 ... .. 
B=
 0 −a3 1 − b3 . 

.. .. .. ..
 
. . . . −cM −2
 
 
 
0 0 ··· −aM −1 1 − bM −1
 
fi,1
 

 fi,2

 (4.14)
 
 .. 
Fi = 
 . 

..
 
.
 
 
 
fi,M −1
 
1 + b1 c1 0 ··· 0
 
 

 a2 1 + b2 c2 ··· 0 

 ... .. 
C=
 0 a3 1 + b3 . 

.. .. ... ...
 
. . cM −2
 
 
 
0 0 ··· aM −1 1 + bM −1

Choice of Method

The performance of the three different finite difference methods will be compared and
the best one will be used for valuing American options and stock loans. According to
theory, the following should be true about each method [17] [24] [32]:

• The Explicit method is a fast method due to its nature of calculating new values
Choice of Method 63

solely from previously known values. The disadvantage with this method is that
it is unstable. The explicit method is stiff for many problems.

• The Implicit method is a stable method due to its nature of finding new values
by solving equations involving both the current state at time t and the next
state at time t + ∆t. The disadvantage with this method is that it requires many
computations.

• The Crank-Nicholson method is a combination of the explicit method and the


implicit method. The advantages of this method is its stability and its fast
convergence of accuracy.

According to theory, the Crank-Nicholson method should perform better compared


to the explicit method and the implicit method. To confirm this, the three different
methods will be compared when valuing a European option. Table 4.1 shows the
accuracy and computational time for each method.
Choice of Method 64

Explicit Method Implicit Method Crank-Nicholson

S True Value Value Accuracy Time Value Accuracy Time Value Accuracy Time

80 1.8594 1.8591 99.99% 0.0241 1.8599 99.97% 0.2063 1.8595 100.00% 0.0302
85 3.2136 3.2128 99.98% 0.0242 3.2135 100.00% 0.2093 3.2136 100.00% 0.0296
90 5.0912 5.0900 99.98% 0.0243 5.0906 99.99% 0.2108 5.0913 100.00% 0.0287
95 7.5109 7.5094 99.98% 0.0241 7.5098 99.98% 0.2091 7.5112 100.00% 0.0266
100 10.4506 10.4488 99.98% 0.0241 10.4491 99.99% 0.1950 10.4515 99.99% 0.0247
105 13.8579 13.8562 99.99% 0.0256 13.8564 99.99% 0.2123 13.8590 99.99% 0.0299
110 17.6630 17.6616 99.99% 0.0265 17.6616 99.99% 0.2295 17.6642 99.99% 0.0341
115 21.7905 21.7892 99.99% 0.0277 21.7894 100.00% 0.2418 21.7919 99.99% 0.0355
120 26.1690 26.1681 100.00% 0.0296 26.1682 100.00% 0.2816 26.1705 99.99% 0.0402

Table 4.1: A comparison between the performance of the explicit method, implicit
method and the Crank-Nicholson method for a European option with K = 100, r =
0.05, σ = 0.2 and T = 1. The computational time is the average computational time
for 100 trials. Explicit: dt = 0.0001 and ds = 1. Implicit: dt = 0.001 and ds = 0.5.
Crank-Nicholson: dt = 0.01 and ds = 0.5.

In table 4.1, the three different finite difference methods are compared. The values
used for δt and δS are the values that gives a good trade-off between computational
time and accuracy. From table 4.1, the following conclusions can be drawn:

• The explicit method is the fastest method, despite the fact that it uses a larger
price-time mesh.

• A long computational time was required for obtaining a good accuracy when
using the implicit method.

• The Crank-Nicholson method shows a good performance for a relatively small


price-time mesh.

• The accuracy was best for the Crank-Nicholson method, despite the fact that it
Choice of Method 65

uses a smaller price-time mesh.

In order to evaluate the methods more accurately, the performance of each method
has been measured. The accuracy has been measured for different time steps when
the stock price step is constant and set to 1.

Figure 4.7: A comparison between the explicit method, the implicit method and the
Crank-Nicholson method. The plot illustrates the accuracy for a constant δS = 1
for an increasing number of time steps. The performance is measured on a European
option with K = 100, S = 80, r = 0.05, σ = 0.2 and T = 1.

From figure 4.7, one can conclude that the explicit method should be excluded because
of its instability. Furthermore, it appears that the Crank-Nicholson method shows a
slightly better performance than the implicit method. Although, further measurements
are necessary to draw any certain conclusions. Further measurements have therefore
Choice of Method 66

been made in order to determine whether the Crank-Nicholson method or the implicit
method is more accurate. Figure 4.8 illustrates the accuracy performance between the
Crank-Nicholson method and the Implicit Method.

Figure 4.8: A comparison on the accuracy between the Crank-Nicholson method and
the Implicit method. The upper plot illustrated the accuracy for a constant δS = 0.5
with an increasing number of time steps. The lower plot illustrates the accuracy for a
constant δt = 0.01 with an increasing number of Stock Price steps. The performance
is measured on a European option with K = 100, S = 80, r = 0.05, σ = 0.2 and
T = 1.

From figure 4.8, one can conclude that the Crank-Nicholson method is more accurate
and converges faster. From the upper plot, the stock price step δS is constant and
set to δS = 0.5. The performance is then measured for different time steps. The
accuracy performance is only slightly better for the Crank-Nicholson Method. In the
Choice of Method 67

lower plot, the time step δt is constant and set to δt = 0.01. The performance is then
measured for different stock price steps. In the lower plot, there is a clear difference
in performance for the different methods. The Crank-Nicholson converges faster than
the implicit method and also has a better accuracy when converging.

From this, one can conclude that the Crank-Nicholson method outperformed the im-
plicit method and it will therefore be used for valuing American option and stock
loans.
Chapter 5

American Options

An American option is a financial derivative that is similar to the European option.


The main difference is that American options include an additional right to exercise
the option at any given time during the option’s lifetime [17]. This difference creates
a lot of difficulties when pricing American options. As shown earlier, the European
style option can be calculated analytically. This is not possible for the American op-
tion because of its non-linear features. This problem with non-linearity comes from
the fact that the optimal exercise boundary must be computed to effectively price the
option. Ahn and Wilmott describes it as a price-maximization strategy [4]. There
are two main strategies to handle this problem. One is to price the option from the
risk-neutral valuation at discrete time steps, while the other is to use discrete time
and discrete asset prices under the Black-Scholes equation. The latter strategy will be
used in this report in order to find the value of an American call option.

To be able to value American call options under the Black-Scholes partial differen-
tial equation, the following boundary conditions must be added to the conditions for

68
Pricing American Call Options 69

a European call option [32]:

C(Sf (t), t) = max(Sf (t) − K, 0)


(5.1)
∂C
(Sf (t), t)) = 1
∂S

The first condition in equation 5.1 is added because of the additional right to exercise
the American option at any given time during the lifetime of the option. This condi-
tion will take the intrinsic value of the option into account. The second condition is
introduced because a delta value close to the system is necessary.

In addition to that, the condition that C(S, t) = max(S − K, 0) for a European


call option will be replaced by the following inequality:

C(S, t) ≥ max(S − K, 0) (5.2)

This is necessary because the American call option can be larger than the value of a
European option because of the possibility of an early exercise.

Pricing American Call Options

When implementing the Crank-Nicholson method on a American call option, one has
to take the possibility of an early exercise into account when computing the values
in the price-time mesh. For the European call option case, the option value at each
point in the mesh was calculated by the equation max(S − K, 0). The difference now
is that there is another possibility, which is the possibility of an early exercise. To
include this, the optimal exercise boundary must be taken into account by considering
the time value in the case of an early exercise in the price-time mesh.
Optimal Exercise Boundary 70

Optimal Exercise Boundary

The optimal exercise boundary is the boundary that includes all the optimal exercise
prices at different times during an option’s lifetime. The equation that will be used to
obtain the optimal exercise boundary in this report is the following [31]:

C(Sf (t), t) = Sf (t) − K (5.3)

This equation is derived from the fact that the American call option will reach its op-
timal exercise price at the first contact with the intrinsic value. This optimal exercise
price changes with time. For the finite difference method, the optimal exercise bound-
ary is found by setting the time to a constant value and calculating all the different
stock prices in the price-time mesh. The stock price that is equal to the option value
for that constant time is the optimal exercise point for that specific time. This is done
for very small time steps until the time of expiration. When making these calculations,
the option value will not be exactly equal to the intrinsic value. Therefore, a tolerance
will be allowed and the following equation will be used to find the optimal exercise
boundary:

C(Sf (t), t) = Sf (t) − K ± tolerance (5.4)


Chapter 6

Stock Loan

A non-recourse loan is a contract between two parties, the borrower and the lender.
The borrower, who owns a share of a stock, obtains a loan from the lender with the
share as collateral. The borrower can regain control of the stock at any time by
repaying the principal plus the accumulated interest [30]. Alternatively, the borrower
can surrender the stock. The borrower can then no longer be held liable for repaying
the loan [20]. A stock loan is a good alternative to increase the liquidity without selling
the stocks if there were to be an expected growth in the stock prices. Stock loans can
also be used to hedge the market because if [20]:

• The stock decreases in price, the investor can walk away instead of repaying the
loan.

• The stock increases in price, the investor can regain the stock by repaying the
loan.

The lender will make a profit from fees and accumulated interest. Stock loans can also
be used to leverage the returns, i.e. increase the volatility of a portfolio.

71
The Connection between American Call Options and Stock Loans 72

The Connection between American Call Options and

Stock Loans

Stock loans behave much like American call options. The borrower can be seen as the
holder of a call option and the lender can be seen as the writer of the same option. The
link between American options and stock loans can be explained with the following
connections between their pay-offs:

If the stock price increases [20]

American Option If the underlying stock decreases in price and the American op-
tion expires exercised, then the loss is limited to the premium.

Stock Loan If the collateral stock decreases in price and the borrower surrender the
collateral, then the loss is limited to the value of the collateral. This is because
the borrower can no longer be held liable for repaying the loan.

If the stock price decreases [20]:

American Option If the underlying stock increases in price and the option is exer-
cised early, then the pay-off will be equal to the difference between the value of
the stock and the strike price.

Stock Loan If the collateral stock increases in price, the borrower can sell the col-
lateral stock, repay the loan and keep the profit. The pay-off for a stock loan
will be equal to the difference between the collateral value and the principal plus
accumulated interest.

This link between an American option and a stock loan makes it possible to use
the Black-Scholes partial differential equation, with some modification, to value stock
Deriving the Stock Loan Value from American Call Options 73

loans. The most significant difference between an American option and a stock loan
is that there exists no strike price for stock loans, instead the principal plus the accu-
mulated interest will determine the pay-off.

Deriving the Stock Loan Value from American Call

Options

Assuming that a borrower lends the amount Q at the interest rate γ with one share
valued S as collateral. The borrower will at any given time have to repay the loan plus
the accumulated interest, which can be expressed mathematically as Qeγt [20]. This
value will determine the profit, similarly to how the strike price determines the profit
for an American call option. The difference between valuing stock loans compared to
American options is that the the value of the principal plus accumulated interest is
time dependant while the strike price is not. If this is taken into consideration, the
following formulation of the stock loan problem is obtained under the Black-Scholes
equation [20]:

∂L 1 2 2 ∂ 2 L ∂L
+ σ S 2
+ (r − q)S − rL = 0 (6.1)
∂t 2 ∂S ∂S

Solving equation 6.1 with the following boundary and final conditions will solve the
stock loan problem [20]:





 L(0, t) = 0


L(S, T ) = max(S − QeγT , 0)


(6.2)



 L(Sf (t), t) = Sf1 (t) − Qeγt


 ∂L
 (S (t), t) = 1
∂S f1
Loan Value using American Call Options 74

The two last lines in equation 6.2 are defining the optimal exit boundary which is the
equivalence to the optimal exercise boundary for American call options.

Loan Value using American Call Options

Because of the similarities between American options and stock loans, the algorithm
for calculating American call options can, after some modifications, be adapted to an
algorithm that values stock loans. The difference between an American option and a
stock loan is that the strike price will be replaced by the principal plus accumulated
interest. For an American option, it is the strike price that decide the pay-off of a
call option, while the principal plus accumulated interest will decides the pay-off for a
stock loan. This will be illustrated with an example:

1. Assuming that an investor holds an American call option on a stock with the
current stock price AU D 25 and the strike price AU D 25. At the time of expi-
ration, six months later, the stock price has increased to 30 AU D. The value of
the option is equal to 30 − 25 = AU D 5.

2. Assuming that an investor loans AU D 25 and buys a stock with the current
stock price AU D 25 and the strike price AU D 25. The loan interest rate is 10
percent. At the time of expiration of the loan, six months later, the stock has
increased to AU D 30. The investor sells the stock in order to repay the loan.
1
The pay-off in this case is equal to 30 − 25e0.1· 2 ≈ AU D3.72.

As illustrated, the equivalence to the strike price for stock loans is growing with
time, which will affect the pay-off. When implementing this with the finite difference
method, this is taken into account in the optimal exit boundary. For each small time
step in the price-time mesh, accumulated interest will increase. Implementing this to
Optimal Exit Price 75

the Crank-Nicholson algorithm will successfully calculate the stock loan value.

Optimal Exit Price

The optimal exit price for a stock loan is similar to the optimal exercise boundary for
an American call option. The optimal exit price is the prices at which is optimal to sell
the collateral stock and repay the loan. The difference between the optimal exit price
and the optimal exercise boundary is that the optimal exercise boundary depends on
the constant strike price while the optimal exit price depends on the principal plus
accumulated interest Qeγt . The optimal exit price will be calculated with the following
equation:

L(Lf (t), t) = Sf (t) − Qeγt ± tolerance (6.3)


Chapter 7

Results and Discussion

The obtained results has been computed using the codes in the appendix.

All results were calculated on a computer with an Intel Core i7 CPU, 3.40 GHz with
8GB of RAM.

American Options

The first results are for an American Call option. The following parameters were
used:

• Exercise Price: K = 100

• Time to Maturity: T = 1

• Volatility of the underlying asset: σ = 0.2

• Risk free interest rate: r = 0.05

• Continuous dividend yield: q = 0.1

76
77

• δt = 0.0001

• δS = 0.5

For the optimal exercise boundary, the following parameters are used for the δt and
the δS instead:

• δt = 0.001

• δS = 0.1

• T olerance = 10−200

Option Value

The American call option value have been calculated for stock prices ranging from 80
to 120. The computational time is the average of 100 computations. The following
results were obtained:
78

S Option Value Average Computational Time

80 0.6956 0.2134 seconds


85 1.3534 0.2143 seconds
90 2.3890 0.2165 seconds
95 3.8909 0.2180 seconds
100 5.9283 0.2210 seconds
105 8.5468 0.2374 seconds
110 11.7702 0.2646 seconds
115 15.6058 0.2871 seconds
120 20.0519 0.3079 seconds

Table 7.1: Results for American call value using the Crank-Nicholson method. The
average computational times is for 100 calculations. Parameters used: K = 100,
r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.0001, δS = 0.5

As it can be found, the computational time increases when the stock prices increase.
This is because the price-time mesh gets larger when the stock price increases. Fur-
thermore, it can be found that the option price converges with the pay-off function.
For the case when the stock price is equal to S = 120, the option value is almost equal
to the pay-off function max(S − K, 0) = 20. The convergence of the American call
option with the pay-off function is illustrated in figure 7.1.
79

Figure 7.1: An illustration of the value of an American call option for varying stock
prices at t = 0. The blue line is the value of the American option and the red line
is the pay-off function. The parameters of the option are the following: K = 100,
r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.0001, δS = 0.5.

The blue line in figure 7.1 resembles the value of an American call option and the red
line is the pay-off function max(S − K, 0). In the figure, it can found that the value
of an American call option converges with the pay-off function for increasing stock
prices. It can also be found that the American call option is always worth more or
equal to the pay-off function. This can be explained from the boundary condition for
80

an American option:

C(S, t) = S when S → ∞

As the stock prices increase and become very large, the call value is equal to the S
and hence the option value will be equal to the pay-off function.

Optimal Exercise Boundary

The gain from an early exercise differs over time. The optimal prices for an early
exercise are listed in table 7.2 for different times:

Optimal Exercise Prices

t Optimal Exercise Price

0 121.70
0.25 120.10
0.50 117.90
0.75 114.35
1 100.00

Table 7.2: Optimal exercise prices for an American call option with the parameters:
K = 100, r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.001, δS = 0.1.

As it can be found in table 7.2, the optimal exercise price converges with the strike
price. This can be explained by the loss of the option’s time value as the maturity is
approached. At expiry, the time value will be equal to zero, and hence the intrinsic
value will determine the value of the option. Consequently, at expiration date, the
optimal exercise price is equal to the strike price. The loss of time value as the
option approaches the expiration date is illustrated in the plot of the optimal exercise
81

boundary in figure 7.2.

Figure 7.2: An illustration of the optimal exercise boundary of an American call option
with the following parameters: K = 100, r = 0.05, q = 0.1, σ = 0.2, T = 1, δt = 0.001,
δS = 0.1.

In figure 7.2 it can be found the optimal exercise price decreases over time. This
is explained, as mentioned, by the fact that the time value decrease as the option
approaches the expiration date. Furthermore, the optimal exercise price is equal to
the strike price at maturity, since the time value will be equal to zero at t = T .
82

Optimal Exercise Boundary - Varying Volatility Ceteris Paribus

From figure 7.3, it can be found that the optimal exercise price increases with an
increased volatility. The exercise price is equal to the strike price at maturity.

Figure 7.3: An illustration of the optimal exercise boundary of an American call option
for varying volatilities. The following parameters are used: K = 100, r = 0.05, q = 0.1,
T = 1, δt = 0.001, δS = 0.1. The blue line have the volatility σ = 0.2, the red line
σ = 0.3 and the yellow line σ = 0.4.
83

The explanation to why the optimal exercise price increase when the volatility increases
is because the time value of the option will grow because of an increased probability of
a profitable stock movements. This is true since the the loss is limited to the premium.
As the option approaches maturity, the time value will approach zero and hence the
optimal exercise price at expiration date will be equal to the strike price.

Optimal Exercise Boundary - Varying Risk Free Interest Rate Ceteris


Paribus

From figure 7.4, it can be found that the optimal exercise price increases with an
increased risk free interest rate. The exercise price is equal to the strike price at
maturity.
84

Figure 7.4: An illustration of the optimal exercise boundary of an American call option
for varying risk free interest rates. The following parameters are used: K = 100,
σ = 0.2, q = 0.1, T = 1, δt = 0.001, δS = 0.1. The blue line have the risk free interest
rate r = 0.05, the red line r = 0.075 and the yellow line r = 0.1.

The explanation to why the optimal exercise prices increase when the risk free interest
rate increase is because the value of today’s money increase. This means that the
time value have increased. The logic behind this is that for a higher risk-free interest
rate, if the option is exercised early, the cash from selling the option’s underlying asset
85

after an exercise can be invested in risk-free assets with a return equal to the risk-free
interest rate. A higher risk-free interest rate will result in an increased return. As the
option approaches maturity, the time value will approach zero and hence the optimal
exercise price at expiration date will be equal to the strike price.

Optimal Exercise Boundary - Varying Dividend Rate Ceteris Paribus

From figure 7.5, it can be found that the optimal exercise price decreases with an
increased dividend yield rate. The exercise price is equal to the strike price at matu-
rity.
86

Figure 7.5: An illustration of the optimal exercise boundary of an American call option
for varying dividend yield rates. The following parameters are used: K = 100, σ = 0.2,
r = 0.05, T = 1, δt = 0.001, δS = 0.1. The blue line have the dividend yield rate
q = 0.05, the red line q = 0.1 and the yellow line q = 0.15.

The explanation to why the optimal exercise prices decrease when the dividend yield
rate increases is because the stock price will decrease. A decreasing stock price will
result in a decreased call option value because of the pay-off function for a call option.
As the option approaches maturity, the time value will approach zero and hence the
optimal exercise price at expiration date will be equal to the strike price.
87

Stock Loan

The results in this section are for the valuation of a stock loan with the following
parameters:

• Borrowed Amount: Q = 0.4

• Loan interest rate: γ = 0.1

• Risk free interest rate: r = 0.06

• Continuous Dividend Yield: q = 0.1

• Volatility of the underlying asset: σ = 0.4

• δt = 0.01

• δS = 0.001

• T olerance = 10−3

Loan Values

The loan value for different stock prices have been computed and is presented are table
7.3.
88

Loan Value for Different Principals


t=0
Q (Principal) = 0.2

S Loan Value Growth of the Loan Value

0.4 0.2007
49.3%
0.5 0.2998

Q (Principal) = 0.3

S Loan Value Growth of the Loan Value

0.4 0.1343
57.6%
0.5 0.2117

Q (Principal) = 0.4

S Loan Value Growth of the Loan Value

0.4 0.0949
64.5%
0.5 0.1561

Table 7.3: Stock loan values for different principals. The following parameters were
used: r = 0.06, σ = 0.4, q = 0.03, T = 5, γ = 0.1, δS = 0.001, δt = 0.01

In table 7.3, it can be found that the level of leverage affects the loan value. For the
same growth in the stock price (25%), the increase of the loan value will be different
depending on the level of leverage. The loan value growth for different principals that
can be found in table 7.3 are the following:

• Q = 0.2: Loan value growth = 49.3%

• Q = 0.3: Loan value growth = 57.6%

• Q = 0.4: Loan value growth = 64.5%

The growth of the loan value increases when the ratio between the stock value and the
89

loan value increases. This is explained by the leverage’s effect on returns because the
borrowed amount will increase in value as well, and after repaying the loan, the investor
can keep the additional profit from the loan. Assuming that an investment grows from
100 AU D to 120 AU D. If there is no leverage, the return in percentage will be equal
120−100
to 100
= 20%. If instead assuming that the initial investment consisted of a debt
120−100
equal to AU D 50, then the return in percentage would be equal to 50
= 40%. As
illustrated with the example, an increased leverage results in an increased growth of
the return.

Optimal Exit Price (T=20 years)

The optimal exit price for the stock loan with an maturity of 5 years can be found in
table 7.4.

Optimal Exit Prices for T = 20

t Optimal Exit Price

0 0.94
5 1.54
10 2.45
15 3.68
20 2.96

Table 7.4: Optimal exit prices for a stock loan with the parameters: T = 20, r = 0.06,
σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01

From table 7.4, it can be found that the optimal exit price increase at t = 0, reach a
maximum, and then decrease until t = T . The optimal exit price at maturity is equal
to the principal plus the accumulated interest Qeγt = 0.4e0.1·20 ≈ 2.96. The optimal
exit prices corresponding to table 7.4 are shown in figure 7.6.
90

Figure 7.6: An illustration of the optimal exit boundary of a stock loan with the
following parameters: T = 20, r = 0.06, σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1,
δS = 0.001, δt = 0.01

In figure 7.6, it can be found that the optimal exit prices initially increase with time,
reach a maximum price and then decrease. The shape of the optimal exit price graph
can be explained by the fact that there are two time-dependent factors for a stock
loan, compared to an call option where there only exist one time-dependent factor.
For a stock loan, the time value will be determined by two different factors:

• The risk-free interest rate. An increased risk-free interest rate results in an


increased time value. Therefore, as the maturity is approached, there will be a
loss in the increase of the time value. Therefore, the risk-free interest rate will
decrease the time value over time.

• The loan interest rate. An increased loan interest rate results in a decreased
time value. Therefore, as the maturity is approached, there will be a loss of in
decrease of the time value. Therefore, the loan interest rate will increase the
time value over time.
91

It is because of this that the time value increase with time in figure 7.6. The optimal
exit price will reach a maximum and from there decrease because the total significance
of the time value will decrease with time. Instead, there will be an increase in the
significance of the intrinsic value as the expiration date is approached. The optimal
exit price will therefore from the maximum point approach the principal plus the
accumulated interest.

Optimal Exit Price (T=5 years)

The optimal exit price for the value of a stock loan with a maturity of 5 years can be
found in table 7.5.

Optimal Exercise Prices

t Optimal Exercise Price

0 0.84
1 0.89
2 0.94
3 0.97
4 0.96
5 0.66

Table 7.5: Optimal exit prices for a stock loan with the parameters: T = 5, r = 0.06,
σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01

The optimal exit prices corresponding to table 7.5 are shown in figure 7.7.
92

Figure 7.7: An illustration of the optimal exit boundary of a stock loan with the
following parameters: T = 5, r = 0.06, σ = 0.4, q = 0.03, Q = 0.4, γ = 0.1,
δS = 0.001, δt = 0.01

The exit price grows initially and then reaches a maximum, from where it will approach
the principal plus the accumulated interest.

Optimal Exit Boundary - Varying Volatility Ceteris Paribus

From figure 7.8, it can be found that the optimal exit price increases with an increased
volatility. The exit prices for the different volatilities are equal to the principal plus
accumulated interest at maturity.
93

Figure 7.8: An illustration of the optimal exit boundary of a stock loan for varying
volatilities. The following parameters are used: T = 5, r = 0.06, q = 0.03, Q = 0.4,
γ = 0.1, δS = 0.001, δt = 0.01. The blue line have the volatility σ = 0.2, the red line
σ = 0.4 and the yellow line σ = 0.6.

The explanation to why the optimal exit prices increase when the volatility increases is
because the time value of the option will grow because of an increase in the probability
of a profitable stock movement. This is true since the loss is limited to the stock value
at t = 0. As the option approaches maturity, the time value converges to zero, and
hence the optimal exit price at expiration date will be equal to the principal plus
accumulated interest.
94

Optimal Exit Boundary - Varying Risk Free Interest Rate Ceteris Paribus

From figure 7.9, it can be found that the optimal exit price increases with an increased
risk free interest rate. The exit prices for the different risk free interest rates are equal
to the principal plus accumulated interest at maturity.

Figure 7.9: An illustration of the optimal exit boundary of a stock loan for varying
risk free interest rates. The following parameters are used: T = 5, σ = 0.4, q = 0.03,
Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01. The blue line have the risk fre interest rate
r = 0.06, the red line r = 0.1 and the yellow line r = 0.15.
95

The explanation to why the optimal exit prices increases when the risk free interest
rate increases is because the value of today’s money increase. This means that the time
value have increased. The logic behind this is that for a higher risk-free interest rate,
the profit when selling the stock and repaying the loan can can be invested in a risk-
free asset with a return equal to the risk-free interest rate. A higher risk-free interest
rate will result in an increased risk-free return. As the stock loan approaches maturity,
the time value will approach zero and hence the optimal exit price at expiration date
will be equal to the principal plus the accumulated interest.

Optimal Exit Boundary - Varying Dividend Rate Ceteris Paribus

From figure 7.10, one can see that the optimal exit price decreases with an increased
dividend yield. The exit prices for the different dividend yields are equal to the prin-
cipal plus accumulated interest at maturity.
96

Figure 7.10: An illustration of the optimal exit boundary of a stock loan for varying
dividend yield rates. The following parameters are used: T = 5, σ = 0.4, r = 0.06,
Q = 0.4, γ = 0.1, δS = 0.001, δt = 0.01. The blue line have the dividend yield rate
q = 0, the red line q = 0.03 and the yellow line q = 0.05.

The explanation to why the optimal exit prices decrease when the dividend yield rate
increases is because the stock price will decrease. A decreasing stock price will result
in a decreased stock value because of the pay-off function for a stock loan. As the stock
loan approaches maturity, the time value will approach zero and hence the optimal
97

exit price at expiration date will be equal to the principal plus accumulated interest.

For a non-dividend paying underlying asset, there exists no optimal exercise price
for an American option but as it can be found in figure 7.10, there exists an opti-
mal exit boundary for a stock loan with a non-dividend paying asset as collateral.
This is because the stock loan value depends on the time-dependent principal plus
accumulated interest instead of the constant strike price.

Optimal Exit Boundary - Varying Loan Interest Rate Ceteris Paribus

From figure 7.11, it can be found that the optimal exit price decreases for an increased
loan interest rate at the time t = 0. The growth of the time value will increase with
a higher loan interest rate. Therefore, at the time of expiration t = T , the exit prices
will increase for an increased loan interest rate since they will approach the principal
plus the accumulated interest rate.
98

Figure 7.11: An illustration of the optimal exit boundary of a stock loan for varying
loan interest rates. The following parameters are used: T = 5, σ = 0.4, r = 0.06,
Q = 0.4, q = 0.03, δS = 0.001, δt = 0.01. The blue line have the loan interest rate
γ = 0.1, the red line γ = 0.15 and the yellow line γ = 0.2.

This can be explained by the fact that the loan interest rate have an oppositional effect
of the risk-free interest rate on the time value. At time t = 0, there is 5 year left until
the time of expiration, which means that interest will be accumulated during five more
years, which is an expense. Because of this, a higher loan interest rate will result in a
lower optimal exit price. With time, the time value will increase from the loan interest
rate because the time left , on which interest will be accumulated, have decreased.
Because of this, a higher loan interest rate will result in a larger growth of time value
99

as the time of expiration is approached. Consequently, the optimal exit price t = T


will be greater for a larger loan interest rate. The optimal exit prices from figure 7.11
at the time of expiration can be explained with the following calculations:

• Yellow line (γ = 0.2): Optimal exit price at expiration date = 0.4e0.2·5 ≈ 1.09

• Red line (γ = 0.15): Optimal exit price at expiration date = 0.4e0.15·5 ≈ 0.85

• Blue line (γ = 0.1): Optimal exit price at expiration date = 0.4e0.1·5 ≈ 0.66
Chapter 8

Conclusion and Future Work

In this thesis, American options have been valued with the Crank-Nicholson method
under the Black-Scholes equation. Furthermore, the connection between stock loans
and American options were used to value non-recourse loans with stocks as collateral.

The conclusions that can be drawn from the analyses in this thesis are that it is
never optimal to exercise an American call option if the underlying asset does not pay
dividends. For American options paying dividends, it is always optimal to exercise
an American call option at the first contact between the option value and its intrinsic
value, i.e. C(S, t) = Sf − K, where Sf is the optimal exercise price. The optimal
exercise price will change over time, since the time value will decrease as the time of
expiration is approached. The optimal exercise boundary shows the different optimal
exercise prices during a specific options’ lifetime. Furthermore, it was found that the
optimal exercise price increases when the following parameters increases:

• Volatility

• Risk-free interest rate

100
101

An increasing dividend yield rate did on the other hand decrease the optimal exercise
price. A higher risk-free interest rate will decrease time value faster over time.

The conclusions that can be drawn from the analyses of the stock loans is that an
increased leverage increase the growth of the stock value. In other words, having a
highly leveraged portfolio will result in a increased growth in value. The leverage will
increase the overall volatility of the portfolio. Furthermore, it is always optimal to
exercise a stock loan at the first contact between the stock loan value and its intrinsic
loan value, i.e. L(S, t) = Sf − Qeγt , where Sf is the optimal exit price. Important to
note for stock loans is that the loan interest rate γ will affect the time value and on
the contrary to an American option, the time value can increase with time for stock
loans. The effect of the loan interest rate is the opposite of the effect of the risk-free
interest rate.

The different optimal prices for a stock loan can be shown in a plot of the optimal exit
boundary. The optimal exit boundary show the different optimal exit prices during the
lifetime of the loan for a specific portfolio of stocks used as collateral. Furthermore,
the optimal exit price will increase when the volatility increases and it will decrease
when the dividend yield rate increases. When time t = 0, i.e. today, the optimal exit
price will increase when the risk-free interest rate is increased and it will decrease when
the stock loan value is increased. With time, the risk-free interest rate will decrease
the time value and the loan interest rate will increase the time value. Consequently,
at time t = T , i.e. at expiration date, the optimal exit price will decrease when the
risk-free interest rate is increased and it will increase when the loan interest rate is
increased.
102

Future research opportunities exist for formulating a stock loan problem for recourse
loans. The loss is not limited for recourse loans and valuing this type of loan might
provide results of interest. Furthermore, there exists future research opportunities for
valuing stock lending for short selling. Similar to recourse loans, the loss is not limited
for this type of lending and results from short selling might be of interest as short
selling is common amongst hedge funds.
Appendix A

European Options

% Input : S0 = c u r r e n t s t o c k p r i c e , K = s t r i k e p r i c e ,
% r = r i s k −f r e e i n t e r e s t r a t e , T = time t o e x p i r a t i o n ,
% sigma = v o l a t i l i t y , ds = s t o c k p r i c e s t e p
% dt = time s t e p
% fdmmethod = ’CRANK’ o r ’ IMPLICIT ’ o r ’EXPLICIT ’ ,
% o p t i o n t y p e = ’CALL’ o r ’PUT’

%Output : o p t i o n v a l u e = The o p t i o n v a l u e

f u n c t i o n o p t i o n v a l u e = VanillaEuropeanOption ( S0 ,K, r , T, sigma , ds , dt , . . .


fdmmethod , o p t i o n t y p e )

s 1 = { ’CRANK’ , ’ IMPLICIT ’ , ’ EXPLICIT ’ } ;


s 2 = fdmmethod ;
fdmmethod L = strcmp ( s1 , s2 ) ;
z1 = { ’CALL’ , ’PUT’ } ;

103
104

z2 = o p t i o n t y p e ;
o p t i o n t y p e L = strcmp ( z1 , z2 ) ;

i f S0 < 0 | | K < 0 | | T <= 0 | | r < 0 | | sigma < 0 | | ds < 0 . . .


| | dt < 0 | | sum ( fdmmethod L ) ˜= 1 | | sum ( o p t i o n t y p e L ) ˜= 1
f p r i n t f ( ’ I n v a l i d input parameters . ’ ) ;
o p t i o n v a l u e = NaN ;
return ;
end

smax = 2∗max( S0 ,K)∗ exp ( r ∗T ) ;


M = round ( smax/ ds ) ;
N = round (T/ dt ) ;

mesh = z e r o s (M+1,N+1);
S = l i n s p a c e ( 0 , smax ,M+1);
j = 0 :M;
i = 0 :N;

switch optiontype
c a s e ’CALL’
mesh ( : ,N+1) = max( S−K, 0 ) ;
mesh ( 1 , : ) = 0 ;
mesh (M+ 1 , : ) = ( smax−K) ∗ exp(− r ∗ dt ∗ (N−i ) ) ;

c a s e ’PUT’
105

mesh ( : ,N+1) = max(K−S , 0 ) ;


mesh ( 1 , : ) = K ∗ exp(− r ∗ dt ∗ (N−i ) ) ;
mesh (M+ 1 , : ) = 0 ;
end

s w i t c h fdmmethod
c a s e ’CRANK’
a = ( dt / 4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) − r ∗ j ) ;
b = −(dt / 2) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + r ) ;
c = ( dt /4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + r ∗ j ) ;

C = −d i a g ( a ( 3 :M) , −1) + d i a g (1−b ( 2 :M) ) − d i a g ( c ( 2 :M− 1 ) , 1 ) ;


[ L ,U] = l u (C ) ;
D = d i a g ( a ( 3 :M) , −1) + d i a g (1+b ( 2 :M) ) + d i a g ( c ( 2 :M− 1 ) , 1 ) ;

l o s t v a l = z e r o s ( s i z e (D, 2 ) , 1 ) ;
f o r i = N: −1:1
i f l e n g t h ( l o s t v a l )>1
l o s t v a l ( 1 ) = a ( 2 ) ∗ ( mesh ( 1 , i )+mesh ( 1 , i + 1 ) ) ;
l o s t v a l ( end ) = c ( end ) ∗ ( mesh ( end , i )+mesh ( end , i + 1 ) ) ;
else
l o s t v a l = l o s t v a l (1)+ l o s t v a l ( end ) ;
end

mesh ( 2 :M, i ) = U \ (L \ (D ∗ ( mesh ( 2 :M, i +1)+ l o s t v a l ) ) ) ;


end
106

c a s e ’ IMPLICIT ’
a = 0 . 5 ∗ ( r ∗ dt ∗ j − sigma ˆ2 ∗ dt ∗ ( j . ˆ 2 ) ) ;
b = 1 + sigma ˆ2 ∗ dt ∗ ( j . ˆ 2 ) + r ∗ dt ;
c = −0.5 ∗ ( r ∗ dt ∗ j + sigma ˆ2 ∗ dt ∗ ( j . ˆ 2 ) ) ;

B = d i a g ( a ( 3 :M) , −1) + d i a g ( b ( 2 :M) ) + d i a g ( c ( 2 :M− 1 ) , 1 ) ;


[ L ,U] = l u (B ) ;

l o s t v a l = z e r o s ( s i z e (B , 2 ) , 1 ) ;
f o r i = N: −1:1
l o s t v a l ( 1 ) = −a ( 2 ) ∗ mesh ( 1 , i ) ;
l o s t v a l ( end ) = −c ( end )∗ mesh ( end , i ) ;
i f l e n g t h ( l o s t v a l ) == 1
l o s t v a l = −a ( 2 ) ∗ mesh ( 1 , i )−c ( end )∗ mesh ( end , i ) ;
end

mesh ( 2 :M, i ) = U \ (L \ ( mesh ( 2 :M, i +1) + l o s t v a l ) ) ;


end

c a s e ’EXPLICIT ’
a = 0 . 5 ∗ dt ∗ ( sigma ˆ2 ∗ j − r ) . ∗ j ;
b = 1 − dt ∗ ( sigma ˆ2 ∗ j . ˆ 2 + r ) ;
c = 0 . 5 ∗ dt ∗ ( sigma ˆ2 ∗ j + r ) . ∗ j ;

f o r i = N: −1:1
107

f o r j = 2 :M
mesh ( j , i ) = a ( j ) ∗ mesh ( j −1, i +1) . . .
+ b ( j ) ∗ mesh ( j , i +1) + c ( j ) ∗ mesh ( j +1, i +1);
end
end
end

o p t i o n v a l u e = max( i n t e r p 1 ( S , mesh ( : , 1 ) , S0 , ’ s p l i n e ’ ) , 0 ) ;
Appendix B

Performance Measurement for


varying δS

% Input : S = c u r r e n t s t o c k p r i c e , K = s t r i k e p r i c e ,
% r = r i s k −f r e e i n t e r e s t r a t e , T = time t o e x p i r a t i o n ,
% sigma = v o l a t i l i t y , dt = time s t e p
% s t a r t = i n t i a l s t o c k p r i c e s t ep ,
% f i n a l = f i n a l s t o c k p r i c e st e p ,
% s t e p = d e c r e a s e i n ds f o r each c a l c u l a t i o n ,
% t r u e v a l u e = t r u e a n a l y t i c a l european o p t i o n value ,
% fdmmethod = ’CRANK’ o r ’ IMPLICIT ’ o r ’EXPLICIT ’ ,
% o p t i o n t y p e = ’CALL’ o r ’PUT’

%Output : ds = number o f s t o c k p r i c e s t e p s ,
%Accuracy = The c o r r e s p o n d i n g a c c u r a c y

f u n c t i o n [ ds , Accuracy ] = a c c u r a c y v a r y i n g d s ( S ,K, r , T, sigma , dt , . . .

108
109

s t a r t , f i n a l , s t ep , t r u e v a l u e , fdmmethod , o p t i o n t y p e )

i f s t a r t <0 | | s t e p < 0 | | f i n a l < 0 | | s t a r t < f i n a l


f p r i n t f ( ’ I n v a l i d input parameters . ’ ) ;
p r i c e = NaN ;
return ;
end

Accuracy = [ ] ;
ds = [ ] ;
DS = s t a r t ;
c = 1;
w h i l e DS >= f i n a l
smax = 2∗max( S ,K)∗ exp ( r ∗T ) ;
ds ( 1 , c ) = smax/DS ;
CallImp = VanillaEuropeanOption ( S ,K, r , T, sigma , DS, dt , . . .
fdmmethod , o p t i o n t y p e ) ;
Accuracy ( 1 , c ) = CallImp ;
DS = DS − s t e p ;
c = c + 1;
end
Accuracy = 100∗max(1− abs ( Accuracy−t r u e v a l u e ) / t r u e v a l u e , 0 ) ;
p l o t ( ds , Accuracy )
end
Appendix C

Performance Measurement for


varying δt

% Input : S = c u r r e n t s t o c k p r i c e , K = s t r i k e p r i c e ,
% r = r i s k −f r e e i n t e r e s t r a t e , T = time t o e x p i r a t i o n ,
% sigma = v o l a t i l i t y , ds = s t o c k p r i c e s t e p
% s t a r t = i n t i a l s t o c k p r i c e s t ep ,
% f i n a l = f i n a l s t o c k p r i c e st e p ,
% s t e p = d e c r e a s e i n ds f o r each c a l c u l a t i o n ,
% t r u e v a l u e = t r u e a n a l y t i c a l european o p t i o n value ,
% fdmmethod = ’CRANK’ o r ’ IMPLICIT ’ o r ’EXPLICIT ’ ,
% o p t i o n t y p e = ’CALL’ o r ’PUT’

%Output : dt = number o f time s t e p s ,


%Accuracy = The c o r r e s p o n d i n g a c c u r a c y

f u n c t i o n [ dt , Accuracy ] = a c c u r a c y ( S ,K, r , T, sigma , ds , s t a r t , f i n a l , . . .

110
111

s te p , t r u e v a l u e , fdmmethod , o p t i o n t y p e )

i f s t a r t <0 | | s t e p < 0 | | f i n a l < 0 | | s t a r t < f i n a l


f p r i n t f ( ’ I n v a l i d input parameters . ’ ) ;
p r i c e = NaN ;
return ;
end

Accuracy = [ ] ;
dt = [ ] ;
DT = s t a r t ;
c = 1;
w h i l e DT >= f i n a l
dt ( 1 , c ) = DT;
CallImp = VanillaEuropeanOption ( S ,K, r , T, sigma , ds ,DT , . . .
fdmmethod , o p t i o n t y p e ) ;
Accuracy ( 1 , c ) = CallImp ;
DT = DT − s t e p ;
c = c + 1;
end
dt = T. / dt ;
Accuracy = 100∗max(1− abs ( Accuracy−t r u e v a l u e ) / t r u e v a l u e , 0 ) ;
p l o t ( dt , Accuracy )
end
Appendix D

American Options

% Input : S0 = c u r r e n t s t o c k p r i c e , K = s t r i k e p r i c e ,
% r = r i s k −f r e e i n t e r e s t r a t e , T = time t o e x p i r a t i o n ,
% sigma = v o l a t i l i t y , ds = s t o c k p r i c e s t e p
% q = t h e d i v i d e n d y i e l d r a t e , dt = time s t e p
% p l o t v a l u e = t r u e f o r p l o t , f a l s e f o r not p l o t
% p l o t o p t i m a l = t r u e f o r p l o t , f a l s e f o r not p l o t ,
% p l o t p e r p e t u a l = t r u e f o r p l o t , f a l s e f o r not p l o t .
% o p t i m a l t o l e r a n c e = t o l e r a n c e f o r o p t i m a l e x e r c i s e boundary

%Output : o p t i o n v a l u e = The o p t i o n v a l u e

f u n c t i o n p r i c e = CrankNicolson ( S0 ,K, r , T, sigma , ds , dt , q , . . .


plotvalue , plotoptimal , plotperpetual , optimaltolerance )

i f S0 < 0 | | K < 0 | | T <= 0 | | r < 0 | | sigma < 0 . . . .


| | ds < 0 | | dt < 0 | | q < 0

112
113

f p r i n t f ( ’ I n v a l i d input parameters . ’ ) ;
o p t i o n v a l u e = NaN ;
return ;
end

smax = 2∗max( S0 ,K)∗ exp ( r ∗T ) ;


M = round ( smax/ ds ) ;
N = round (T/ dt ) ;

mesh = z e r o s (M+1,N+1);
S = l i n s p a c e ( 0 , smax ,M+1);
t = l i n s p a c e ( 0 ,T,N+1);
j = 0 :M; %ds ∗ j = s
i = 0 :N; %dt ∗ i = t

mesh ( : , end ) = max( S−K, 0 ) ;


mesh ( 1 , : ) = 0 ;
mesh ( end , : ) = max( smax−K, 0 ) ∗ exp(− r ∗ t ) ;

a = ( dt / 4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) − ( r−q ) ∗ j ) ;
b = −(dt / 2) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + r ) ;
c = ( dt /4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + ( r−q ) ∗ j ) ;

C = −d i a g ( a ( 3 :M) , −1) + d i a g (1−b ( 2 :M) ) − d i a g ( c ( 2 :M− 1 ) , 1 ) ;


D = d i a g ( a ( 3 :M) , −1) + d i a g (1+b ( 2 :M) ) + d i a g ( c ( 2 :M− 1 ) , 1 ) ;
[ L ,U] = l u (C ) ;
114

f o r i = N: −1:1
o p t p r i c e = U \ (L \ (D ∗ mesh ( 2 :M, i + 1 ) ) ) ;
mesh ( 2 :M, i ) = max( o p t p r i c e , S ( 2 : end −1)’−K) ;
end
p r i c e = max( i n t e r p 1 ( S , mesh ( : , 1 ) , S0 ) , 0 ) ;

i f p l o t o p t i m a l == t r u e
beta = (−( r−q −0.5∗ sigma ˆ 2 ) + . . .
s q r t ( ( r−q −0.5∗ sigma ˆ2)ˆ2+2∗ sigma ˆ2 ∗ r ) ) / sigma ˆ 2 ;
O p t i m a l E x e r c i s e ( mesh , t ,K, S , T, o p t i m a l t o l e r a n c e , beta , p l o t p e r p e t u a l )
end

h o l d on

i f p l o t v a l u e == t r u e
p l o t ( S ( 1 : end ) , mesh ( 1 : end , 1 ) )
hold on
p l o t ( S , max( S−K, −5))
end
end
Appendix E

Optimal Exercise Boundary

% Input : mesh = p r i c e −time mesh , t = t i m e s from mesh ,


% K = s t r i k e p r i c e , S = s t o c k p r i c e s from mesh ,
% T = time t o e x p i r a t i o n ,
% o p t i m a l t o l e r a n c e = t o l e r a n c e f o r o p t i m a l e x e r c i s e boundary
% b et a = c o n s t a n t v a l u e f o r p e r p e t u a l
% p l o t p e r p e t u a l = t r u e f o r p l o t and f a l s e f o r not p l o t

%Output : S f = o p t i m a l e x e r c i s e p r i c e s

f u n c t i o n S f = O p t i m a l E x e r c i s e ( mesh , t ,K, S , T, o p t i m a l t o l e r a n c e , . . .
beta , p l o t p e r p e t u a l )
Sf = zeros (1 , length ( t ) ) ;
tolerance = optimaltolerance ;
for i = 1: length ( t )
S f ( i ) = S ( f i n d ( abs ( mesh ( : , i )+K−S’) < t o l e r a n c e , 1 , ’ f i r s t ’ ) ) ;
end

115
116

x = 0 : 0 . 0 1 :T;
SF = i n t e r p 1 ( t , Sf , x ) ;
p l o t ( x , SF )
h o l d on
i f p l o t p e r p e t u a l == t r u e
p e r p e t u a l = ( bet a ∗ K ) / ( beta −1);
p e r p e t u a l = p e r p e t u a l ∗ ones ( 1 , l e n g t h ( t ) ) ;
plot ( t , perpetual )
end
end
Appendix F

Stock Loan

% Input : S0 = c u r r e n t s t o c k p r i c e , r = r i s k −f r e e i n t e r e s t r a t e ,
% T = time t o e x p i r a t i o n , sigma = v o l a t i l i t y ,
% ds = s t o c k p r i c e st e p , dt = time s t e p
% q = the dividend y i e l d rate , Q = p r i n c i p a l
% loan r = loan i n t e r e s t rate
% o p t i m a l t o l e r a n c e = t o l e r a n c e f o r o p t i m a l e x e r c i s e boundary ,
% p l o t e x i t = t r u e f o r p l o t , f a l s e f o r not p l o t

%Output : l o a n v a l u e = The l o a n v a l u e

f u n c t i o n l o a n v a l u e = CrankNicolson ( S0 , r , T, sigma , ds , dt , q ,Q, l o a n r . . .


, optimaltolerance , plotexit )

i f S0 < 0 | | T <= 0 | | r < 0 | | sigma < 0 | | l o a n r < 0 . . . .


| | ds < 0 | | dt < 0 | | q < 0 | | Q < 0 | | o p t i m a l t o l e r a n c e < 0
f p r i n t f ( ’ I n v a l i d input parameters . ’ ) ;

117
118

o p t i o n v a l u e = NaN ;
return ;
end

smax = 2∗max( S0 ,Q)∗ exp ( r ∗T ) ;


M = round ( smax/ ds ) ;
N = round (T/ dt ) ;

mesh = z e r o s (M+1,N+1);
S = l i n s p a c e ( 0 , smax ,M+1);
t = l i n s p a c e ( 0 ,T,N+1);
j = 0 :M;
i = 0 :N;

mesh ( : , end ) = max( S−(Q ∗ exp ( l o a n r ∗ T ) ) , 0 ) ;


mesh ( 1 , : ) = 0 ;
mesh ( end , : ) = ( smax − (Q ∗ exp ( l o a n r ∗ dt ∗ (N−i ) ) ) ) . ∗ . . .
exp(− r ∗ dt ∗ (N−i ) ) ;

a = ( dt / 4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) − ( r−q ) ∗ j ) ;
b = −(dt / 2) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + r ) ;
c = ( dt /4 ) ∗( sigma ˆ2 ∗ ( j . ˆ 2 ) + ( r−q ) ∗ j ) ;

C = −d i a g ( a ( 3 :M) , −1) + d i a g (1−b ( 2 :M) ) − d i a g ( c ( 2 :M− 1 ) , 1 ) ;


D = d i a g ( a ( 3 :M) , −1) + d i a g (1+b ( 2 :M) ) + d i a g ( c ( 2 :M− 1 ) , 1 ) ;
[ L ,U] = l u (C ) ;
119

f o r i = N: −1:1
mesh ( 2 :M, i ) = max(U \ (L \ (D ∗ ( mesh ( 2 :M, i + 1 ) ) ) ) , S ( 2 : end − 1 ) ’ . . .
−(Q ∗ exp ( l o a n r ∗ i ∗ dt ) ) ) ;
end
l o a n v a l u e = max( i n t e r p 1 ( S , mesh ( : , 1 ) , S0 ) , 0 ) ;

i f p l o t e x i t == t r u e
OptimalExit ( mesh , t ,Q, l o a n r , S , T, o p t i m a l t o l e r a n c e , dt )
end
end
Appendix G

Optimal Exit Price

% Input : mesh = p r i c e −time mesh , t = t i m e s from mesh


% Q = principal , loan r = loan i n t e r e s t rate
% S = s t o c k p r i c e s from mesh , T = time t o e x p i r a t i o n
% o p t i m a l t o l e r a n c e = t o l e r a n c e f o r o p t i m a l e x i t boundary
% dt = d e l t a time c o n s t a n t i n mesh

%Output : S f = o p t i m a l e x i t p r i c e s

f u n c t i o n S f = OptimalExit ( mesh , t ,Q, l o a n r , S , T, o p t i m a l t o l e r a n c e , dt )


Sf = zeros (1 , length ( t ) ) ;
eps star = optimaltolerance ;
for i = 1: length ( t )
S f ( i ) = S ( f i n d ( abs ( mesh ( : , i )+ Q ∗ exp ( l o a n r ∗ i ∗ dt)−S’) < . . .
eps star , 1 , ’ first ’ ) ) ;
end
x = 0 : 0 . 0 1 :T;

120
121

SF = i n t e r p 1 ( t , Sf , x , ’ s p l i n e ’ ) ;
p l o t ( x , SF )
end
References

[1] Einstein A. Uber die von der molekularkinetischen theorie der warme geforderte
bewegung von in ruhenden flussigkeiten suspendierten teilchen. Annalen der
Physik, 1905.

[2] Avanza Bank AB. Ansokan om kredit.

[3] Nordnet Bank AB. Villkor for ranterabatt.

[4] Fink J. Ahn M. and Fink K.E. On exercising american options: The risk of
making more money than you expected. Wilmott Magazine, 2003.

[5] Khan A.M. Conformity with large speculators: A test of efficiency in the grain
futures market. Atlantic Economic Journal, 14(3), 1986.

[6] Aristotle. Politics. Book II.

[7] L. Bahelier. Theorie de la speculation. Annales Scientifiques de lEcole Normale


Superieure, pages 21–86, 1900.

[8] European Central Bank. Marketable assets.

[9] Fischer Black and Scholes. The pricing of options and corporate liabilities. Journal
of Political Economy, pages 637–654, 1973.

122
References 123

[10] M. J. Brennan and E. S. Schwartz. Finite difference methods and jump processes
arising in the pricing of contingenet claims: A synthesis. Journal of Financial
and Quantitative Analysis, 1978.

[11] K. Bryan. Greens functions and the heat equation.

[12] G. Curtardon. A more accurate finite difference approximation for the valuation
of options. Journal of Financial and Quantitative Analysis, 1982.

[13] Fama F.E. The behavior of stock market prices. Journal of Business, 38(1), 1965.

[14] Fama F.E. Efficient capital markets: A review of theory and empirical work. The
Journal of Finance, 25(2), 1970.

[15] E. Haug. Complete Guide to Option Pricing Formulas. McGraw Hill, 2007.

[16] J. Hull and A. White. Valuing derivative securities using the explicit finite differ-
ence method. Journal of Financial and Quantative Analysis, 1990.

[17] John C. Hull. Options,Futures and Other Derivatives. Pearson Education Inc,
2012.

[18] Cannon J.R. The OneDimensional Heat Equation. Cambridge University Press,
1984.

[19] Kwok Y. K. Mathematical Models of Financial Derivatives. Springer, 2008.

[20] Putri E.R.M. Lu X. Semi-analytic valuation of stock loans with finite maturity.
Elsevier B.V., 2015.

[21] R. C. Merton. Theory of rational option pricing. Bell Journal of Economics and
Management Science, 1973.

[22] Reserve Bank of New Zealand. Loan-to-value ratio restrictions.


References 124

[23] The Congress of the United States. Fannie mae, freddie mac, and the federal role
in the secondary mortgage market, 2010.

[24] Brandimarte P. Numerical Methods in Finance and Economics. Wiley, 2006.

[25] Samuelson P. Rational theory of warrant pricing. Industrial Management Review,


6(2), 1965.

[26] Samuelson P. Proof that properly anticipated prices fluctuate randomly. Industrial
Management Review, 6(2), 1972.

[27] Brown R. A brief account of microscopical observations made in the months of


june, july and august, 1827, on the particles contained in the pollen of plants;
and on the general existence of active molecules in organic and inorganic bodies.
Philosophical Magazine, 1, 1827.

[28] Westergren B. Rade L. Mathematics Handbook - for Science and Engineering.


Studentlitteratur AB, 2003.

[29] J. Regnault. Calcul des Chances et Philosophie de la Bourse. Mallet-Bachelier


and Castel., 1863.

[30] Kitchen D. White B. Recourse vs. nonrecourse: Commercial real estate financing
which one is right for you?

[31] DeWynne J. Willmott P. and Howison S. Option pricing: Mathematical models


and computation. Oxford Financial Press, 1993.

[32] DeWynne J. Willmott P. and Howison S. The Mathematics of Financial Deriva-


tives. Cambridge University Press, 2008.
TRITA TRITA-MAT-K 2017:21
ISRN -KTH/MAT/K--17/21--SE

www.kth.se

You might also like