0% found this document useful (0 votes)
14 views92 pages

Tesi Pdfa

Uploaded by

peja88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views92 pages

Tesi Pdfa

Uploaded by

peja88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of Padua

SCHOOL OF ENGINEERING
FACULTY OF MATHEMATICAL ENGINEERING
Master Degree in Financial Engineering

Master Thesis

Option Pricing through Numerical Methods for PDEs


An Object-Oriented Python Implementation

Candidate: Thesis advisor:


Alessandro Reami Luca Bergamaschi

Academic Year 2023-2024


Abstract
This thesis explores the numerical methods used for solving partial dierential
equations (PDEs) that arise in nancial mathematics, specically in the context
of option pricing. We begin by introducing the Black-Scholes framework, which
serves as the foundation for pricing European options, as well as more complex
derivatives such as Barrier and Asian options. The work then delves into the
nite dierence and nite element methods (FEM), focusing on their application
to the Black-Scholes PDE and its variants.
Our approach includes the development of an object-oriented Python imple-
mentation that leverages the NumPy and SciPy libraries for ecient numerical
computation. We also integrate the PyFreeFem API to utilize the capabilities of
the FreeFem++ language for nite element analysis. Through this implementa-
tion, we solve a variety of option pricing problems, examining the convergence
and accuracy of dierent numerical methods.
The results demonstrate the eectiveness of these methods in approximating
option prices under various market conditions. We provide detailed comparisons
between numerical and analytical solutions where available, as well as an analy-
sis of the computational eciency of dierent techniques. The thesis concludes
with a discussion on the limitations of the current implementation and sugges-
tions for future enhancements, particularly in extending the framework to more
complex nancial instruments and higher-dimensional problems.

i
ii
Contents

1 Black-Scholes model: a brief recap 5


1.1 Single Asset Process . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Multi-Asset Processes . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Other Options: Barrier, Lookback, Asian, and American Options 16
1.3.1 Barrier Options . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.2 Lookback Options . . . . . . . . . . . . . . . . . . . . . . 22
1.3.3 Asian Options . . . . . . . . . . . . . . . . . . . . . . . . 24
1.3.4 American Options . . . . . . . . . . . . . . . . . . . . . . 26

2 Numerical Methods: Finite Dierences and FEM 29


2.1 Methods for Systems of ODEs . . . . . . . . . . . . . . . . . . . . 29
2.2 Finite Dierences . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3 Finite Elements Method (FEM) . . . . . . . . . . . . . . . . . . . 35
2.3.1 Variational Formulation: The Galerkin Method . . . . . . 41
2.3.2 Barrier Option . . . . . . . . . . . . . . . . . . . . . . . . 47
2.3.3 Basket Option . . . . . . . . . . . . . . . . . . . . . . . . 47

3 Program implementation 49
3.1 Enum Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.2 Option Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.3 Dynamics Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.4 Discretizer Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.5 Builder class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

4 Numerical Results 63
4.1 European Options in 1 Dimension . . . . . . . . . . . . . . . . . 63
4.2 Barrier Options in 1 dimension . . . . . . . . . . . . . . . . . . . 77
4.3 Asian Options in 1 Dimension . . . . . . . . . . . . . . . . . . . . 78
4.4 Basket Options in 2 Dimensions . . . . . . . . . . . . . . . . . . . 84

Bibliography 87

1
2 CONTENTS
Introduction
In this introductory section, we will summarize the main concepts that under-
pin the subsequent chapters, aiming to present the problem, explore how it can
be approached, and demonstrate its resolution using the associated partial dif-
ferential equations (PDEs) for specic types of options. To ensure this work
is self-contained, we will establish notation rules that will assist the reader in
understanding how the dierent chapters interconnect.
The rst section introduces the Black-Scholes framework and the derivation
of the Feynman-Ka£ PDE for European options. Additionally, we will discuss
the PDEs relevant to other types of options, such as Barrier Options, Asian
Options, and American Options.
The second chapter focuses on a review of the most commonly used numerical
methods for solving PDEs: the nite dierence method and the nite element
method (FEM). While these topics are broad, we will narrow our focus to the
specic aspects that are essential for the applications discussed later in this
work.
These chapters are not intended to introduce new concepts to the expert
reader but rather to provide a focused overview of the necessary background.
This will ensure that all the required results are clearly stated and contextu-
alized within the scope of this thesis. We encourage all readers to go through
these introductory sections to grasp the overarching ideas that have guided this
project.
In preparing the rst two chapters, we have relied heavily on two semi-
nal works in the eld. For the introduction to the Black-Scholes model, we
have drawn primarily from Bj"ork's "Arbitrage Theory in Continuous Time"
[5]. For the formalism of numerical methods, we have referred to Achdou and
Pironneau's "Computational Methods for Option Pricing" [2]. In the course of
the discussion, we will omit certain technical details and proofs that are beyond
the scope of this work; these can be found in the aforementioned texts or other
cited sources.

3
4 CONTENTS
Chapter 1

Black-Scholes model: a brief


recap
1.1 Single Asset Process
As mentioned in the introduction, we will dedicate this preliminary section to
a summary of the Black-Scholes model, rst introduced in 1973 [12]. Given
the extensive theory developed following this initial paper, we will focus on
highlighting the key aspects of the well-known results and emphasizing the con-
nection between the pricing problem and the solution of a specic PDE arising
from the model. In this preliminary setting, we will concentrate on European
Options. Later, we will generalize our model to include more complex options
such as Barrier Options, Asian Options, options depending on several underlying
assets, and American Options.
Let's now consider a simple setting where the Black-Scholes model holds
true. In this case, we must assume that the following hypotheses are satised,
though it is well-known that these assumptions are not generally true.

Hypothesis 1.1. ˆ Consider a dividend-free asset St = S(t) at time t,


following the geometric Brownian motion law:

dSt = µSt dt + σSt dWt (1.1)

where the volatility σ and the drift term µ are constants, and Wt is a
standard Brownian motion.

ˆ The risk-free interest rate is constant: r = rt = r(t) ∀ t.

ˆ Short selling is always allowed, it is possible to trade arbitrarily small frac-


tions of any nancial instrument, and there are no transaction costs. This
assumption is usually referred to as the "absence of friction hypothesis."

ˆ There are no arbitrage opportunities (for market eciency ).


We already know that these assumptions are not generally true; for example,
it is known that σ is not constant, as it is usually a function of the moneyness
St /K and has a skewed shape (also called a smile ), and that the risk-free interest

5
6 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

rate (if it exists) is almost never constant. These two aspects are not signicant
limitations because a similar discussion can be developed even with non-constant
volatility and interest rates. On the other hand, the market eciency and
absence of friction hypotheses are also not generally true, and other papers
attempt to discuss these scenarios.

Observation 1.2. Supposing that the asset follows the geometric Brownian
motion law 1.1, it is possible to dene the Stochastic Dierential Equation
(SDE):
(
dSt = µSt dt + σSt dWt
(1.2)
S0 = s0
This can be rewritten as
dSt
= µ dt + σ dWt
St
implying that the real assumption of the Black-Scholes model is that the returns
of St follow an Arithmetic Brownian motion with drift µ and diusion σ.

To complete our setting, we introduce a risk-free asset, which has no risk


and provides a return related to the risk-free interest rate rt .

Denition 1.3 (Risk-free asset ). Since we assumed that a risk-free interest


rt exists, we can dene the risk-free asset Bt as
rate

 dBt = r dt

t
Bt ,
B0 = 1

Furthermore, we also assumed that this interest rate is constant, so rt = r for


all t.
It is easy to notice that this SDE has the solution Bt = ert , representing
the continuous compounding formula, and that the risk-free asset is essentially
a zero-coupon bond (appropriately rescaled).

Proposition 1.4. The SDE related to the Geometric Brownian motion 1.2 has
a closed-form solution:
1 2
St = s0 eµt+σWt − 2 σ t . (1.3)

Moreover, it has a closed-form expected value given by:

E [St ] = s0 eµt .

Proof. Recalling that the solution of the corresponding linear equation is an


exponential function of time, we consider the transformation Xt = ln(St ) (since
the process St is strictly positive by construction). Applying Ito's Lemma, we
have that:  
1 1 1 2
dX = dS + − 2 [dS]
S 2 S
1 1 2 2
= (µSdt + σSdW ) − σ S dt
S 2S 2
1
= (µdt + σdW ) − σ 2 dt
2
1.1. SINGLE ASSET PROCESS 7

Thus, we have:
 
dX = µ − 1 σ 2 dt + σdW

t
2
X0 = ln s0

This equation is extremely simple: on the right-hand side, it does not contain
X, and therefore, it can be integrated directly to:
 
1
Xt = ln s0 + µ − σ 2 t + σWt
2
Returning to St , we have:

1 2
St = s0 e(µ− 2 σ )t+σWt
.

Computing E[St ] is then straightforward, recalling that eσWt is a log-normal


σ2
t
random variable with a known expected value e 2 .

We have now derived the two dynamics fundamental to dene the Black-
Scholes Model: the risk-free asset Bt and the risky one St :
(
dBt = rBt dt
(1.4)
dSt = µSt dt + σSt dWt

From Proposition 1.4, it is clear that the discounted risky asset e−r(T −t) St
cannot be a martingale unless µ = r, which is generally not true. Moreover, the
value of µ is typically unknown, and dierent market agents may have dierent
opinions on its value. Indeed, the value of µ is subjective, as is the probability
density P used to compute the expected value E. With this consideration in
mind, it is clear that, if we want results acceptable to all market agents, we need
to change the probability density to the so-called risk-neutral probability
Q: a new probability density depending only on the market and not on agents'
opinions, where the probability of upward and downward movements is no longer
subjective but objective.
Under Q, all discounted risky assets behave as martingales, meaning that the
drift of each asset is equal to the risk-free rate used for discounting. To achieve
this density, it is sucient to dene the stochastic process W̃t = Wt + µ−r
σ t and
the Radon-Nikodym density
(Z 2 )
  t Z t
dQ r−µ 1 r−µ
= exp dWs − ds .
dP Ft 0 σ 2 0 σ

In this new probability space, the Black-Scholes model initially stated under P
in 1.4 is equivalent under Q to
(
dBt = rBt dt
dSt = rSt dt + σSt dW̃t

where we see that the drift is now given by r and not by µ.


For the following discussion, we will always consider, without loss of gener-
ality, the model under the risk-neutral density Q, and we will then use r instead
of µ to denote the drift term.
8 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

Denition 1.5 (Contingent claim ). Consider a nancial market with an asset


A contingent claim with maturity date (exercise date) T is any stochastic
St .
variable X measurable with respect to the ltration FTS induced by the under-
lyingSt at time T . A contingent claim is called simple if it has the form
X = Φ(S(T )), where the function Φ is called the payo function.

The interpretation of this denition is that a contingent claim is a contract


that stipulates that the holder of the contract will obtain X (which can be
positive or negative) at the time of maturity T. The requirement that X ∈ FTS
simply means that, at maturity, it is always possible to determine the amount
of money corresponding to the payo, which means that at time T all the
information needed to compute the payo function is known and available to
everyone. A simple contingent claim is nothing more than a claim where the
payo only depends on the value of the asset at the maturity instant, which is
ST .
For example, a European Call is a simple contingent claim, for which the
payo function is given by

ΦCall (ST ) = max(ST − K, 0).

Our aim in this paper is to price some claims using the Black-Scholes model
stated above. We will use the notation Π(t, X) for the price process of the
claim X, but sometimes we will also use the notation Π(t, Φ) to underline the
dependency of the price on the payo. We will also use F (t, St = s, T, Φ) to
denote the price function of a contingent claim. Later on, we will nd claims
with dierent dependencies, like Asian Options, but for this initial discussion,
this assumption is sucient for our purposes and does not lead to a loss of
generality.
To provide a fair price for a contingent claim, a classical approach is to
consider a replicating portfolio, which is a portfolio able to achieve almost
surely (in the measure-theoretic sense, not in the common language sense!) the
contingent claim payo. We will prove that, in the case of anecient market
with absence of arbitrage opportunities, the value of this portfolio must be
equal to the price of the contingent claim. To achieve this conclusion, we need
the following denitions.

Denition 1.6 (Self-nancing Portfolio ). Let S̃t = (S1 , S2 , . . . , Sn ) be an asset


vector and ωt = (ω1 , ω2 , . . . , ωn ) a weight vector, both in Rn . The value Vt of a
Self-nancing Portfolio satises
dVt = ωt dS̃t

i.e., it is a portfolio where the only variations are due to the variation of the
asset's value.

Observation 1.7. A self-nancing portfolio is uniquely dened by the weight


vector ωt , and we will use the notation Vtω to denote it. In these pages, when-
ever we consider a portfolio, we will always consider a self-nancing portfolio
because we are interested in portfolios where the only price variation is due to
a movement of the underlying and not caused by the consumption/introduction
of new capital.
1.1. SINGLE ASSET PROCESS 9

For example, we can build a self-nancing portfolio using the two assets
Bt and St with the vector weight ωt = (αt , βt ). We can dene the vector
S̃t = (St , Bt ) and the value of our portfolio as

Vt = ωt S̃t = αt St + βt Bt .

Denition 1.8 (Arbitrage opportunity ). An arbitrage opportunity in a -


nancial market is a self-nancing portfolio with weight ωt such that

V0ω = 0
P (VTω ≥ 0) = 1
P (VTω > 0) > 0.

We say that there is an absence of arbitrage opportunities if there are no


arbitrage opportunities.

In short, we can interpret this denition by saying that an arbitrage oppor-


tunity is a portfolio with a null initial value that can have a positive value at
time T with a positive probability and never has a value less than zero at time
T.
The absence of arbitrage opportunities is fundamental in this discussion
because it enables several results to be proved. For example, the following is a
direct consequence of this assumption.

Observation 1.9 (Linearity of the pricing function on the payo ). Suppose


now that we have the pricing function F (t, s, T, Φ) for a contingent claim X. It
is quite trivial to notice that F is a linear function of the payo function, which
means that ∀a, b ∈ R and for all functions Φ, Ψ, we have

F (t, s, aΦ + bΨ) = aF (t, s, Φ) + bF (t, s, Ψ).

This observation is also quite intuitive using the classical absence of arbitrage
opportunity argument: since we can compose one payo as the sum of two
simpler payos, the sum of the prices of each term must be equal to the price
of the original payo to avoid arbitrage opportunities.

Returning to the process Π(t, X), we assume that the process can be ex-
pressed as a smooth price function F of (t, S(t)):

Π(t) = F (t, S(t)),

then we look for a function F such that the absence of arbitrage opportunities
is preserved. With these assumptions, it was proven in the Black-Scholes paper
[12] that the key idea is to impose the existence of a replicating portfolio for the
contingent claim payo, and that the value of the portfolio V ωt and the price
Π(t) must have the same dynamics at each time instant. This is equivalent to
saying

dV ωt = dΠ(t) = dF (t, St ),

From this equation, it is possible to obtain the fundamental theorem of the


Black-Scholes model:
10 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

Theorem 1.10 (Black-Scholes equation ). Assuming that the market is specied


by the equation 1.4 and that X is a simple contingent claim (with X = Φ(ST )),
the only pricing function Π(t) = F (t, St ) consistent with the absence of arbitrage
opportunities is the solution of the following PDE with boundary values on
[0, T ] × R+ :

∂ 2 F (t, s)

 ∂F (t, s) ∂F (t, s) 1 2 2
+ rs + s σ (t, s) − rF (t, s) = 0
∂t ∂s 2 ∂s2 (1.5)
F (T, s) = Φ(s) for all s ∈ (0, +∞)

Clearly, this result is powerful but not without weaknesses. Firstly, we as-
sumed that the price of the contingent claim is a function depending only on
(t, St ), which implies that we supposed a Markovian property of the price. This
assumption is generally not convincing, as market agents usually tend to price
every instrument also by looking at its historical prices. Another objection is to
the hypothesis that there exists a market where the underlying asset is traded;
indeed, we assumed that we could replicate the contingent claim with a portfolio
on the asset itself, which we can only build if we have access to a market where
the stock is traded. However, it is possible to provide an alternative argument
for equation 1.5 that is not open to the previous criticism. The surprising fact
is that the pricing equation does not contain the local mean rate of return µ
of the underlying asset. This means that, when it comes to pricing derivatives,
the local rate of return of the underlying asset plays no role whatsoever. The
only aspect of the underlying price process that is of any importance is the
volatility σ(t, s). Thus, for a given volatility, the price of a xed derivative (like
a European Call Option) will be exactly the same regardless of the underlying
stock's return.
This alternative procedure uses a Risk-Neutral Valuation technique and
a Martingale approach: it starts from the stochastic representation formula 1.4
and proves that the Black-Scholes model is arbitrage-free if and only if there
exists a local martingale measure where both the assets are local martingales.
Returning to equation 1.5, it is possible to compute the function F using
the Feynman-Ka£ stochastic representation formula.

Observation 1.11. The Black-Scholes PDE 1.5 can also be stated for: a free-
risk interest rate function r(t), a volatility function σ(t, s), and dividend-paying
assets where the dividend is innitesimal and paid at any time instant. In this
case, the dividend in dt is q(t)St dt, and the PDE becomes

∂ 2 F (t, s)

 ∂F (t, s) ∂F (t, s) 1 2 2
+ (r − q(t))s + s σ (t, s) − rF (t, s) = 0
∂t ∂s 2 ∂s2 (1.6)
F (T, s) = Φ(s) for all s ∈ (0, +∞)

Theorem 1.12 (Representation formula for the solution of 1.5). As in the


discrete case, it is also possible in the continuous framework to prove that the
price F of a contingent claim can be computed as the expected value of the
discounted payo:
F (t, St ) = e−r(T −t) EQ
t,s [Φ(ST )]

and thus the solution of 1.5 is this function.


1.1. SINGLE ASSET PROCESS 11

This PDE has the same structure as the classical Black-Scholes PDE if we
dene r̃ = r − q(t), so, without loss of generality, we will not consider dividend-
paying assets in the following discussion.

Theorem 1.13 (Feynman-Ka£ ). Assume that F is a solution to the boundary


value problem:

∂ 2 F (t, x)

 ∂F (t, x) ∂F (t, x) 1 2
+ µ(t, x) + σ (t, x) − rF (t, x) = 0
∂t ∂x 2 ∂x2 (1.7)
F (T, x) = Φ(x) for all x ∈ (0, +∞)

Assume furthermore that the process e−rs σ(s, X) ∂F


∂x (s, Xs ) is in L2 , where X
satises the SDE 
dXs = µ(s, Xs )ds + σ(s, Xs )dWs
.
Xt = x
Then F has the representation

F (t, x) = e−r(T −t) Et,x [Φ(XT )].

Using this theorem, we nd that the desired price function is

F (t, s) = e−r(T −t) Et,x [Φ(X(T ))], (1.8)

where X is dened by the dynamics:


(
dX(s) = r(s, X(s))ds + σ(s, X(s))dW (s)
X(t) = x

which has the same dynamics as the process S but with a dierent drift term r
instead of µ.
An important consequence of the representation formula 1.8 for F is that it is
possible to compute an analytical fair price for a simple contingent claim when r
and σ are constants and the function Φ(ST ) is simple enough to be integrated.
Indeed, recalling the dynamics of the BS model 1.4 under the probability Q,
which we report here:

(
dBt = rBt dt
(1.9)
dSt = rSt dt + σSt dWt
and recalling the solution 1.3 of the geometric Brownian motion with initial
condition St = s 2
1
)(T −t)+σ(WT −Wt )
ST = s e(r− 2 σ ,
we have the pricing function
Z ∞
−r(T −t)
F (t, s) = e Φ(sez )f (z) dz,
−∞

where f is the density of a random variable Z with normal distribution


  
1
N r − σ 2 (T − t), σ T − t .
2
12 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

In general, the integral of the function Φ is not computable and must be eval-
uated numerically, but in a few particular cases, the solution can be computed
analytically. Two known examples where this is possible are for the European
Call and Put Options, where the payo function is respectively Φ(x) = (x−K)+
+
and Φ(x) = (K − x) .

Example 1.14 (Black-Scholes formula for European Call and Put Option ). For
the European Call Option, we know that Φ(x) = (x − K)+ , then

Z ∞
+
EQ
t,s [(ST − K) ] = (ST − K)+ f (z) dz
−∞
Z ∞
1 2
)(T −t)+σ(WT −Wt )
= (se(r− 2 σ − K)+ f (z) dz
−∞
Z ∞ √
1 2
)(T −t)+σ T −tz
= (se(r− 2 σ − K)f (z) dz
ln( K
s )

which is an integral easy to compute, using the linearity of the integral operator
and completing the square in the exponent, so that we obtain two cumulative
distribution functions N of the standard normal distribution N (0, 1). At the
end, we achieve the famous Black-Scholes formula:

F (t, s) = sN [d1 (t, s)] − e−r(T −t) KN [d2 (t, s)]

with
s
ln( K ) + (r + 12 σ 2 )(T − t)
d1 (t, s) = √
σ T −t

d2 (t, s) = d1 (t, s) − σ T − t.

A similar computation can be made for the European Put Option, whose
payo function is Φ(x) = (K − x)+ , obtaining:

Z ∞
+
EQ
t,s [(K − ST ) ] = (K − ST )+ f (z) dz
−∞
Z ∞
1 2
)(T −t)+σ(WT −Wt ) +
= (K − se(r− 2 σ ) f (z) dz
−∞
Z ln( K
s ) √
1 2
)(T −t)+σ T −tz
= (K − se(r− 2 σ )f (z) dz
−∞

and after some computation, the result is:

F (t, s) = Ke−r(T −t) 1 − N (d2 (s, t)) − s 1 − N (d1 (s, t)) ,


 

with the same d1 and d2 as before.

Another famous type of Options is the so-called European Digital (or binary)
Options. These Options can be Call Options or Put Options, and they grant
the owner the right to earn 1 if the underlying is in a specic region and 0
otherwise. For the Call Option, the owner has the right to get a payo of 1 if
the underlying is above a given strike K at maturity T and 0 if the underlying
1.1. SINGLE ASSET PROCESS 13

is below it (resp. 0 and 1 for the Put Option with the same parameters). Then
we have that these payos can be expressed as
(
1 ST > K
ΦDigital Call (ST ) = 1ST >K =
0 otherwise
(
0 ST > K
ΦDigital Put (ST ) = 1ST ≤K =
1 otherwise
An easy observation of these Options is that a portfolio made by a European
Digital Call and a European Digital Put with the same strike K and maturity
T will almost surely get a payo of 1 at maturity because

1ST >K + 1ST ≤K = 1,


and then we have the Put-Call parity between the Digital Options, taking the
pricing function on both sides:

FDigital Call (s, K, T ) + FDigital Put (s, K, T ) = e−r(T −t) .

Example 1.15 (Black-Scholes formula for European Call and Put Digital Op-
tion ). For these Options, we can derive a closed pricing formula using the for-
mula for European Call and Put Options that we just derived. For a European
Call payo, we have

(ST − K)+ = (ST − K)1ST >K = ST 1ST >K − K 1ST >K

which means that the Call payo can be expressed in terms of two dierent
terms, one of which is a digital Option multiplied by K. Since during the
computation of the Call price the two terms were computed separately, we can
conclude from this observation that the price of the European Digital Call is
just the second term with K = 1. It means its price is

FDigital Call (t, s) = e−r(T −t) N [d2 (t, s)],

with d2 dened above.


Then we can also compute the price of a European Digital Put Option using
the Put-Call Parity and obtain:

FDigital Put (t, s) = e−r(T −t) − FDigital Call (t, s) = e−r(T −t) (1 − N [d2 (t, s)]) .

Clearly, the Black-Scholes PDE 1.5 has been studied in detail with extensive
literature, and the results we reported here are just a few that are useful to
introduce the problem and to give key information about this theory. Several
other formulas have been proved for other payos or for compositions of these
simple Options.
To conclude, we report here a general theorem with some sucient condi-
tions to ensure the existence and uniqueness of a strong solution for the pricing
problem [14] (a strong solution is a solution in the classical sense).

Theorem 1.16 (∃! strong solution [14]). There exists a unique strong solu-
tion F ∈ C 0 (R+ ×[0, T ]) for the Black-Scholes PDE 1.5 if the following condi-
tions are respected:
14 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

ˆ The function σ(t, S) is bounded on R+ ×[0, T ] and bounded from below


by a positive constant;

ˆ The function t 7→ r(t) is bounded and Lipschitz continuous (this assump-


tion can be relaxed);

ˆ The payo Φ(ST ) satises 0 ≤ Φ(ST ) ≤ C(1 + ST ) for a given constant


C.

Moreover, it is true that C 1 -regular with respect to t in R+ ×(0, T ], C 2 -


F is:
+ ′
regular with respect to S in R ×(0, T ], and it satises 0 ≤ F (t, St ) ≤ C (1+St )

for a given constant C .

Now that we have seen how it is possible, with the Black-Scholes assump-
tions, to solve the option pricing problem by solving a PDE numerically (in
general), we would like to investigate further the connection between SDEs and
PDEs. In particular, we want to focus our attention on the Innitesimal Op-
erator, which is a partial dierential operator closely connected with the Ito
formula and is useful for our purpose because it is known for its property of
connecting the probabilistic properties of a process with a specic PDE.

Denition 1.17 (Innitesimal generator ). Consider an n-dimensional SDE:

dXt = µ(t, Xt )dt + σ(t, Xt )dWt ,

the innitesimal generator of X , denoted by A, is a partial dierential op-


erator dened for every function h ∈ C 2 (Rn ) by
n n
X ∂h 1 X ∂2h
Ah(t, x) = µi (t, x) (x) + Cij (t, x) (x),
i=1
∂xi 2 i,j=1 ∂xi ∂xj

where C(t, x) is the matrix

C(t, x) = σ(t, x)σ T (t, x).

(Alternative names for this operator are Dynkin operator, Ito operator, or
Kolmogorov backward operator.)
Consider now a 1-dimensional SDE:
(
dXs = µ(s, Xs )ds + σ(s, Xs )dWs
Xt = x

and its innitesimal generator A given by

∂ 1 ∂2
A = µ(t, x) + σ 2 (t, x) 2 .
∂x 2 ∂x
If we consider the boundary value problem dened by the following PDE and
initial condition F (T, x) = Φ(x):

∂F
(t, x) + AF (t, x) = 0,
∂t
1.2. MULTI-ASSET PROCESSES 15

that in explicit form is:

∂F ∂F 1 ∂2F
(t, x) + µ(t, x) (t, x) + σ 2 (t, x) 2 (t, x) = 0,
∂t ∂x 2 ∂x
and we apply Ito's lemma to the process F (s, X(s)), we obtain:

Z T  
∂F
F (T, XT ) = F (t, Xt ) + (s, Xs ) + AF (s, Xs ) ds
t ∂t
Z T
∂F
+ σ(s, Xs ) (s, Xs ) dWs .
t ∂x
The time integral vanishes due to our denition of the PDE, and the stochas-
tic integral will also vanish if σ(s, Xs ) ∂F
∂x (s, Xs ) is suciently integrable, and
we take the expected value. Applying the boundary condition F (T, x) = Φ(x)
and the initial value Xt = x, we conclude that

F (t, x) = Et,x [Φ(XT )].

In this way, we have proved a simplied version of the Feynman-Ka£ theorem,


which can be generalized to the result we presented earlier with a little more
eort. Through these steps, we have demonstrated the role of the innitesimal
generator A in the derivation of the theorem.

1.2 Multi-Asset Processes


Let us now consider a framework with two risky assets, whose prices are S1 and
S2 (keeping in mind that all the following discussion can be generalized to a
framework with several assets). We assume that the prices of the underlying
assets obey the following system of stochastic equations:

 !
σ1
dS1t = S1t µ1 + p (dW1t + ρdW2t )



1 + ρ2

! (1.10)
 σ2
dS2t = S2t µ2 + p (ρdW1t + dW2t )



1 + ρ2

where W1 and W2 are two independent standard Brownian motions, and ρ is


the correlation factor such that −1 < ρ < 1. For simplicity, we assume that
σ1 and σ2 are positive constants, but a generalization to volatilities that are
functions σ1 (S1 , S2 , t) and σ2 (S1 , S2 , t) can be considered. For the same reason,
we also assume that the risk-free interest rate rt is constant.
Consider a European Option on this two-asset basket, whose payo is Φ(S1 , S2 ).
As in the single-asset case, it is possible to nd a probability measure Q under
which the price of the option is

F (t, S1 , S2 ) = e−r(T −t) E∗ (Φ(S1T , S2T )|Ft ).

Applying the two-dimensional Ito's formula, it is possible to recover the price of


the option F (t, S1 , S2 ) as the solution of a partial dierential equation (PDE).
Replacing time with time to maturity, we end up with the PDE:
16 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP


2 2
 ∂F − 1
 X ∂2F X ∂F
Mk,l Sk Sl − rSk + rF = 0, t ∈ (0, T ], S1,2 > 0

∂t 2 ∂Sk ∂Sl ∂Sk
 k,l=1 k=1

F (0, S1 , S2 ) = Φ(S1 , S2 ), S1 , S2 > 0

(1.11)
where the matrix M,
" #

σ2 1+ρ2 σ1 σ2
M = 2ρ 1
1+ρ2 σ1 σ2 σ22

is clearly positive denite.


Among the usual payo functions, we can mention, for a Put option:

+
Φ0 (S1 , S2 ) = (K − (S1 + S2 )) (1.12)

+
Φ0 (S1 , S2 ) = (K − max(S1 , S2 )) (1.13)
+
Φ0 (S1 , S2 ) = (K − min(S1 , S2 )) (1.14)

2
We can notice here that the rst two payos belong to L , the space of square
integrable functions, while the third does not. Indeed, this last payo function
is constantly equal to K on the whole lines x = 0, y = 0. As a consequence of
this, the theory of weak solutions that we will study later cannot be applied to
this function, while it holds true for the rst two payos.
For the Call options, we can mention the payo functions:

+
Φ0 (S1 , S2 ) = ((S1 + S2 ) − K) (1.15)

+
Φ0 (S1 , S2 ) = (max(S1 , S2 ) − K) (1.16)
+
Φ0 (S1 , S2 ) = (min(S1 , S2 ) − K) (1.17)

2
which are clearly not in L since they are all unbounded, for example, on the
line S1 = S2 .
It will be useful later to consider the behavior of the payos in the degenerate
cases S1 = 0 or S2 = 0. It is easy to notice that some payos become the one-
dimensional usual Call/Put, while others become constant 0 or K.

1.3 Other Options: Barrier, Lookback, Asian, and


American Options
1.3.1 Barrier Options

A Barrier Call (resp. Put) Option is a contract that gives its owner the right
to buy (resp. sell) a share of a specic stock at a xed price K at maturity T
if a barrier event has not occurred. Several types of barrier events exist in
the nancial markets, the most famous being the Up-and-Out with barrier B
(resp. the Down-and-Out with barrier b), where the barrier event occurs if the
underlying price Si reaches the high value B at any point during the Option's
life (resp. if Si reaches the low value b). Another type of barrier includes the
1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS17

Up-and-In with barrier B (resp. the Down-and-In with barrier b), where the
barrier event occurs if the underlying price Si does not reach the high value B at
any point during the Option's life (resp. if Si reaches the low value b). Barrier
Options of the rst type are also called Knock-Out Options, while those of the
second type are called Knock-In Options.

Observation 1.18 (In-Out Parity). It is easy to see that the sum of the
payos of an Up-and-Out and an Up-and-In Barrier Option with the same
barrier B on the same initial contingent claim Z will equal the payo of Z.
Therefore, the sum of the prices of these two Barrier Options must equal the
price of the initial contingent claim, in the absence of arbitrage opportunities. A
similar observation holds true for the Down-and-Out and Down-and-In Barrier
Options.

To illustrate, consider the Barrier Options on the stock plot in Figure 1.1.
In this case, an Up-and-Out Barrier Call Option with a barrier at B and strike
K = S0 would not pay out, while a similar Up-and-In Barrier Call Option
would. On the other hand, a Down-and-Out Option with a barrier at b would
pay out, while a Down-and-In Option would not.

Figure 1.1: Simulation of the evolution of a stock value.

To study these kinds of Options, some denitions are necessary, and we will
use the standard results proposed by Borodin-Salminen [6]. Let {X(t); 0 ≤ t ≤
∞} be a generic process with continuous trajectories taking values in R.

Denition 1.19 (Hitting Time ). For any y ∈ R, the hitting time of y , τ (X, y),
also denoted by τ (y) or τy , is dened by

τ (y) = inf{t ≥ 0 | X(t) = y}.

The X -process absorbed at y is dened by

Xy (t) = X(t ∧ τ ),

where we have used the notation a ∧ b = min(a, b).


18 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

Denition 1.20 (Running Maximum, Running Minimum ). The running max-


imum and minimum processes MX (t) and mX (t) are dened by
MX (t) = sup X(s),
0≤s≤t

mX (t) = inf X(s).


0≤s≤t

Since we are primarily interested in Wiener processes, let X be a Wiener


process with constant drift and constant diusion. It is possible to obtain an
explicit density function for the absorbed process Xy (t) and deduce a distribu-
tion function for the running maximum and minimum in terms of the Normal
distribution. The quoted formulas can be found in [6] and in [5].
With these new tools, it is possible to prove the following theorems, which
tell us that the pricing of a Barrier Option can be reduced to the pricing of
the related non-barrier claim. This means that if we can price the non-barrier
claim, then we can also price its related Barrier Option.
We now introduce some notation: when considering an upper barrier B or
a lower barrier b and an Out contract O or an In contract I on the initial
contingent claim Z and the usual payo Φ, we will use:

ˆ ZBO for the Up-and-Out related contract;


ˆ Z BI
for the Up-and-In related contract;
ˆ ZbO for the Down-and-Out related contract;
ˆ ZbI for the Down-and-In related contract;
and similarly Φb and ΦB for the chopped initial payos.

Example 1.21. From a mathematical point of view, the formula representing


the payo of ZBO is:
(
Φ(S(T )) if ∀ t ∈ [0, T ], S(t) < B
Z BO
(1.18)
0 if ∃ t ∈ [0, T ], S(t) ≥ B

We can also dene ΦB as the chopped version of the payo Φ above the
barrier B: (
Φ(x) for x<B
ΦB (x) (1.19)
0 for x≥B
With this notation, we can rephrase the In-Out Parity in Observation 1.18
as:

FbI (t, s, Φ) + FbO (t, s, Φ) = F (t, s, Φ) = F BI (t, s, Φ) + F BO (t, s, Φ). (1.20)

We already discussed the linearity of the pricing function with respect to


the payo in Observation (1.9). The same linearity also applies to the chopping
operation implied in Barrier Options. In formula, we have that ∀ a, b ∈ R and
for all functions Φ, Ψ, we have:

(aΦ + bΨ)b = aΦb + bΨb ,

(aΦ + bΨ)B = aΦB + bΨB .


1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS19

Theorem 1.22 (Pricing Barrier Contracts). Consider a claim Z = Φ(S(T ))


with pricing function F (t, s, Φ). The pricing functions of the corresponding
Down-and-Out contract for s < B or s > b are given by:

  2r̃2  2 
b σ b
FbO (t, s, Φ) = F (t, s, Φb ) − F t, , Φb
s s
  2r̃2 
B2 B

BO B B σ
F (t, s, Φ) = F (t, s, Φ ) − F t, ,Φ
s s
(1.21)
  2r̃2  2 
b b σ b
FbI (t, s, Φ) = F (t, s, Φ ) + F t, , Φb
s s
  2r̃2 
B2 B

BI B σ
F (t, s, Φ) = F (t, s, ΦB ) + F t, ,Φ ,
s s

where we used:
1
r̃ = r − σ 2 .
2
Using this theorem, we can also prove that the linearity of F on the payo
implies the linearity of the pricing function for the Barrier Option. In formula,
we have:
FbO (t, s, aΦ + bΨ) = aFbO (t, s, Φ) + bFbO (t, s, Ψ),
which holds true also for the other pricing functions for Barrier Options.

Observation 1.23. These pricing functions are consistent with Observation


1.18 due to the linearity of F:

F BO (t, s, Φ) + F BI (t, s, Φ) = F (t, s, ΦB ) + F (t, s, ΦB )


= F (t, s, Φ).

Before considering some examples for (1.21), we recall the payo and the
prices for some basic payos like the stock ST , the zero-coupon BO, the digital
Call H, the Call C, and the Put P. We have that (in bold are the pricing
functions):



 ST (x) = x 
 ST (t, s) = s
BO(t, s) = e−r(T −t)

 

BO(x) = 1

 


 
 "
   s
#

1, x > L

−r(T −t) r̃(T − t) + log L
H(x, L) = H(t, s, L) = e N √

 0, x ≤ L 
 σ T −t
C(x, K) = (x − K)+

 

C(x, K) = c(t, s, K)

 

 
P (x, K) = (K − x)+

 

P (x, K) = p(t, s, K)

(1.22)
where c(t, s, K) and p(t, s, K) are the usual Black-Scholes formulas.

Proposition 1.24 (Down-and-Out Zero Coupon Bond). The Down-and-


Out zero coupon bond with barrier b, for s > b, is priced as:

  2r̃2  2 
b σ b
BObO (t, s) = H(t, s, b) − H t, , b .
s s
20 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

Proposition 1.25 (Down-and-Out Stock). The Down-and-Out contract on


the stock with barrier b, for s > b, is priced as:

  2r̃2  2 !
b σ b
STbO (t, s) = b H(t, s, b) − H t, , b
s s
  2r̃2  2 
b σ b
+ C(t, s, b) − C t, , b .
s s

Proposition 1.26 (Down-and-Out European Call). The Down-and-Out


European Call Option is priced as:

ˆ For L < K:
  2r̃2  2 
b σ b
CbO (t, s, K) = C(t, s, K) − C t, , K .
s s

ˆ For L > K:

CbO (t, s, K) =C(t, s, K) + (L − K)H(t, s, L)


  2r̃2   2   2 
b σ b b
− C t, , K + (L − K)H t, , b .
s s s

Proposition 1.27 (Put-Call Parity). The price of a Down-and-Out Euro-


pean Put PbO and the price of a Down-and-Out European Call CbO are related
by the formula:

PbO (t, s, K) = KBObO (t, s) − STbO (t, s) + CbO (t, s, K). (1.23)

Now that we have these key results that we can use to price both a Down-
and-Out Call and a Down-and-Out Put, we would like to derive the analogous
results for the Up-and-Out contracts. It is not surprising that these results can
be obtained by following the same ideas, reversing the role of some instruments
during the discussion. For example, if we consider the digital Put Option with
payo:
(
0, x>L
H̃(x, L) = ,
1, x≤L
with pricing function:

" #
S0

ln + r̃(T − t)
H̃(t, s, L) = e−r(T −t) N K
√ ,
σ T −t

we have the following results:

Proposition 1.28 (Up-and-Out Zero Coupon Bond). The Up-and-Out


zero coupon bond with barrier B, for s < B, is priced as:

 2r̃2
B2
  
B σ
BO BO (t, s) = H̃(t, s, B) − H̃ t, ,B .
s s
1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS21

Proposition 1.29 (Up-and-Out Stock). The Up-and-Out contract on the


stock with barrier B, for s < B, is priced as:

 2r̃ !
B2
 
B σ2
STBO (t, s) = B H̃(t, s, B) − H̃ t, ,B
s s
  2r̃2 
B2

B σ
− P (t, s, B) + P t, ,B .
s s
Proposition 1.30 (Up-and-Out Put). The Up-and-Out European Put Op-
tion is priced as:

ˆ If L>K and s < L:


 2r̃2
B2
  
B σ
P BO (t, s, K) = P (t, s, K) − P t, ,K .
s s

ˆ If L<K and s < L:


BO
P (t, s, K) =P (t, s, B) − (K − B)H(t, s, B)
  2r̃2  
B2 B2
  
B σ
− P t, , B − (K − B)H t, ,B
s s s
"   2r̃2 #
B σ
+ 1− (K − B)e−r(T −t) .
s

To conclude this discussion, we just need the Put-Call Parity for this Option,
which is given by:

Proposition 1.31 (Put-Call Parity). The price of an Up-and-Out European


Put P BO and the price of an Up-and-Out European Call C BO are related by
the formula:

P BO (t, s, K) = KBO BO (t, s) − ST BO (t, s) + C BO (t, s, K). (1.24)

This last result concludes the discussion on Out contracts, at least for Call
and Put Options.
Turning our attention to the In contracts, we can achieve similar pricing
formulas simply by applying the In-Out Parity of Observation 1.18 and Formula
1.20.

Proposition 1.32 (Down-and-In Call). The Down-and-In European Call


Option is priced as:

ˆ If L < K:
  2r̃2  2 
b σ b
CbI (t, s, K) = C t, , K .
s s
ˆ If L > K:
  2r̃2   2   2 
b σ b b
CbI (t, s, K) = C t, , K + (b − K)H t, , b
s s s
− (b − K)H(t, s, b).
22 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

Now let's consider an Option with two Out barriers ( double knockout Option )
b, B (the cases b=0 and B=∞ St . To
can be treated similarly) on the asset
derive a PDE, we consider the stopping time τ = inf{t ∈ [0, T ] : St ∈
/ (b, B)},
which represents the rst exit moment for St from the interval (b, B); after this
moment, it is certain that the Option will pay 0 because the barrier event has
occurred.
Instead of St , we will consider the absorbed process St∧τ , which is also a
Markov process, and its discounted version e−r(T −t∧τ ) St∧τ is a martingale. It
is easy to notice that the price of this Option will be a function of t ∧ τ and of
the absorbed process. We have that its pricing function will be:

(
F (t ∧ τ, St∧τ ) Ω = on [0, T ] × (b, B)
F (t ∧ τ, St∧τ ) = .
0 otherwise

It satises the Black-Scholes equation where it is non-zero because, in that


region, the barriers do not play any role, but it has two additional boundary
conditions that force the price to be equal to 0 on the boundaries [1]. We achieve
the Boundary Value Problem (BVP):

∂F ∂F σ2 S 2 ∂ 2 F


 + rS + =0 on Ω = [0, T ] × (b, B)
 ∂t ∂S 2 ∂S 2
F (T, S) = Φ(S) nal condition
. (1.25)



F (t, b) = F (t, B) = 0 boundary condition

A generalization of this BVP is possible if we consider an interest rate and a


volatility that are not constant, in the same way that it is possible to generalize
the Black-Scholes PDE without the boundary conditions.
It is also possible to easily generalize this BVP for Basket Options with
barriers using the PDE 1.11 and imposing the value on all the boundaries.

1.3.2 Lookback Options

A European Lookback Option is a contract with maturity T that allows the


owner to earn a payo computed as a function of the realized maximum or min-
imum of the underlying stock price over the entire life of the contract. Typical
examples are:

Lookback Call Φ = S(T ) − min S(t),


t≤T

Lookback Put Φ = max S(t) − S(T ),


t≤T
+
Forward Lookback Call Φ = max S(t) − K ,
t≤T
+
Forward Lookback Put Φ = K − min S(t) .
t≤T

We focus here on the Lookback Put, but it is possible to derive closed for-
mulas for pricing the other three options as well. Other standard results can
be found in Conze and Viswanathan (1991) [11] and Goldman et al. (1979)
[16]. As with Barrier Options, these results can be proven using the running
maximum and running minimum processes, which have a known distribution.
1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS23

Proposition 1.33 (Lookback Put Price). The price of the Lookback Put at
t=0 is given by:

h √ i σ2 σ2 h √ i
F (s, 0) = −sN [−d]+se−rT N −d + σ T +s N [d]−se−rT N −d + σ T ,
2r 2r
where:
rT + 12 σ 2 T
d= √ ,
σ T
and N is the Normal distribution.

If we consider an option on the running maximum MSt (t) = sups∈[0,t] Ss (like


the Lookback Put) with the usual Geometric Brownian Motion St , it is true that
(St , Mt ) is a Markov process. One can prove that the price of these Lookback
Options at time t is a function F (t, St , Mt ) on the domain Ω = {(t, S, M ) ∈ R3 :
t ∈ [0, T ] and 0 ≤ S ≤ M } and satises:

σ2 S 2 ∂ 2 F

∂F ∂F
+ + rS − rF = 0,


2 ∂S 2

 ∂t
 ∂S
F (T, S, M ) = Φ(S, M ), .


 ∂F
(t, S, S) = 0.


∂M
This three-dimensional problem (one dimension in time and two in space) can
be reduced to a two-dimensional problem (one in time and one in space) if the
payo is of the form Φ(S, M ) = M Φ̃(S/M ) (as in the Lookback Put). Indeed,
if we consider the change of variables F (t, S, M ) = M ω(t, S/M ), where ω(t, ξ)
is a function on the new domain Ω̃ = {(t, ξ) : t ∈ [0, T ], ξ ∈ [0, 1]}, it satises:

 2 2 2
 ∂ω + σ ξ ∂ ω + rξ ∂ω + rω = 0,

2 ∂ξ 2

 ∂t ∂ξ


ω(T, ξ) = Φ̃(ξ), . (1.26)


 ∂ω
(t, 1) = ω(t, 1).



∂ξ

Clearly, this reduction is not generally possible when (t, S, M ) depends on


the interest rate and the volatility. In that case, it will be necessary to solve the
initial PDE.
It is also possible to deduce a PDE for options depending on the running
minimum mx (t) (like the Lookback Call). The pricing function F (t, S, m) on
the domain Ω = {(t, S, m) ∈ R3 : t ∈ [0, T ] and m ≤ S ≤ ∞} satises:

σ2 S 2 ∂ 2 F

∂F ∂F
+ + rS − rF = 0,


2 ∂S 2

 ∂t
 ∂S
F (T, S, m) = Φ(S, m), .


 ∂F
(t, S, S) = 0.


∂m
We can apply a similar change of variables F (t, S, m) = mω(t, S/m) when
Φ(S, m) = mΦ̃(S/m), with ω(t, ξ) a function on the new domain Ω̃ = {(t, ξ) :
24 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

t ∈ [0, T ], ξ ∈ [1, ∞)}, which satises:



∂ω σ 2 ξ 2 ∂ 2 ω ∂ω
+ + rξ + rω = 0,


2



 ∂t 2 ∂ξ ∂ξ
ω(T, ξ) = Φ̃(ξ), . (1.27)


 ∂ω
(t, 1) = ω(t, 1).



∂ξ

The same considerations as before regarding the generalization of these re-


sults hold true.

1.3.3 Asian Options

A European Asian Option is a contract with maturity T that allows the owner
to earn a payo based on the average price of the risky asset over a specied
period. The payo can be written as Φ(ST , AT ), where AT is an average of St .
There are dierent types of averages commonly used in the market:

ˆ Discrete Monitoring : This is the most commonly used method, where the
monitoring occurs at the times 0 = t0 , t1 , . . . , tn = T :
n
1X
A(0, T ) = S(ti );
n i=0

ˆ Integral Average : We will use this for our purposes as it is the continuous
counterpart of discrete monitoring:

T
1
Z
A(0, T ) = Sr dr;
T 0

ˆ Geometric Average :
n
! n1
Y
A(0, T ) = S(ti ) ,
i=0

from a mathematical point of view, this average is preferable because the


geometric average of log-normal distributions is still a log-normal distribu-
tion, making it possible to derive a pricing formula for the Asian Option
using it;

ˆ Continuous Geometric Average : This is the continuous version of the


geometric average:

!
T
1
Z
A(0, T ) = exp ln(S(t)) dt ;
T 0

If we assume that St is a Geometric Brownian Motion, then we can prove


that (St , At ) is a Markov process.
1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS25

The most famous examples of Asian Options belong to two families: xed
strike and oating strike. For example:

Fixed Strike Asian Call Φ = (A(0, T ) − K)+ ,


Fixed Strike Asian Put Φ = (K − A(0, T ))+ ,
Floating Strike Asian Call Φ = (S(T ) − kA(0, T ))+ ,
Floating Strike Asian Put Φ = (kA(0, T ) − S(T ))+ .

The weight k is usually 1, so it is often omitted.


Since (St , At ) is a Markov process, it is possible to show that the price of
the Option at time t, denoted by F (t, St , At ), on the domain Ω = {(t, S, A) ∈
[0, T ] × [0, ∞)2 }, satises:

σ2 S 2 ∂ 2 F

 ∂F ∂F 1 ∂F
+ 2
+ rS + (S − A) − rF = 0,
∂t 2 ∂S ∂S t ∂A (1.28)
F (T, S, A) = Φ(S, A).

As discussed in Rogers and Shi's paper (1995) [29], in some cases, it is


possible to reduce this PDE to a two-dimensional problem (one in time and
one in space). For example, if we consider a xed strike Call with Φ(S, A) =
(A − K)+ , using the change of variable F (t, S, A) = Sω(t, K−tA/T
S ), we can
prove that ω satises:

2 2 2
 
 ∂ω + σ ξ ∂ ω − 1 + rξ ∂ω = 0,

∂t 2 ∂ξ 2 T ∂ξ (1.29)

 ω(T, ξ) = Φ̃(ξ),

where Φ̃(ξ) = (ξ − K)+ . The same result holds true for a oating strike Put
+ +
with Φ(S, A) = (K − A) using the same change of variables and Φ̃(ξ) = (ξ) .
+
If we focus our attention on the oating strike Call with Φ(S, A) = (S − A)
+
(and similarly for the oating strike Put Φ(S, A) = (A − S) ), using the change
tA + −
of variable F (t, S, A) = Sω(t, −
T s ) and Φ̃(ξ) = (1+ξ) (resp. Φ̃(ξ) = (1+ξ) ),
we obtain the same PDE 1.29. However, it is important to note that these
reductions are not possible for general interest rates and volatilities that depend
on (t, S, A).
As mentioned earlier, for geometric average Asian Options, it is possible to
derive closed-form formulas since we know the distribution of the average. In
Kemna and Vorst (1990) [23], more formulas are provided in detail. Here, we
present one example:

Proposition 1.34 (Geometric Average Pricing Formula for Fixed Strike


Call). In the case of a Geometric Average Asian Call Option with a xed strike,
the pricing formula is:
 h √ i
e−rT S0 eµn T N [dn ] − KN dn − σn T ,

where N is the standard normal distribution and:


 
1 n+1 1 2
µn = r − σ2 + σn ,
2 2n 2
26 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP

σ 2 (n + 1)(2n + 1)
σn2 = ,
6n2
ln SK0 + µn + 12 σn2 T
 
dn = √ .
σn T

1.3.4 American Options

So far, we have focused on European Options. We now turn our attention to


American Options and study their pricing problem. An American Option is a
contract that can be exercised at any moment before its maturity T . Unlike a
European Option, where the payo Φ is a function Φ(ST ) achievable only at
T, the payo of an American Option is a function Φ(t, St ) that evolves over
time, since it can be exercised at any moment. As a result, an American Option
provides more rights to its owner than the equivalent European Option, and
thus the price of the former will be greater than or equal to the latter.
If we assume a risk-neutral probability space, the price F of an American
Option will be the maximum of all possible expectations of gain:
 Rτ 
F (t, x) = sup E e− t r ds Φ(τ, Sτt,x ) ,
τ ∈T[t,T ]

where T[t,T ] denotes the set of stopping times τ of the ltration Ft with values
in [t, T ].
It is possible to prove (see Bensoussan and Lions (1984) [4] and Jaillet,
F is the solution of the PDE:
Lamberton, and Lapeyre (1990) [20]) that

2 2 2
 
min − ∂F − rS ∂F − σ S ∂ F + rF ; F − Φ = 0 t ∈ [0, T ], S ≥ 0,

∂t ∂S 2 ∂S 2

F (T, ST ) = Φ(ST ).

This is equivalent to the variational inequality:

σ2 S 2 ∂ 2 F

∂F ∂F
+ rS + − rF ≤ 0 t ∈ [0, T ], S ≥ 0,


∂t ∂S 2 ∂S 2




F ≥ Φ(t, St ) t ∈ [0, T ], S ≥ 0,


2 2 2
 
∂F ∂F σ S ∂ F
+ rS + − rF (F − Φ) = 0 t ∈ [0, T ], S ≥ 0,


2 ∂S 2



 ∂t ∂S

F (0, S0 ) = Φ(0, S0 ) S ≥ 0.

When we compare the prices of European Calls and Puts with their American
counterparts, some important and counterintuitive results emerge. It can be
proved that the price of the two Calls will always be the same since the maximum
value of the expected payo is always at the last available moment T. Therefore,
exercising the American Call before maturity is not advantageous. On the other
hand, for the Put Option, there exists a region where the price of the American
Option coincides with the payo at that moment Φ(t, St ) = (K − St )+ . In this
region, the Option should be exercised since it is worth selling the underlying
asset to buy a risk-free asset. This region, where F (t, St ) = Φ(t, St ), is called
the region of exercise.
We will not focus on this type of Option since it is not the main topic of this
discussion. Curious readers can nd more details in the summary by Pascucci
1.3. OTHER OPTIONS: BARRIER, LOOKBACK, ASIAN, AND AMERICAN OPTIONS27

(2009) [25], which references the works of Bensoussan (1984) [3] and Karatzas
(1988, 1989) [21] [22] for a probabilistic approach based on the notion of the
Snell envelope in continuous time, Jaillet, Lamberton, and Lapeyre (1990) [20]
who employed variational techniques and provided a rigorous justication of the
numerical solution, Oksendal and Reikvam [28], Gatarek and ‘wiech [15] who
employed the theory of viscosity solutions, Zhang [31] for a complete proof of
strong convergence of the schemes and an extension to models with jumps, and
of course, the book by Achdou and Pironneau (2005) [2], which devotes an entire
chapter to this topic. A nal reference is the article by Brennan and Schwartz
(1977) [7].
28 CHAPTER 1. BLACK-SCHOLES MODEL: A BRIEF RECAP
Chapter 2

Numerical Methods: Finite


Dierences and FEM
2.1 Methods for Systems of ODEs
In the following sections, we will see that solving a PDE often involves converting
the problem into solving a specic system of ODEs, dened using matrices that
depend on the PDE. Therefore, we will need to solve such systems numerically,
a problem that has been widely discussed (see, for example, [9] [17]).
Suppose now that we want to solve an ODE (both in the scalar and vectorial
cases) of the form:

y(t) = f (t, y(t))
y(0) = y0
If we cannot compute an analytical solution, we can use numerical methods to
estimate the function y(t). Here we present some methods among the countless
ones that we implemented in our code. In the following subsections, we will
always consider h as the discretization step size.

Example 2.1 (Forward Euler Method ). The Forward Euler method is the sim-
plest method that can be applied to solve an ODE. The idea of this method is
to approximate the function y(t) through its tangent line at any point. This
leads to the approximating formula:

(
yn+1 = yn + hf (tn , yn )
yn=0 = y0

This is an explicit method of order 1, and it is also known for not being
A-stable. We will see later that this unstable behavior will be observable in our
implementation. Since we aim to avoid such instabilities, we will primarily use
implicit methods, which are generally more stable than explicit ones.

Example 2.2 (Backward Euler Method ). The Backward Euler method is an


order 1 method and is the simplest implicit method. It uses the same idea as
the Forward Euler method, which is to approximate the function y(t) with the
tangent line, but instead of considering the tangent at the point (tn , yn ), it uses

29
30CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

the point (tn+1 , yn+1 ). This leads to the approximating formula:


(
yn+1 = yn + hf (tn+1 , yn+1 )
yn=0 = y0

This is clearly an implicit formula because both terms depend on yn+1 . In


this case, it is necessary to solve a linear system, a usually expensive task that
generally ensures more stable behavior of the solver.

Example 2.3 (Crank-Nicolson Method ). The Crank-Nicolson method is an


implicit method of order 2 that uses the approximating formula:

h
n+1 = yn + (f (tn , yn ) + f (tn+1 , yn+1 ))
y
2
yn=0 = y0

The Runge-Kutta methods are a family of methods where the approxima-


tion between two consecutive points (tn , yn ) and (tn+1 , yn+1 ) is computed using
several stages ξ1 , ξ2 , . . . , ξn that act as intermediate points between them. The
general formula for a Runge-Kutta method is:


 y(tn ) ≈ yn = ξ1 (⇒ c1 = 0) ,

y (tn + hc2 ) ≈ yn + hc2 f (tn , yn ) = yn + a2,1 hf (tn , ξ1 ) = ξ2 ,






 ..
.







 i−1
X
(t + ) ≈ + ai,j f (tn + hcj , ξj ) = ξi ,



 y n hci y n h

 j=1
..
.







 ν−1
X
y (tn + hcν ) ≈ yn + h aν,j f (tn + hcj , ξj ) = ξν ,







 j=1
ν


 X
= + bj f (tn + hcj , ξj ) .




 y n+1 y n h
j=1

The parameters ai,j , bi , ci are dened in a tableau specic to each method


in the family. Usually, a tableau has the shape:

c1 a11 a12 ··· a1s


c2 a21 a22 ··· a2s
.. .. .. .. ..
. . . . .
cs as1 as2 ··· ass
b1 b2 ··· bs

Among this family, it is possible to distinguish dierent models: explicit,


semi-implicit, and implicit, depending on where the non-zero elements ai,j are
located in the tableau. Moreover, another important feature of this family is
that methods with various orders of convergence are known, and it is possible
to obtain embedded methods that control the computed error with only a little
extra eort compared to estimating the solution.
2.1. METHODS FOR SYSTEMS OF ODES 31

Example 2.4 (Explicit Embedded Runge-Kutta 2 ). Let's consider the method


with the following tableau:
0 0 0
1 1
2 2 0
1 0
0 1
This is known as an explicit method of order 2 called the Heun method, embed-
ded with another approximation also computed using a Runge-Kutta method
to estimate the error during the resolution and adapt the step size to match a
specied tolerance given as input.

Example 2.5 (Implicit Runge-Kutta Gauss-Legendre 3 ). A method of order 3


is dened by the following tableau:
√ √
3+ 3 3+ 3
6√ 6√ 0√
3− 3
6 − 33 3+ 3
6
1 1
2 2

This method is known as the Runge-Kutta Gauss-Legendre method, and it is


famous for being stable even on sti problems.

Example 2.6 (Embedded Runge Kutta Lobatto 3C and 3B ). These two methods
are dened respectively by the following tableaux:

1
0 6 − 13 1
6
1 1 5 1
2 6 12 − 12
1 2 1
1 6 3 6
1 2 1
6 3 6
− 12 2 − 12
and
1
0 6 − 16 0
1 1 1
2 6 3 0
1 5
1 6 6 0
1 2 1
6 3 6
− 21 2 − 12
These are known to be implicit embedded methods, both with an order of
convergence of 2. They are known for their stability and the ability to control
the computed error at each step.
Looking at the structure of the two tableaux, it is possible to notice an
important characteristic that makes the Runge-Kutta Lobatto 3B preferable:
its third column in the tableau is full of zeros. This is a remarkable property
because it makes the linear systems related to each step much easier to solve
without implying (at least in our case) a loss of stability. We will see this fact
in the results presented in Chapter 4, for example in Table 4.2 and Table 4.3.

Let's move on to solving PDE problems. Consider the boundary value prob-
lem, such as the Cauchy problem expressed by the general Feynman-Ka£ formula
(1.7), also reported here:

∂ 2 F (t, x)

 ∂F (t, x) ∂F (t, x) 1 2
+ µ(t, x) + σ (t, x) − rF (t, x) = 0
∂t ∂x 2 ∂x2 . (2.1)
F (T, x) = Φ(x)

32CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

There are at least two main ways to solve this numerically: using nite dier-
ences and using the nite element method (FEM). The rst method is simple
to describe in low dimensions but dicult to generalize to higher dimensions,
where FEM is often preferred.

2.2 Finite Dierences


The nite dierence method aims to solve PDEs by rst discretizing the spatial
variable x and then the time variable t. This approach reduces the problem to
a system of ODEs that can be solved using methods such as Euler, Backward-
Euler, Crank-Nicolson, Runge-Kutta, etc. To understand the main idea of the
nite dierence method, let's consider a simple problem: estimating the rst and
second derivatives of a function u(x) ∈ C 3 ([a, b]). Consider the discretization
given by xi = a + (i − 1)h for i = 1, . . . , m and h = (b − a)/(m − 1). The Taylor
series (in the Lagrange form) gives us:

h2 ′′ h3
u(xi+1 ) = u(xi ) + hu′ (xi ) + u (xi ) + u(3) (x̂i )
2 6
h2 ′′ h3
u(xi−1 ) = u(xi ) − hu′ (xi ) + u (xi ) − u(3) (x̃i )
2 6
from which

(1) u(xi+1 ) − u(xi−1 ) (1)


u′ (xi ) = ∆u(xi ) − τi = − τi
2h
where
(1)
τi = h2 (3)
6 u local error for some x̄i . We have thus
(x̄i ) is known as the
obtained the second-order centered nite dierence formula for the rst
derivative of u. Similarly, if we consider a function u(x) ∈ C 4 ([a, b]), we have:

h2 ′′ h3 h4
u(xi+1 ) = u(xi ) + hu′ (xi ) + u (xi ) + u(3) (xi ) + u(4) (x̂i )
2 6 24
h2 ′′ h3 h4
u(xi−1 ) = u(xi ) − hu′ (xi ) + u (xi ) − u(3) (xi ) + u(4) (x̃i )
2 6 24
from which

(2) u(xi+1 ) − 2u(xi ) + u(xi−1 ) (2)


u′′ (xi ) = ∆2 u(xi ) − τi = − τi
h2
h2 (4)
(2)
where τi 12 u= (x̄i ), and we have obtained the second-order centered nite
dierence formula for the second derivative of u.
Using similar techniques, it's possible to derive other nite dierences for
derivatives of any degree and for any order. Moreover, it's also possible to obtain
uncentered nite dierences (also known as forward and backward nite
dierences), which are useful for estimating the derivative at a boundary where
a derivative at xi is estimated using only points to the left or right of xi . An
example of an uncentered nite dierence is:

2u(xi ) − 5u(xi+1 ) + 4u(xi+2 ) − u(xi+3 )


u′′ (xi ) =
h2
which is the second-order backward nite dierence for a function u that is
suciently smooth.
2.2. FINITE DIFFERENCES 33

Observation 2.7. The smoothness of the function u is key for the convergence
order of every nite dierence. It's important to note that the order of conver-
gence of a nite dierence can be proved only if the function is smooth enough
to have a well-dened Taylor expansion.

Returning to the discretization of u′


on the interval [a, b], ignoring for the
moment the conditions at x1 and xm , we have the following system of equations:

u(x1 ) − u(x3 )

 ∆u2 =
2h







 .
..



u(xi−1 ) − u(xi+1 )

∆ui =

 2h
.




 ..


∆u = u(xm−2 ) − u(xm )



m
2h

which is a linear system. Considering u = (u1 , . . . , um )T and ∆u = (∆u1 , . . . , ∆um ),


we can write it as:
 
∗ ∗ ∗ ∗ ∗ ∗
−1 0 1 0 ... 0
 
0
1  −1 0 1 ... 0
∆u =  u.

 . .. .. .. ..
2h  .. . . . . 0
 
0 ... 0 −1 0 1
∗ ∗ ∗ ∗ ∗ ∗

We can repeat the procedure for the second-order nite dierence, obtaining:

 
∗ ∗ ∗ ∗ ∗ ∗
−1 2 −1 0 ... 0 
 
1 0 −1 2 −1 ... 0 
∆2 u = 2  .  u.
 
h  .. .. .. .. ..
 . . . . 0
0 ... 0 −1 2 −1
∗ ∗ ∗ ∗ ∗ ∗

Observation 2.8. These two matrices usually have some remarkable proper-
ties. They are almost always sparse, with non-zero elements on the diagonals,
and sometimes they are symmetric or skew-symmetric and diagonally dominant.

To ll the rst and last rows of these two matrices, we generally need to
consider the boundary conditions of our equation, especially since we may have
a PDE dened not only with initial/nal conditions but also on a specic domain
with xed values on the boundary. In our case, given by the Cauchy problem
2.1, we only have the nal condition F (T, x) = Φ(x) with F dened on the
whole real line. Therefore, we don't have any boundary conditions, and we
can simply ll the rst and last rows with some forward or backward nite
dierences, preserving the general order of convergence of the matrices (like
the example given earlier). We end up with two matrices A, B that we can
34CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

use to approximate the rst and second derivatives of a generic function with
second-order accuracy.
Now we are almost ready to discretize the Feynman-Ka£ formula with re-
spect to the spatial variable x, with x1 , . . . , x m on the interval [a, b]. We
only need to dene slightly dierent versions of the previous matrices since
µ and σ are both functions of (t, x). We will consider A′ , B ′ given by the
element-wise product between µ = (µ(t, x1 ), . . . , µ(t, xm )) and A, and between
σ 2 = (σ 2 (t, x1 ), . . . , σ 2 (t, xm )) and B :
A′ = [µ(t, xi )ai,j ]i,j , B ′ = [σ 2 (t, xi )bi,j ]i,j ,
Finally, we can discretize the spatial variable x using the vector F (t) = (F (t, x1 ), . . . , F (t, xm )),
obtaining:
∂F (t) 1
+ A′ F (t) + B ′ F (t) − rF (t) = 0
∂t 2
This is now a system of ODEs where the only remaining variable is t. Letting
Φ = (Φ(x1 ), . . . , Φ(xm )), we can rewrite it as:

 ∂F (t) 1
= (Ir − A′ − B ′ )F (t)
∂t 2
F (T ) = Φ

This is the classical form of a system of ODEs that can be solved using one of the
known methods (e.g., Euler method, θ-methods, or the Runge-Kutta family).

Observation 2.9. It's important to remember that using an explicit method


to solve the ODE may lead to some unstable behavior, which may require a very
small step size to achieve convergence to the solution. In this case, it may be
preferable to use implicit methods, which are usually A-stable or more stable
than their explicit counterparts, even if the computational eort for each step
will increase.

Observation 2.10. If we consider the Black-Scholes equation 1.5 (which is a


particular case of the Feynman-Ka£ formula) for a European Call with strike K
and maturity date T, we obtain:

 ∂F (t) 1
= (Ir − A′′ − B ′′ )F (t)
∂t 2
F (T ) = (K − si )+

where
A′′ = [rsi ai,j ]i,j , B ′′ = [s2i σ 2 (t, si )bi,j ]i,j
This technique, despite being simple to understand and implement in the 1-
dimensional case, is dicult to generalize to higher dimensions without breaking
some of the properties of the matrices (like those mentioned in Observation 2.8)
that can be exploited while solving the system of ODEs. Most importantly,
it nds its natural application when we are dealing with a smooth function F
(Observation 2.7).
This last condition is generally not satised by our function F at maturity
(consider, for example, the payo of a Call Option, which is not dierentiable
at K ). Therefore, in our implementation, we will not be interested in nite
dierences with high orders of convergence since their gain is lost due to the
irregularity of our solution. Instead, we will focus on computing the solution
with smaller steps to achieve a better approximation.
2.3. FINITE ELEMENTS METHOD (FEM) 35

2.3 Finite Elements Method (FEM)


Let's move on to a method that is easily generalizable to higher dimensions and
requires fewer hypotheses than the nite dierence method. Suppose, for exam-
ple, that we are trying to solve an ill-posed Cauchy problem where the solution
is given by a function f that has some discontinuities or is not dierentiable at
some points. In this case, we refer to f as a weak solution (in a variational
sense) rather than a strong solution. We will discuss the dierences between
these two concepts shortly.
Let's consider now the Black-Scholes equation 1.5 for a European Option
with a local volatility (i.e., σ is a function of (t, St )) and an interest rate de-
pending on t. For simplicity, we replace the variable t with the time to maturity
T − t, leading to a forward parabolic equation:

∂ 2 F (t, S)

 ∂F (t, S) ∂F (t, S) 1 2 2
− rS − S σ (t, S) + rF (t, S) = 0
∂t ∂S 2 ∂S 2 (2.2)
F (0, S) = Φ(S)

Before discussing the concept of a weak solution, we need to introduce some


function spaces.
Let L2 (R+ ) be the classical Hilbert space of square-integrable functions on
+
1
R endowed with the norm ||v||L2 (R+ ) = R+ v(x)2 dx 2 and the inner product
R

(v, w)L2 (R+ ) = R+ v(x)w(x) dx. It is a known result that the space D(R+ ) of
R
+ 2 +
smooth functions with compact support in R is dense in L (R ).
Let us introduce the space
 Z x 
2 +
W = w continuous on [0, +∞) : w(x) = ϕ(s) ds, with ϕ ∈ L (R )
0

which clearly consists of functions that vanish at x = 0. The space W , endowed


with the norm ||w||W = || dw || 2 +
dx L (R ) , is a Hilbert space that is topologically
2 +
isomorphic to L (R ). Thus, W is separable.
It is possible to prove that the space D(R ) is dense in W , and consequently,
+

Hardy's inequality holds.

Proposition 2.11 (Hardy's inequality). If w ∈ W, then


w
x ∈ L2 (R+ ) and

w
≤ 2||w||W (2.3)
x L2 (R+ )

Proof. Theoretically, it is sucient to recall that the space D(R+ ) is dense in


W to ensure (2.3). We can also prove this result straightforwardly:

2 Z x 2
1
Z
w ′
= w (s) ds dx
x L2 (R+ ) R+ x2 0
Z x 
2 ′
Z
= w (x) w′ (s) ds dx
+ x 0
ZR
2 ′
= w (x)w(x) dx
R+ x
w
≤2 ||w||W
x L2 (R+ )
36CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

where we integrated by parts and used the Cauchy-Schwarz inequality to con-


clude.

With Hardy's inequality, we can dene the space V:


nw o n w o
V = :w∈W = v ∈ L2 (R+ ) : v = with w ∈ W
x x

where the function v ∈ V is clearly continuous on R+ if vx is continuous on


[0, +∞]. Thus, V can be rewritten as

 
dv
V = v ∈ L2 (R+ ) : x ∈ L2 (R+ )
dx

R+ .
where the derivative must be understood in the sense of the distribution on
dv dw
We can now endow V with the inner product (v, w)V = (v, w) + (x
p dx , x dx )
and with the Euclidean norm ||v||V = (v, v)V to complete V and obtain a
Hilbert space. Moreover, with these choices, we have that the space D(R ) is
+

dense in V.

Proposition 2.12 (Poincaré's inequality). If v ∈V, then

dv
||v||L2 (R+ ) ≤ 2 x
dx L2 (R+ )

Proof. Since D(R+ ) is dense in V, it is sucient to prove the inequality for


v ∈ D(R ). +
We have

Z Z
dv
2 xv(x) (x) dx = − v 2 (x) dx
R+ dx R+

using integration by parts. Now, applying the Cauchy-Schwarz inequality to the


left-hand side, we can conclude that:

dv
||v||2L2 (R+ ) ≤ 2||v||L2 (R+ ) x
dx L2 (R+ )

which yields the desired estimate.

With Poincaré's inequality, we can prove that the seminorm |v|V = ||x xv ||L2 (R+ )
is indeed a norm on V and that it is equivalent to || · ||V . Similarly, using the
density of D(R+ ) in L2 (R+ ), one can prove the following result:

Proposition 2.13. 2 +
If w ∈ L (R ), then the function v , dened as v(x) =
1 x
R
x 0 w(s) ds, belongs to V , and there exists a positive constant C independent
of w such that ||v||V ≤ ||w||L2 (R+ ) .

We denote by V′ the topological dual space of V . We also denote by (·, ·)


the duality pairing between V and V′ and dene || · ||V ′ by:

(w, v)
||w||V ′ = sup .
v∈V \{0} |v|V
2.3. FINITE ELEMENTS METHOD (FEM) 37

Now that we have introduced some function spaces useful for this discussion,
we can return to the Black-Scholes equation (2.2) and introduce what the weak
formulation of this problem means.
Let us multiply the PDE by a smooth real-valued function ξ(S) on R+ and
+
integrate in S on R . Assuming that integration by parts is permitted, we
obtain:
Z
d
0= F (t, S)ξ(S) dS
dt R+
S 2 σ 2 (t, S) ∂F
Z
∂ξ
+ (t, S) (S) dS
+ 2 ∂S ∂S
ZR  
∂σ ∂F
+ −r(t) + σ 2 (t, S) + Sσ(t, S) (t, S) S (t, S)ξ(S) dS
R+ ∂S ∂S
Z
+ r(t) F (t, S)ξ(S) dS.
R+

This leads us to introduce the bilinear form at :

S 2 σ 2 (t, S) ∂v ∂w
Z
0=+ dS
+ 2 ∂S ∂S
ZR  
∂σ ∂v
+ −r(t) + σ 2 (t, S) + Sσ(t, S) (t, S) S w dS (2.4)
R + ∂S ∂S
Z
+ r(t) vw dS.
R+

To proceed with the discussion, we need some assumptions:

Hypothesis 2.14. We make some assumptions on σ and r: we assume that


the coecients σ and r are non-negative, continuous (this is only for simplicity),
and that σ is suciently regular so that the following conditions make sense:

ˆ There exist two positive constants, σ1 and σ2 , such that for all t ∈ [0, T ]
and all S ∈ R+ ,
0 < σ1 ≤ σ(t, S) ≤ σ2 .

ˆ There exists a positive constant Cσ such that for all t ∈ [0, T ] and all
S ∈ R+ ,
∂σ
S (t, S) ≤ Cσ .
∂S

Under these assumptions, we nd that the bilinear form at is continuous on


V, i.e., there exists a positive constant µ such that for all v, w ∈ V :

|at (v, w)| ≤ µ|v|V |w|V .

The proof of this result is quite tedious and involves controlling each integral
with an estimate.
We recall the standard notationC 0 ([0, T ]; L2 (R+ )) as the space of continuous
2 + 2
functions on [0, T ] with values in L (R ), and L ((0, T ); V ) as the space of
square-integrable functions on (0, T ) with values in V . Assuming that Φ ∈
L2 (R+ ), we can prove the weak formulation for the Black-Scholes PDE [24].
38CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

Theorem 2.15 (Weak Formulation of (2.2)). Solving the Black-Scholes


PDE (2.2) is equivalent (in the weak sense) to nding a function F ∈ C 0 ([0, T ]; L2 (R+ ))∩
2 ∂F 2 ′
L ((0, T ); V ) such that
t ∈ L ((0, T ); V ) satisfying:
 
∂F
∀v ∈ V, (t), v + at (F (t), v) = 0, (2.5)
t

F (0) = Φ in R+ and for a.e. t ∈ (0, T ). (2.6)

For the next discussion, we need the following estimate:

Proposition 2.16 (Gårding's inequality). Under the assumptions 2.14, there


exists a non-negative constant λ such that for all v ∈V:

σ2 2
at (v, v) ≥ |v| − λ||v||2L2 (R+ )
4 V
Theorem 2.17 (Existence of a Solution for the Weak Formulation).
If Φ ∈ L2 (R+ ) and under Hypothesis (2.14), the weak formulation (2.5) has a
unique solution.

The proof of this existence is given in [24]. Note that this result applies to
any European Option with a payo function in L2 (R+ ), particularly to vanilla
Puts. It does not apply to vanilla Calls, and we will revisit this later.
If the interest rate, the volatility, and the payo are smooth enough, then it is
possible to prove additional regularity for the solution of the Weak Formulation
(2.5) by calling At the unbounded operator in L2 (R+ ):

σ 2 (t, S)S 2 ∂ 2 v ∂v
At v = − 2
− r(t)S + r(t)v,
2 S S
it can be checked that for all t ∈ [0, T ] and for λ given by Gårding's inequality
2.16, the domain of At + λ is:

∂2v
 
+
D= v ∈ V : S2 ∈ L 2
(R ) .
S2

Hypothesis 2.18. There exist a positive constant C and 0<α<1 such that
for all t1 , t2 ∈ [0, T ] and S ∈ R+ :

∂σ ∂σ
|r(t1 ) − r(t2 )| + |σ(t1 , S) − σ(t2 , S)| + (t1 , S) − (t2 , S) ≤ C|t1 − t2 |α .
∂S ∂S

With the assumptions 2.14 and 2.18, it is possible to prove the so-called
smoothing eect: the solution of the weak formulation 2.5 belongs to D at any
time t > 0, for any Cauchy data Φ ∈ L2 (R+ ). More precisely, we have that:

ˆ The domain of At is D, which is dense in L2 (R+ ) and independent of t;

ˆ Gårding's inequality holds;

ˆ If Ãt = At + λI , there exists a constant L such that:

||(Ãt − Ãs )Ã−1


τ ||L(L2 (R+ )) ≤ L|t − s|
α
2.3. FINITE ELEMENTS METHOD (FEM) 39

With these three facts, we can apply the general results of Kato on parabolic
evolution equations [26], [10] and obtain the following results:

Theorem 2.19. S ∈ R+ , t ∈ [0, T ],


Under Assumptions 2.14 and 2.18, for all
0
the solution F of the Weak Formulation 2.5 satises F ∈ C ([t, T ]; D) and
∂F 0 2 +
t ∈ C ([t, T ]; L (R )), and there exists a constant C such that for all t ∈ [0, T ]:

C
||At F (t)||L2 (R+ ) ≤ .
t
On the other hand, if Φ ∈ D, then the solution F of 2.5 belongs to C 0 ([t, T ]; D)
and
∂F
t ∈ C ([t, T ]; L (R+ )).
0 2

This gives us the regularity result for Φ∈V.


Proposition 2.20. If Assumption 2.14 is satised and Φ ∈ V , then the solution
+
of 2.5 belongs to C 0 ([0, T ]; V ) ∩ L2 (0, T ; D), ∂F 2 2
t ∈ L (0, T ; L (R )), and there
exists a non-negative constant λ̃ such that the estimate:

σ 2 t −2λ̃τ ∂F
Z
∂F ∂Φ 2
e−2λ̃t ∥S (t)∥2L2 (R+ ) + e |S (τ )|2V dτ ≤ ∥S ∥ 2 +
S 2 0 S S L (R )
Observation 2.21. As a consequence of this last proposition, the solution to
the weak formulation is continuous if Assumption 2.14 is satised and Φ∈V.
It is easy to notice that these results apply to a European vanilla Put because
Φ = (K − S)+ ∈ V but they don't apply to a European vanilla Call.
Now that we have some results that ensure the regularity of the solution given
certain assumptions, we want to study other properties of the solution given by
the weak formulation. In particular, we want to prove that some results already
known in nance are ensured by this formulation. For example, we will see that
the positivity of the pricing function is guaranteed, that the Put-Call Parity is
ensured, and that every pricing function is controlled by other pricing functions
if its payo is controlled by their payos.
To achieve these results, we have to state the Maximum Principle for a class
of functions much larger than V and understand its consequences. For a deep
dive into the maximum principle, the reader can refer to Protter, Murray, and
Weinberger [27]. We dene the function space:

n 2
o
V = v : ∀ ε > 0, v(S)e−ε log (S+2) ∈ V

which also contains polynomial functions. Using Stampacchia's truncation method,


we have the Weak Maximum Principle:

Theorem 2.22 (Weak Maximum Principle). Let u(t, S) be such that for
all positive numbers ε:
2
1. ue−ϵ log (S+2)
∈ C 0 ([0, T ]; L2 (R+ )) ∩ L2 (0, T ; V ),
∂u −ϵ log2 (S+2)
2.
t e ∈ L2 (R+ ×(0, T )),
3. u|t=0 ≥ 0 a.e.,

∂u
4.
t + At u ≥ 0 (in the sense of distributions);
40CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

then u≥0 a.e.

This theorem may be generalized using the previous assumptions and using a
function that satises the weak formulation 2.5, but for our purposes, this result
is sucient for deriving the consequences we are looking for. That's because
the maximum principle is an extremely powerful tool for proving estimates on
the solution of elliptic and parabolic PDEs.

Proposition 2.23. Under Assumption 2.14, let F be the weak solution to 2.5,
with Φ ∈ L2 (R+ ) a bounded function, i.e., 0 ≤ Φ ≤ Φ(S) ≤ Φ. Then, a.e.:
Rt Rt
Φe− 0
r(τ )dτ
≤ F (t, S) ≤ Φe− 0
r(τ )dτ

An example of the application of this proposition for a vanilla Put Option


Φ(S)R= (K − S)+ gives the (not surprising but comforting) result 0 ≤ F (t, S) ≤
t
Ke− 0 r(τ )dτ .
For vanilla Puts, we also have other results, such as the following:

Proposition 2.24. Under Assumption 2.14, let F be the weak solution to 2.5,
with Φ(S) = (K − S)+ , then we have that:

Rt Rt
(Ke− 0
r(τ )dτ
− S)+ ≤ F (t, S) ≤ Ke− 0
r(τ )dτ
(2.7)

and: Rt
P (t, 0) = Ke− 0
r(τ )dτ
.
This last result is important because we didn't impose the boundary condi-
tion 2.7 a priori. Indeed, it arises naturally both in nite dierences and nite
elements.

Lemma 2.25 (The Super-Replication Principle). Take two European Put


Options with the same maturity and two dierent payo functions Φ1 and Φ2 .
Call F1 (t, S) and F2 (t, S) their respective prices, which both satisfy 2.2. One
easy consequence of the maximum principle is that if for all S , Φ1 (S) ≤ Φ2 (S),
then for all t and S , F1 (t, S) ≤ F2 (t, S). This is called the super-replication
principle in the nance community.
Lemma 2.26 (The Put-Call Parity). Take a vanilla Put Option and consider
the function C(t, S) given by:

Rt
C(t, S) = S − Ke− 0
r(τ )dτ
+ P (t, S).
Rt
From the fact that P and S − Ke− 0
r(τ )dτ
satisfy 2.2, it is clear that C is a
solution of the same PDE 2.2 with the Cauchy condition C(0, S) = (S − K)+ .
This is precisely the boundary value problem for the European vanilla Call
Option. On the other hand, from the Maximum Principle, we know that a well-
behaved solution (in the sense of the weak maximum principle hypothesis 2.22)
to this boundary value problem is unique. Therefore, we can deduce the price
of the Call Option from that of the Put Option: we recover the Put-Call parity
seen in Chapter 1 and well known to nancial players.

If we now consider some results regarding the desired convexity of the pricing
function F in the variable S, we need a new assumption.
2.3. FINITE ELEMENTS METHOD (FEM) 41

Hypothesis 2.27. There exists a positive constant C such that:

∂2σ
|S 2 (t, S)| ≤ C a.e.
S2
Proposition 2.28. F be the weak so-
Under Assumptions 2.14 and 2.27, let
∂2Φ
lution to 2.5, where Φ ∈ V is a convex function such that
S 2 has a compact
support. Then, for all t > 0, F (t, S) is a convex function of S .

As a consequence of this result, we see that under these assumptions, the


price of a vanilla European Put Option is convex with respect to S, and thanks
to the Call-Put parity, this is also true for the vanilla European Call.
For vanilla European Puts, we also have that the solution of a weak formula-
tion with local volatility can be controlled by the price of two vanilla Puts with
constant volatilities.

Proposition 2.29. Under Assumption 2.14, we have, for all t ∈ [0, T ] and for
all S > 0:
F (t, S) ≤ F (t, S) ≤ F̄ (t, S)
where F (resp., F̄ ) is the solution to 2.5 with σ=σ (resp., σ̄).

Returning to the numerical computation of the price function F for a vanilla


Put, we see that S is dened on the entire half-line (0, +∞), so we will be
forced to restrict the domain to S ∈ (0, S̄) for S̄ large enough and impose some
boundary condition at S = S̄ . If we assume that the function vanishes on the
articial boundary, we obtain the new BVP:

σ 2 S 2 ∂ 2 F̃

 ∂ F̃ ∂ F̃
− − rS + rF̃ = 0, t ∈ (0, T ], S ∈ (0, S̄)
t 2 S2 S
F̃ (S̄, t) = 0, t ∈ (0, T ]

with the Cauchy data F̃ (S, 0) = (K −S)+ in (0, S̄). The theory of weak solutions
applies to this new boundary value problem, but one has to work in the new
Sobolev space:
∂v
Ṽ = {v, S ∈ L2 ((0, S̄)), v(S̄) = 0}.
S
The results of previous theorems can be transferred to this new BVP. The
question is how to estimate the error between F and F̃ . For that, we use a
version of the maximum principle adapted to 2.3, the proof of which is omitted
for brevity. We ultimately obtain the following result:

Proposition 2.30. Under Assumption 2.14, the error maxt∈[0,T ],S∈[0,S̄] |F (t, S)−
F̃ (t, S)| decays faster than any exponential exp(−η S̄)(η > 0) as S̄ → ∞.

2.3.1 Variational Formulation: The Galerkin Method

In the previous sections, we introduced the weak formulation of the Black-


Scholes equation, which is dened on an innite-dimensional function space V.
To solve it using the Finite Element Method (FEM), we need to approximate
the problem by projecting it onto a nite-dimensional subspace Vh of V using
the Galerkin method.
42CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

The Galerkin method is widely applicable, regardless of the dimensional


space. When posed in an innite-dimensional space V (e.g., V = H 1 (Ω), which
is the space of functions with square-integrable derivatives), the method involves
selecting a nite-dimensional subspace Vh of V. This subspace might consist,
for instance, of continuous piecewise linear functions over a triangulation of the
domain Ω.

Construction of the Finite-Dimensional Subspace Vh


ˆ Domain Discretization: The domain Ω is partitioned into non-overlapping
cells (elements), such as intervals in one dimension, triangles or quadri-
laterals in two dimensions, and tetrahedra or hexahedra in three dimen-
sions. This set of elements forms a mesh, which can be structured or
unstructured. In practice, this discretization might lead to a computa-
tional domain Ω̄ that is an approximation of the real domain Ω (Figure
2.1).

ˆ Basis Function Construction: The degree k of the polynomial approx-


imation within each element is chosen. For simplicity, degree k = 1 is
often used, leading to piecewise linear basis functions. The basis func-
tions (ϕj )hj=1 are constructed such that each basis function ϕj is 1 at node
j and 0 at all other nodes, with linear interpolation between nodes (see
Figures 2.2 and 2.3).

ˆ Function Approximation: A function v ∈ V can then be approximated


by its projection v̂ onto Vh as

h
X
v̂ = v̂j ϕj (x).
j=1

Observation 2.31. The mesh does not need to be regular. In fact, it is gen-
erally advantageous to use an adaptive mesh to focus computational eort on
regions where the solution is less regular.

It is possible to distinguish a priori and a posteriori error estimates for the


computed solution: in a priori estimates, the error is bounded by some quantity
depending on the solution of the continuous problem (which is unknown, but
for which estimates are available), whereas, in a posteriori estimates, the error
is bounded by some quantity depending on the solution of the discrete problem
which is available. For a priori error estimates, one can see the books of Strang
and Fix [8], Brenner and Scott [8] on parabolic problems. For a posteriori
estimate, one can look at Chapter 5 of the book by Achdou & Pironneau [2] for
posteriori estimates on the Black-Scholes equation.

Variational Framework
Let us dene the framework for the FEM approach:

ˆ Let Ω be a polygonal domain in R2 (i.e., Ω is open and bounded);

ˆ Let Γ be the boundary of Ω;


2.3. FINITE ELEMENTS METHOD (FEM) 43

Figure 2.1: Mismatch between the real domain Ω and the computational domain
Ω̄.

(a) Mesh for Put Option on the (b) Mesh for Put Option on the
max of two stocks min of two stocks
44CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

ˆ We assume that Γ = Γd ∪Γn , where the one-dimensional measure of Γd ∩Γn


is 0; for x ∈ Γ, Γd and Γn dene a partition of Γ except for a null set;
ˆ Denote by n the unit normal vector to Γ at x, pointing outward;

ˆ Consider smooth enough functions:

κ : Ω 7→ R2×2 , α : Ω 7→ R2 , β : Ω 7→ R, b : Γn 7→ R.

For suitable functions u0 : Ω 7→ R, ϕ : Ω × (0, T ) 7→ R, g : Γd × (0, T ] 7→ R,


f : Γn × (0, T ] 7→ R, we seek u(x, t) solving the parabolic boundary value
problem:


 ∂u − ∇ · (κ∇u) − ∇ · (αu) + βu = ψ
 in Ω × (0, T ),
 ∂t



u|t=0 = u0 (x) in Ω, (2.8)
u=g on Γd × (0, T ),





−bu − (κ∇u) · n = f on Γn × (0, T ).

Multiplying both sides by a smooth function w∈W and assuming integra-


tion by parts is allowed, we introduce the bilinear form on W:
Z Z
a(w, v) = ((κ∇w) · ∇v − ∇ · (αw)v + βwv) + bwv.
Ω Γn

Assuming that:

ˆ For almost every x ∈ Ω, κ(x) is a symmetric tensor and there exist two
positive constants 0 < κ ≤ κ̄ such that, for all ξ ∈ R2 ,

κ|ξ|2 ≤ κ(x)ξ · ξ ≤ κ̄|ξ|2 for almost every x ∈ Ω;

ˆ α ∈ (L∞ (Ω))2 , β ∈ L∞ (Ω), b ∈ L∞ (Γn );


it can be shown that there exist two positive constants c ≤ c̄ and a non-
negative constant λ such that for all v, w ∈ W , we obtain the upper and lower
bounds:

a(v, w) ≤ c̄|v|W |w|W


and (the Gårding's inequality):

a(v, v) ≥ c|v|2W − λ∥v∥2L2 (Ω) .


The variational formulation of 2.8 can be rephrased as:
Find u : u−ug ∈ L2 ((0, T ); V ), u ∈ C 0 ([0, T ]; L2 (Ω)), and ∂u
∂t ∈ L2 ((0, T ); V ′ ),
with u|t=0 = u0 , and, for almost every t ∈ (0, T ):
  Z Z
∂u
∀v ∈ V, (t), v + a(u(t), v) = ψ(t)v + f (t)v. (2.9)
∂t V Ω Γn

Thanks to the bounds on a(v, w), it can be shown that if ug satisfying the
above condition exists, then the variational formulation has a unique solution,
which satises the rst line of 2.8 in the sense of distributions.
2.3. FINITE ELEMENTS METHOD (FEM) 45

Figure 2.2: Hat function.

Figure 2.3: Basis function ϕi .

Figure 2.4: Representation of two basis functions ϕi and ϕk where nodes Ni


and Nk are not adjacent. The red and blue areas show where the functions are
non-zero.
46CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

Computation of the Finite Element Solution


Suppose now that we have the triangulation of our computational domain Ω̄
with n triangles and h nodes. Suppose also that we chose k = 1, meaning
that the functions used to approximate V have a maximum degree of 1. The
simplest basis functions of the space Vh are the set of functions (ϕj )hj=1 , where
each ϕj is equal to 1 at node j and zero at all the remaining nodes, with linear
interpolation between nodes. Figures 2.2 and 2.3 show representations of these
functions in 1D and 2D cases, respectively.
In this space Vh , the orthogonal decomposition v̂ of v is:

h
X
v̂ = v̂j ϕj (x).
j=1

This decomposition allows us to easily obtain the value of v at node j as v̂j and
simplies our calculations by recognizing that the basis functions are non-zero
only in a limited number of elements. Indeed, when we consider the variational
formulation 2.9 on the function û ∈ Vh , it suces to verify the equation for the
basis functions, i.e.:

  Z Z
∂ û
∀ϕi ∈ (ϕi )i , (t), ϕi + a(û(t), ϕi ) = ψ(t)ϕi + f (t)ϕi . (2.10)
∂t V Ω Γn
P
Taking the orthogonal decomposition û = i ûi ϕi and recalling the linearity
of the bilinear form a and the linearity of the integral operator (·, ·)V , we get:

h   h Z Z
X ∂ϕj X
ûj , ϕi + ûj a(ϕj (t), ϕi ) = ψ(t)ϕi + f (t)ϕi .
j=1
∂t V j=1 Ω Γn

This set of equations can be manipulated to recognize it as the linear system


Aû = b, where:

  Z Z
∂ϕj
Ai,j = , ϕi + a(ϕj (t), ϕi ) and bi = ψ(t)ϕi + f (t)ϕi .
∂t V Ω Γn

Thanks to the basis functions used, most of the products between two basis
functions are zero. Indeed, this product is non-zero only if the nodes i and j of
ϕi and ϕj are adjacent (Figure 2.4). Therefore, the matrix A is sparse and can
be computed using a local approach: building the matrix A element by element
is simpler than doing it node by node. For example, if we have an element e
with vertices N1 , N10 , N23 , we obtain:

(e) (e) (e)


 
a1,1 a1,10 a1,23
A(e) = a(e) (e)
a10,10
(e) 
a10,23 

10,1
(e) (e) (e)
a23,1 a23,10 a23,23
which we sum to the related entries of A:
2.3. FINITE ELEMENTS METHOD (FEM) 47

 
a1,1 ... a1,10 ... a1,23 ...
 .. .. .. .. .. 
 .
 . . . . . . .

a10,1 ... a10,10 ... a10,23 . . .
A= . .
 
.. .. .. ..
 .. . . . . . . .
 
a23,1 ... a23,10 ... a23,23 . . .
 
.. .. .. .. .. ..
. . . . . .
(Of course, we can sum above the main diagonal and use the symmetry of A to
ll in the values below.)
We are now interested in computing the local products for the local matrix,
which depends on the specic problem being solved.
If we focus on the classical Black-Scholes equation, using the bilinear form
dened in 2.4, we can easily compute the matrix A and have everything needed
to solve our problem numerically.

2.3.2 Barrier Option

Let's consider the case of a knockout boundary option on a single asset, where
the boundary does not depend on time. In this scenario, the option becomes
worthless if the price of the underlying asset exits the interval [b, B]. Conse-
quently, the price of the option satises the usual Black-Scholes equation with
a new boundary condition on the barriers:

F (t, b) = F (t, B) = 0.

The domain Ω is then restricted to the interval [b, B], and the previous
arguments still apply by using the space:
 
2 ∂v 2
V = v ∈ L (Ω) : ∈ L (Ω); v (b) = v (B) = 0
∂S
when there is a lower constraint, and:
 
2 ∂v 2
V = v ∈ L (Ω); S ∈ L (Ω); v (B) = 0
∂S
when there isn't a lower constraint.
The same argument holds true when we consider basket options. For exam-
ple, if we have two assets S1 and S2 with barriers b1 , B1 and b2 , B2 , respectively,
the new domain becomes Ω = [b1 , B1 ] × [b2 , B2 ] with the boundary condition:

F (t, s1 , s2 ) = 0 on ∂Ω.

2.3.3 Basket Option

Let's consider, for simplicity, the case of an option on two assets. We assume,
as before, that these assets follow the dynamics described in equation 1.10. In
this case, we dene the function space as:
 
∂v ∂v
V = v : v, S1 , S2 ∈ L2 (R2+ ) .
∂S1 ∂S2
48CHAPTER 2. NUMERICAL METHODS: FINITE DIFFERENCES AND FEM

Among the payos mentioned in Section 1.2, we observe that the payos given
by 1.12 and 1.13 belong to L2 (R2+ ), while the payo given by 1.14 does not. For
2 2
the following discussion, we assume that the payo belongs to L (R+ ).
We introduce the bilinear form:

2
1 X
Z
∂v ∂w
a(v, w) = Mk,l Sk Sl dS
2
R+ 2 ∂S k ∂Sl
k,l=1
2 2
!
1
Z X X ∂v
+ −r + Mk,l Sk w dS
2
R+ k=1 2 ∂Sk
l=1
Z
+r vw dS.
R2+

Then, the weak formulation of equation 1.11 consists of nding a function


F such that:

F ∈ C 0 [0, T ]; L2 (R2+ ) ∩ L2 (0, T ; V ),



such that

∂F
∈ L2 (0, T ; V ′ ), and (2.11)
∂t
F |t=0 = Φ in R2+ ,

and for almost every t ∈ (0, T ):


 
∂F
∀v ∈ V, (t), v + a(F (t), v) = 0. (2.12)
∂t

Similarly to the previous cases, it is possible to prove that if Φ ∈ L2 (R2+ ),


then the problem dened by equations 2.11 and 2.12 has a unique solution F .
Moreover, we have the following estimate, for all t ∈ (0, T ):
Z t
e−2λt ∥F (t)∥2L2 (R2 ) + 2σ 2 e−2λτ |F (τ )|2V dτ ≤ ∥Φ∥2L2 (R2 ) .
+ +
0

Additionally, it is possible to prove a maximum principle analogous to The-


orem 2.22. This is the main tool for establishing that if Φ is given by 1.12 or
+ +
1.13, then F (t, S1 , 0) = (Ke−rt − S1 ) and F (t, 0, S2 ) = (Ke−rt − S2 ) .
Naturally, there may be barrier options on baskets of several assets. For two
assets and a barrier independent of time, pricing the option then amounts to
solving the boundary value problem:

2 2

 ∂F 1 X ∂2F X ∂F

 − M S S
k,l k l − rSk + rF = 0, t ∈ (0, T ],
 ∂t 2 ∂Sk ∂Sl ∂Sk

k,l=1 k=1


 F (0, S1 , S2 ) = Φ(S1 , S2 ), (S1 , S2 ) ∈ Ω,

F (t, S1 , S2 ) = 0

on ∂Ω,

for a domain Ω ⊂ R2+ .


Chapter 3

Program implementation
We decided to develop our OOP (Object-Oriented Programming) implemen-
tation using the Python language and the famous NumPy library [18], which
is well-known for numerical computation in Python. Python natively lacks a
built-in array and matrix data structure (it uses lists by default). However, since
2005, NumPy has provided multidimensional array objects implemented in the
C programming language. With this tool, we can perform faster numerical com-
putations and have array objects with their expected behavior. Furthermore,
we can use sparse matrices and sparse arrays via the Scipy library [30], which
uses NumPy to interface with C.
Another important library we will use later is PyFreeFem [19], an API that
allows us to run code written in the FreeFem language from within our Python
program.
The basic structure of the project is shown in Figure 3.1. Before discussing
each object in detail, it's important to provide an overview to understand the
relationships between the main classes. Using a top-down approach, the rst
class to discuss is the Discretizer. This class is dened by several components:

ˆ DiscretizerType: An Enum value that denes the type of discretizer,


changing the behavior of the discretizer itself and its associated wrappers.

ˆ TimeMethod: Represents the method used to solve the ODE linear system.

ˆ Dynamics: Denes the model used to simulate the stock's random walk.

ˆ Option: Represents the option for which we want to compute the fair
value.

To complete the Discretizer class, it's important to dene a domain in


both the time and space variables where we will compute the solution, the
discretization parameters for that domain, and any tolerances needed by the
chosen method (e.g., the tolerances for embedded methods).
Dynamics object, we have dened three distinct objects to model the
For the
DividendRate, Volatility, and
various market conditions that aect pricing:
InterestRate. These objects implement the respective interfaces for dividend
rate, volatility, and interest rate modeling. A constant (oat) parameter is also
used to dene the correlation between two stocks when dealing with higher-
dimensional problems.

49
50 CHAPTER 3. PROGRAM IMPLEMENTATION

Figure 3.1: General overview of the OOP project. Some details are omitted for
clarity.

Another key part of the implementation is the OptionType class, which maps
all the options discussed in previous chapters. We achieved this by combining
three dening aspects for each option using the Enum classes DimensionType,
ExerciseType, and PayoffType, which we will discuss in detail later. To con-
struct an option, it's mandatory to pass in all relevant market parameters, such
as strike price, time to maturity, and the values of any lower or upper barriers.
Given the complexity of all these classes required to compute the fair price
of an option, we also implemented a Builder class. This class ensures the
correct construction of all objects, given an intuitive set of parameters dened
by the user based on the current market conditions. The Builder also helps
manage dependencies between objects, allowing the user to interact with just a
few high-level classes while the program handles the rest.
Now that we have provided this preliminary overview, we can start analyzing
each class in detail, using a bottom-up approach. This means starting with
simpler classes and progressively moving towards the more complex ones, which
combine multiple objects.

3.1 Enum Classes


The rst classes we analyze are the Enum classes. We remind you that an
Enum class is useful for dening a set of named values that represent a nite
set of possible states or options. This ensures that the class is strongly typed,
preventing accidental misuse of enumerator values across dierent Enums in
3.1. ENUM CLASSES 51

classes that utilize it. Additionally, another advantage of using these classes is
the "type safety" guaranteed by the fact that numerical enumerators or strings
are not used in the code to propagate information. This minimizes the risk of
errors due to typos, which could potentially lead to issues with code stability.
Generally speaking, the use of an Enum class is always recommended when there
is a need for clearly dened, limited sets of options.
The Enum classes that we dened are:

ˆ DiscretizerType: Denes the discretizer type with respect to the space


variable. It can assume one of two values: Finite Dierences or Finite
Elements. If the chosen Enum is Finite Dierences, it can be further
specied through a sub-Enum class that allows the distinction between
Second Order and Fourth Order nite dierence discretization.

ˆ FiniteDifferencesType: Denes the order of convergence to use when


generating the matrices for the nite dierences method. This class in-
cludes the method:

 get_macro_discretizer_type: Returns a FiniteDifferences (or


a DiscretizerType since it inherit from this class).

ˆ DynamicsType: Denes the model used to simulate the evolution of stock


prices over time. Currently, it can only assume the value Black-Scholes
Dynamics. However, in a possible future development of the solver, it
might also support values like Variance Gamma Lévy Dynamics or Gaus-
sian Jump Lévy Dynamics, allowing the solution of PDEs for these jump
dynamics. Although this feature wasn't the target of our discussion, we
developed the code in such a way that it will be possible to add this new
feature in the future with relatively little eort.

ˆ TimeMethodType: Denes the method to be used for solving the system of


Forward
ODEs after space discretization. It can take the following values:
Euler, Backward Euler, Crank-Nicolson, Explicit Embedded Runge-Kutta
2, Diagonally Implicit Runge-Kutta 3, Embedded Runge-Kutta Lobatto 3C,
and Embedded Runge-Kutta Lobatto 3B. As the reader can observe, all
these methods are implicit, and some are also embedded. In a real-world
scenario, the user would be interested in computing a solution with a given
tolerance in the shortest possible time. It is important to remember that
nancial instruments are quoted in ticks, which are never smaller than
1 × 10−3 . Therefore, it is unnecessary to compute an overly precise price
for an instrument like an option. On the other hand, it is essential to be
as fast as possible to react to changing market conditions within a short
interval, allowing us to prot from trades with slower market participants.

ˆ DimensionType: Denes the number of underlying stocks on which the


payo of an option depends, thus dening the space dimension of the
problem we need to solve when computing the fair price of the option.

ˆ ExerciseType: Denes the type of exercise allowed for the option. Cur-
rently, the only possible value is European, but other values like American
or Bermuda could be introduced in future development.
52 CHAPTER 3. PROGRAM IMPLEMENTATION

ˆ PayoffType: Denes the type of payo that will be paid at maturity by


the option. It can assume several values, some of which are compatible
only with certain other conguration values. For example, the values Call,
Put, Asian Call, Asian Put, Digital Call, and Digital Put are well-dened
only for 1-dimensional options. For higher dimensions, the values Put Min,
Put Max, Put Average, Call Min, Call Max, and Call Average should be
used to correctly dene the interaction between the dierent stocks to
compute the nal payo. The reader can nd an explanation for these in
formulas 1.14, 1.13, 1.12.

3.2 Option Class


Moving on to the rst class with a non-trivial implementation, let's discuss
the Option class. Figure 3.2 presents a detailed UML diagram of the class,
including all methods and object elds. To maintain a consistent code structure,
we decided to unify options with and without barriers within the same class.
This decision stems from the observation that an option without barriers can
be considered as an option with barriers set at 0 or +∞, respectively.

We also considered implementing barrier options as a wrapper around the


basic option instrument, but we ultimately discarded this idea. The primary
reason for this was the potential complications during the construction of the dis-
cretizer matrix (handled in the Discretizer class). Specically, barrier options
require a null Dirichlet boundary condition, which would have been challenging
to impose elegantly using a wrapper approach. Therefore, we decided to dele-
gate to the Builder the role of controlling the correct denition of the barriers,
resulting in simpler code within the discretizer that is easier to understand and
debug.

The Option class has several methods, most of which are getters for the inner
OptionType class, and we will not discuss them in detail here. Instead, we will
focus on the two methods compute_payoff and convert_to_fair_price:

ˆ compute_payoff: Given a discretized domain (a NumPy array), this


method computes the payo for each point of the meshgrid. This pay-
o will be used as the initial condition in the resolution of the system of
ODEs.

ˆ convert_to_fair_price: Given a fair price (a NumPy array) computed


by the discretizer and a discretized domain (also a NumPy array), this
method returns the nal, correct fair price estimate. This method is de-
signed to convert the solution of the PDE problem into the corresponding
real fair price of the option. This step is necessary whenever a change
of variables is performed between the initial Black-Scholes PDE and the
one actually used to compute the solution. For example, this occurs with
Asian options in the 1-dimensional case when transitioning between the
formulation in Equation 1.28 and Equation 1.29, which is easier to solve.
In all other cases, this method simply returns the fair price without any
transformation.
3.2. OPTION CLASS 53

Figure 3.2: Structure of the Option class.


54 CHAPTER 3. PROGRAM IMPLEMENTATION

3.3 Dynamics Class


The Dynamics class is responsible for modeling the evolution of stock prices
over time and has the structure shown in Figure 3.3. The main component for
implementing this part of the code is the interface class Dynamics, which denes
all the methods that every concrete class must implement to properly interact
with the remaining classes of the code.

Figure 3.3: Structure of the Dynamics class.

Among the methods belonging to the Dynamics class, we want to focus our
attention on the following:

ˆ null_dividend_rate: This method is a getter to check if there is a


null dividend rate in the dynamics conguration. This information al-
lows the simplication of the discretization implementation within the
Discretizer class.

ˆ will_parameters_change: This method is a getter to check if the pa-


rameters may change during the evolution of time. This is important
because it can help reduce the time consumed at each iteration when the
Discretizer runs on a Dynamics with constant coecients. In such cases,
instead of recomputing the matrices at each time step with the same con-
3.3. DYNAMICS CLASS 55

stant parameters, we can reuse the previously computed matrices, thus


improving the performance of our code.

ˆ set_current_time: This method ensures that the Discretizer and the


Dynamics always have the same current time when solving the ODEs sys-
tem. This synchronization ensures that parameters are evaluated correctly
when they are functions of time t. In every getter method for the market
parameters, the current time is also passed to facilitate this feature.

ˆ set_discretized_domain: Once the Discretizer has computed the dis-


cretized domain, it is passed to the Dynamics, which uses it to compute
the values of the current market parameters for every point of the mesh
grid.

The other getter methods are key for the interaction between the Dynamics
and the Discretizer, but their implementation is straightforward and intuitive.
They call the corresponding getter method for the inner class with the correct
parameters (the discretized domain and the current time).
The rst implementation of this class is the concrete class BlackScholesModel,
which provides implementations for all the discussed methods and has the fol-
lowing eld attributes:

ˆ volatility: of type Volatility;


ˆ interest_rate: of type InterestRate;
ˆ dividend_rate: of type DividendRate;
ˆ current_time: of type float, initialized to 0;

ˆ discretized_domain: of type NumPy array, initialized to None;


ˆ correlation: of type float.

It uses three classes: Volatility, InterestRate, and DividendRate. These


are all interfaces with a similar structure since the way they are modeled is
similar.
The Volatility class has the following methods:

ˆ get_volatility_array: Given the discretized domain and the current


time, this method computes the volatility for each node of the mesh grid
and returns it as a NumPy array.

ˆ will_change: Returns a boolean value indicating whether the volatility


will change during the resolution of the pricing problem.

This interface is implemented by the class ConstantVolatility, which as-


sumes a constant volatility for each node at any time.
A similar structure is implemented for the InterestRate class, which has
the following methods:

ˆ get_interest_rate_array: Given the discretized domain and the cur-


rent time, this method computes the interest rate for each node of the
mesh grid and returns it as a NumPy array.
56 CHAPTER 3. PROGRAM IMPLEMENTATION

ˆ will_change: Returns a boolean value indicating whether the interest


rate will change during the resolution of the pricing problem.

This interface is implemented by the class ConstantInterestRate, which


assumes a constant interest rate for each node at any time.
The DividendRate interface has the following methods:

ˆ get_dividend_rate_array: Given the discretized domain and the cur-


rent time, this method computes the dividend rate for each node of the
mesh grid and returns it as a NumPy array.

ˆ will_change: Returns a boolean value indicating whether the dividend


rate will change during the resolution of the pricing problem.

ˆ is_null: Returns a boolean value indicating whether the dividend rate


will always be null during the resolution of the pricing problem.

This interface is implemented by the class ConstantDividendRate, which


assumes a constant dividend rate for each node at any time.

3.4 Discretizer Class


The Discretizer class is the core of our code, responsible for computing the
fair price using the methods specied by the user. In this part of the code, all
the previously discussed classes interact and combine their behaviors, ensuring
the desired modularity and independence of dierent parts of the code.
The main class in this section of the project is the abstract Discretizer
class, which is concretized by the DiscretizerMeta class. The DiscretizerMeta
class denes all the methods that do not depend on the specic discretizer cho-
sen. This class serves as the base class from which every other discretizer will
inherit, and it has its own builder with all the routines common to every dis-
cretizer class. It denes the following methods:

ˆ get_dynamics_type: Returns the value of DynamicsType used during the


construction of the Dynamics.

ˆ get_time_step_size: Returns the current size of the time step used to


compute the next step of the system of ODEs. Keep in mind that this
value can change during the run because methods like the embedded ones
will adjust it to satisfy the user-imposed tolerances.

ˆ get_dynamics: Returns the Dynamics object containing all the market


parameters.

ˆ get_domain: Returns the initial space domain used to compute the solu-
tion. This domain is expressed as a list of 2-dimensional lists, where each
element of the outer list represents the interval on the respective dimen-
sion (e.g., the list [[0,100], [20, 200]] corresponds to the Cartesian
product in [0, 100]×[20, 200] in R2 ). Note that the domain specied by the
user can be truncated during the construction of the discretized domain
for options like Barrier Options, because for them, the PDE is dened
only in a specic region of the domain and they have boundary conditions
3.4. DISCRETIZER CLASS 57

Figure 3.4: Structure of the Discretizer class.


58 CHAPTER 3. PROGRAM IMPLEMENTATION

to be imposed. For example, a domain of [1, 200] with a down-and-out


barrier at 50 will generate the discretized domain on [50,200]. Also, note
that 0 cannot be used as the left boundary of a domain because, at that
point, the discretization of the PDE is poorly dened; instead, use small
values that approach 0.

ˆ get_discretized_domain: Returns the discretized domain, a NumPy ar-


ray built from the original space domain with a discretization specied by
the number of space steps.

ˆ get_space_step_size: Returns the space step size of the discretized do-


main.

ˆ set_time_step_size: This method is used by the embedded methods to


properly update the value of the time step size.

ˆ set_domain: This method is used by the builder method of the class to


compute the discretized domain from the given domain. It also checks the
consistency of the given input with the DimensionType inside the Option.
ˆ increase_current_time: This method is used by the embedded methods
to properly update the value of the current time according to the current
step size.

ˆ plot_pointwise_error: This method returns a plot of the computed


option fair value alongside the corresponding analytical value computed
through known formulas. The user can choose to plot the option payo
for comparison. It's also possible to generate the graph with a reference
solution computed with higher accuracy. The gures presented in Chapter
4 were generated with this function.

ˆ compute_average_time_needed: This method returns an average of the


time needed to compute a fair price, given a number of runs on which
to compute the average. This method simply runs the get_fair_price
method several times, which we will discuss shortly.

ˆ update_pde_matrix: This method updates the matrix associated with the


system at each iteration of the ODE solver. Since this matrix depends on
the market values of volatility, interest rate, and dividend rate, it's impor-
tant to update the matrix correctly at each iteration when these parame-
ters aren't constant. This method involves the will_parameters_change
method of the Dynamics class to speed up the solver in cases of constant
coecients.

We also developed the following methods to generalize the resolution of linear


systems. They are used in the get_fair_price method of each discretizer to
solve the ODE with the correct time method:

ˆ _get_forward_euler_fair_value: Solves a linear system of ODEs using


the classic Forward Euler method.

ˆ _get_theta_method_fair_value: Solves a linear system of ODEs using a


method from the theta method family. This family includes the Backward
3.4. DISCRETIZER CLASS 59

Euler and Crank-Nicolson methods, and these are the only two methods
applied in our scope. This method requires the value of theta correspond-
ing to the desired method.

yn+1 = yn + k [(1 − θ)f (tn , yn ) + θf (tn+1 , yn+1 )]

ˆ _get_r_k_explicit_embedded_fair_value: Solves a linear system of


ODEs using the explicit embedded Runge-Kutta method described in Ex-
ample 2.4. Since this is an embedded method, it's important to declare
how the method behaves when the rejection rule is veried. In that case,
we reject the time step size due to a high error (computed in absolute
norm) between the two new estimates given by the Runge-Kutta tableau.
We decided that, in these cases, the new step size would be given by

   (p−1)
1/p 
tola + yn · tolr
kn+1 = min 2, max 0.5, 0.7 ·   · kn
    
(p) (p−1)
yn − yn
(3.1)
(p−1) (p)
where yn , yn are the two dierent estimates at step n with orders
p−1 and p. The norm used is the innity norm, and kn is the step size
at step n. Using this formula, changes in step size are proportional to the
computed error and the given tolerances but without abrupt changes in
step size.

ˆ _get_r_k_implicit_embedded_fair_value: Solves a linear system of


ODEs using one of the implicit embedded Runge-Kutta methods described
in Example 2.6, depending on the input value chosen by the user. This
method uses the same update formula 3.1 as the previous function.

ˆ _get_r_k_diagonally_impl_fair_value: Solves a linear system of ODEs


using the semi-implicit Runge-Kutta Gauss-Legendre method described in
Example 2.5.

ˆ __one_step_r_k_semi_impl: This utility method is used by the solver


_get_r_k_diagonally_impl_fair_value method, computing a single step
for a generic semi-implicit Runge-Kutta method.

ˆ __one_step_r_k_embedded_espl: This utility method is used by the


solver _get_r_k_explicit_embedded_fair_value method, computing a
single step for a generic explicit embedded Runge-Kutta method.

ˆ __one_step_r_k_embedded_impl: This utility method is used by the


solver _get_r_k_implicit_embedded_fair_value method, computing a
single step for a generic implicit embedded Runge-Kutta method.

From the DiscretizerMeta class, the FiniteDifferencesDiscretizer and


FEMDiscretizer classes inherit. These two classes implement the abstract
methods that were left unimplemented in the base class. These are methods
that nd their natural implementation only after a discretizer method is cho-
sen, as they are all related to the construction of the mesh grid, the discretizer
matrix, or the computation of the fair price. We have the following methods:
60 CHAPTER 3. PROGRAM IMPLEMENTATION

ˆ get_discretizer_type: Getter for the Enum DiscretizerType that


identies the type of discretizer.

ˆ get_matrix: One of the most important methods, it performs the dis-


cretization of the PDE given by the dynamics (recall the DynamicsType
Enum) using the method specied by the discretizer. Clearly, this method
has two dierent implementations in the two classes. In the Finite Dif-
ference implementation, the method rst computes the two matrices ap-
proximating the space derivatives using centered dierences on the inner
nodes and uncentered nite dierences on the outer nodes (to maintain
the global order of convergence of the matrix), both with order 2 or order
4 depending on the user request. Then it aggregates all the matrices into
a unique matrix that denes the ODE linear system to be solved with the
get_fair_value method. This method also manages the specic PDEs
related only to a family of options, such as the 1-dimensional Asian Op-
tion, where it's possible to simplify the problem using the PDE 1.29.

In this implementation, we decided to use the CSR sparse matrix structure


provided by the SciPy package. This ensures a fast resolution of the linear
system, as we will see in the next chapter. We did not implement a full
matrix representation of the same matrix because the advantages of sparse
matrices are well known in the numerical eld.

On the other hand, the FEM implementation of the same method uses
the PyFreeFem package to execute code with the FreeFem compiler. This
choice allows us to access a well-developed set of methods native to this
language, such as the ability to easily perform mesh adaptation and the
automatic translation from the variational formulation of the FEM prob-
lem to its solution. For our purposes, we implemented a mesh adaptation
with the function adaptmesh on a fespace with polynomials of degree 1,
then solved the variational problem by imposing the boundary condition
and using the convect formula for the convective term. Between these
steps, it's possible to retrieve the discretized matrix for debugging the
code or performing some analysis, though it is more ecient to abandon
OOP habits for a more ecient FreeFem single-run calculation.

ˆ get_fair_price: Returns the fair price of the option after sequentially


running all the other methods previously mentioned. It is clear that to
perform this computation, the payo and the discretizer matrix must rst
be computed, after which one of the methods capable of solving the ODE
system must be applied.

ˆ plot_fair_price: This method generates the plot for the computed fair
value and compares it with the analytical one (when available) and with
the payo when requested by the user. This method was used to generate
the plots in Chapter 4.

BarrierOptionDiscretizer
One last class we would like to mention is the
class, which inherits from the FiniteDifferencesDiscretizer. This is a nec-
essary step to correctly price a barrier option since, unlike the general option
case, the PDE presents a homogeneous boundary condition on every barrier, and
the domain itself is reduced by the presence of the barrier. This behavior was
3.5. BUILDER CLASS 61

possible only by implementing the correct_pde_matrix and _correct_domain


methods, which were abstract in the base class. With this class, it's possible to
build all the Knock-Out Options in the 1-dimensional case with one or two bar-
riers. This class also denes two new elds for the Discretizer: upper_barrier
and lower_barrier.

3.5 Builder class


To conclude this discussion, we introduce the Builder class, which allows the
user to easily (and correctly!) build all the necessary objects in the correct
order. As seen in Figure 3.5, this single class contains all the methods required
to build the three primary objects: the Discretizer, Option, and Dynamics. It
automatically decides which object to build for each interface based on the given
parameters and performs consistency checks to ensure that these parameters are
reliable and manageable by the currently developed code.
To ensure correct and logically consistent use of the solver, we recommend
Dynamics, followed by the
that the user builds the objects starting with the
Option, and nally the Discretizer. Once these steps are completed, the user
can simply call the get_fair_price function of the Discretizer to compute
the price eortlessly. Examples of how to use all the possible parameters can
be found in the Solver package under the Test directory, which contains all
the scripts used to test the library and generate the results presented in the
following chapter.

Figure 3.5: Structure of the Builder class.


62 CHAPTER 3. PROGRAM IMPLEMENTATION
Chapter 4

Numerical Results
4.1 European Options in 1 Dimension
In this chapter, we present the results of our implementation discussed in the
previous chapter. We report on the accuracy of the developed methods by test-
ing their convergence and, when possible, by comparing the error with analytical
solutions.
Since we are dealing with an OOP implementation, it is unnecessary to test
every possible combination of the objects we developed. Proving that the in-
teractions between classes are correct ensures that any new object (if correctly
developed) will benet from the established implementation. For example, we
will not present the tests for all combinations of payos, time methods, and
space methods performed during development. Instead, we will present indi-
vidual results that demonstrate the correctness of payo implementation or
method implementation. In a few cases, we will present the complete results
that combine these individual results to conrm the overall correctness of our
program.
Let's begin with some generic examples to qualitatively verify that our pro-
gram computes results in accordance with theoretical expectations. Consider a
framework with a single stock St and price European Calls, Puts, Digital Calls,
and Digital Puts on it, with dierent volatility σ, interest rate r, and dividend
rate q. All options have a strike K = 100, time to maturity T = 1, on the
domain [0.1, 200]. We computed the prices of these options using the Backward
Euler method for time discretization and the second-order Finite Dierences
method for space discretization on the given domain using 1000 time steps and
1000 space discretizations.
In Figures 4.1, 4.2, 4.3, 4.4, and 4.5, we present all the computed prices.
For each option, we also plot the corresponding analytical price (which overlaps
with our computed price) and the option payo.
From these results, it is evident that the computed price consistently over-
laps with the analytical price. Our program correctly predicts the analytical
price under various market conditions and manages the presence of a constant
dividend rate. In Table 4.1, the error with respect to the analytical solution
and the computation time are reported. For each run, the error is lower than
0.01, and in some cases, it is even lower than 0.001. This observation is rele-

63
64 CHAPTER 4. NUMERICAL RESULTS

(a) Call Option (b) Put Option

(c) Digital Call Option (d) Digital Put Option

Figure 4.1: Computed and analytical options' prices with σ = 0.2, r = 0, q = 0.


4.1. EUROPEAN OPTIONS IN 1 DIMENSION 65

(a) Call Option (b) Put Option

(c) Digital Call Option (d) Digital Put Option

Figure 4.2: Computed and analytical options' prices with σ = 0.05, r = 0, q = 0.


66 CHAPTER 4. NUMERICAL RESULTS

(a) Call Option (b) Put Option

(c) Digital Call Option (d) Digital Put Option

Figure 4.3: Computed and analytical options' prices with σ = 0.2, r = 0.03, q =
0.
4.1. EUROPEAN OPTIONS IN 1 DIMENSION 67

(a) Call Option (b) Put Option

(c) Digital Call Option (d) Digital Put Option

Figure 4.4: Computed and analytical options' prices with σ = 0.2, r = 0.06, q =
0.
68 CHAPTER 4. NUMERICAL RESULTS

(a) Call Option (b) Put Option

(c) Digital Call Option (d) Digital Put Option

Figure 4.5: Computed and analytical options' prices with σ = 0.2, r = 0.03, q =
0.01.
4.1. EUROPEAN OPTIONS IN 1 DIMENSION 69

vant because, in the nancial market, most bid and ask prices are expressed in
cents, with only a few cases using thousandths. Therefore, an error lower than
this tick size is sucient for our program. Moreover, the computation time is
reasonable given our setup, and with better hardware, the same computation
could be performed even faster.

Option type Market Parameters Error Computational time (s)


Digital Put σ =0.2, 1.03e-3 0.995
Digital Put σ =0.05, 4.00e-3 0.858
Digital Put σ =0.2, r=0.03, 9.69e-4 0.821
Digital Put σ =0.2, r=0.06, 9.08e-4 0.845
Digital Put σ =0.2, r=0.03, q=0.01 9.79e-4 0.810
Digital Call σ =0.2, 8.50e-84 0.698
Digital Call σ =0.05, 7.46e-8 0.720
Digital Call σ =0.2, r=0.03, 3.53e-82 0.739
Digital Call σ =0.2, r=0.06, 1.25e-80 0.869
Digital Call σ =0.2, r=0.03, q=0.01 1.03e-82 0.993
Call σ =0.2, 2.88e-3 1.073
Call σ =0.05, 3.48e-4 0.933
Call σ =0.2, r=0.03, 2.00e-3 0.589
Call σ =0.2, r=0.06, 1.42e-3 0.577
Call σ =0.2, r=0.03, q=0.01 2.22e-3 0.589
Put σ =0.2, 2.91e-3 0.597
Put σ =0.05, 3.48e-4 0.608
Put σ =0.2, r=0.03, 1.95e-3 0.719
Put σ =0.2, r=0.06, 1.28e-3 0.892
Put σ =0.2, r=0.03, q=0.01 2.21e-3 1.113

Table 4.1: Error and Time used for each computation.

With these preliminary results, we have shown that the computed results are
correct. However, the computation time varies depending on the method used.
As previously discussed, our program allows the use of dierent time methods
and nite dierence orders. In short, we have the following time methods:
Forward Euler, Backward Euler, Crank-Nicolson, Explicit Embedded Runge-
Kutta 2, Diagonally Implicit Runge-Kutta 3, Embedded Runge-Kutta Lobatto
3C, and Embedded Runge-Kutta Lobatto 3B. The nite dierence methods are
available in second and fourth-order versions.
To study the errors and computational times of the dierent time methods
used to solve the same problem, we again consider the previous framework with
σ = 0.2, r = 0, q = 0 and compute the price for a European Call using 1000 time
steps and 500 space discretizations for the second order and 2000 time steps and
300 space discretizations for the fourth order. Tables 4.2 and 4.3 present the
results.
From these results (and from other runs that are not reported here), it
is evident that some methods are generally better than others in achieving a
similar error in less time. For example, Crank-Nicolson is unsurprisingly slightly
faster than Backward Euler, but the fastest method is Runge-Kutta Lobatto 3B,
which computes the solution in 36 millisecondsan interesting computation
time for a high-frequency trading program, for instance. The Forward Euler
70 CHAPTER 4. NUMERICAL RESULTS

method, however, did not converge due to its instability when the time step
is not suciently smaller than the space discretization. This characteristic is
well-known for the Forward Euler method (and explicit methods in general) and
results in a model that is too parameter-dependent, making it unfeasible for our
implementation. For this reason, we focus on implicit methods to ensure greater
stability. Regarding space discretization methods, the fourth-order method can
compute reasonable results, but it does not guarantee better performance due
to the irregularity of the payo function and the more complex matrices that
complicate the resolution of the associated linear system.
In conclusion, the Runge-Kutta Lobatto 3B method is an interesting model
for this type of computation and will undoubtedly consume less time on better
hardware and after parameter tuning. On the space side, since most of our
applications will involve payos that are not dierentiable (or continuous), we
will not use the fourth-order nite dierences method as a reference but will
instead rely on its second-order counterpart.

Time Method Error Time Elapsed (s)


Forward Euler NaN
1 0.043
Backward Euler 2.041e-3 0.965
Crank Nicolson 2.007e-3 0.753
Explicit Embedded Runge Kutta 2 1.955e-3 2.042
Diagonally Implicit Runge Kutta 3 2.006e-3 1.539
Embedded Runge Kutta Lobatto 3C 1.998e-3 3.764
Embedded Runge Kutta Lobatto 3B 2.015e-3 0.026

Table 4.2: Comparison between Time Methods with second-order nite dier-
ences.

Time Method Error Time Elapsed (s)


1
Forward Euler NaN 0.022
Backward Euler 4.671e-3 0.756
Crank Nicolson 4.654e-3 0.692
Explicit Embedded Runge Kutta 2 5.967e-3 0.852
Diagonally Implicit Runge Kutta 3 5.910e-3 1.370
Embedded Runge Kutta Lobatto 3C 5.722e-3 4.083
Embedded Runge Kutta Lobatto 3B 5.908e-3 0.024

Table 4.3: Comparison between Time Methods with fourth-order nite dier-
ences.

To test the order of convergence of our method, we divide the discussion


into space and time variables. For space, we implemented only two types of
nite dierence matrices: second and fourth-order. To test the correctness
of these matrices, we solved the same problem with σ = 0.2, r = 0.3, q =
0, K = 100 using both second-order and fourth-order discretizers in space, with

1 With the given discretization of 1000 time steps and 500 spatial discretization points for
the 2nd discretization order (resp. 2000 and 300 for the 4th discretization order), we observe
the instability of the Forward Euler method because the length of the time step is not small
enough to adequately handle the space discretization error.
4.1. EUROPEAN OPTIONS IN 1 DIMENSION 71

Backward Euler and Crank-Nicolson in time, on the domain [0.1, 200] with time
to maturity T = 1. Figure 4.6 shows the order of convergence between the
computed solution and the analytical one for the four dierent computations,
with space subdivisions of (50, 100, 150, 200, 250, 300) and 10000 time steps.
It is clear from this gure that our program struggles to achieve an error lower
than 1e-3, and moreover, the error does not decay as expected. This is because
we are trying to solve the Black-Scholes equation, which is naturally dened on
the half-line R+ , on a truncated domain [0.1, 200]. This unavoidable truncation
generates an error on the right boundary during pricing since it is impossible to
impose a boundary condition on the right side that would correct this behavior.
Indeed, if we look at the point-wise error between the computed and analytical
solutions (Figure 4.7 for the point-wise error of the second-order Backward Euler
computation; similar results were found in other cases), we can clearly see that
our program correctly manages the pricing around the strike, with a decay of
the error, but it maintains a constant error on the right boundary. Considering
the error between the computed solutions and a reference solution with 1000
space subdivisions and 10000 time steps (Figure 4.8), we see that our program
correctly follows the error decay of the space discretization but converges to
the wrong solution used as a reference. From this, we can conclude that our
implementation is correct but corrupted by the impossibility of solving the given
problem in its proper domain. Nevertheless, this error is always around 1e-3 and
is located far from the strike, where options are usually more liquid, making the
error negligible compared to the usual bid-ask spread, which would be signicant
for options that are far out of the money (or far in the money).
Moving on to the time method order of convergence, we observe the same
problem discussed above: all methods struggle to correctly estimate the solution
on the right boundary due to the truncation of the domain. In the convergence
graph in Figure 4.9, this behavior is not visible when compared with the analyt-
ical solution because of the chosen step size, but it becomes more evident with
ner meshes. In Figure 4.10, we see that all the methods achieve their expected
order of convergence when compared with a reference solution.
A specic discussion is required for the only embedded time model we de-
veloped. For this type of model, a classic order of convergence analysis is not
meaningful. Instead, it is possible to test whether the developed model can
match its time step size to the problem in such a way as to achieve the desired
absolute and relative tolerances. Indeed, solving the same pricing problem for a
Call Option with σ = 0.2, r = 0.3, q = 0, K = 100 on the domain [0.1, 200] with
time to maturity T = 1 using second-order nite dierences, and using dierent
tolerances, we obtain Figure 4.11 and Table 4.4, where the input tolerances and
the output results are reported.
From these results, it is clear that our model correctly adapts the time step
size to the problem to achieve the desired tolerance. Looking at the log-log
plot, we see that all the points lie on a straight line, and the error is always
lower than the requested tolerance. Unfortunately, the time required for this
computation is too long compared to the time required by the Runge-Kutta
Lobatto 3B method presented earlier. Therefore, our best choice remains the
Runge-Kutta Lobatto 3B method.
To conclude the discussion for the 1-dimensional case, we can state that, as
expected, the implicit methods are preferable for this type of problem. Among
them, the Runge-Kutta 3B method stands out in terms of order of convergence
72 CHAPTER 4. NUMERICAL RESULTS

(a) Second-order nite dierence with (b) Second-order nite dierence with
Backward Euler. Crank-Nicolson.

(c) Fourth-order nite dierence with (d) Fourth-order nite dierence with
Backward Euler Crank-Nicolson.

Figure 4.6: Space error order of convergence w.r.t. the analytical solution.

abs tol rel tol Error Elapsed Time (s)


1e-2 1e-4 2.554e-3 1.838
1e-3 1e-5 3.673e-4 1.793
1e-4 1e-6 3.118e-5 2.013
1e-5 1e-7 2.799e-6 1.905
1e-6 1e-8 2.504e-7 2.035
1e-7 1e-9 4.532e-8 2.881

Table 4.4: Comparison of Errors and Elapsed Time for Dierent Tolerance
Values
4.1. EUROPEAN OPTIONS IN 1 DIMENSION 73

(a) 50 Space subdivision (b) 100 Space subdivision

(c) 150 Space subdivision (d) 200 Space subdivision

(e) 250 Space subdivision (f) 300 Space subdivision

Figure 4.7: Point-wise error w.r.t the analytical solution for the second-order
Backward Euler computation.
74 CHAPTER 4. NUMERICAL RESULTS

(a) Second-order nite dierence with (b) Second-order nite dierence with
Backward Euler. Crank-Nicolson.

(c) Fourth-order nite dierence with (d) Fourth-order nite dierence with
Backward Euler Crank-Nicolson.

Figure 4.8: Space error order of convergence w.r.t. the reference solution.
4.1. EUROPEAN OPTIONS IN 1 DIMENSION 75

(a)Order of convergence for the Backward (b) Order of convergence for the Crank-
Euler method. Nicolson method.

(c)Order of convergence for the Explicit (d) Order of convergence for the Runge-
Runge-Kutta 3 method. Kutta Lobatto 3B method.

Figure 4.9: Time order of convergence for some of the implemented time meth-
ods w.r.t. the analytical solution.
76 CHAPTER 4. NUMERICAL RESULTS

(a)Order of convergence for the Backward (b) Order of convergence for the Crank-
Euler method. Nicolson method.

(c)Order of convergence for the Explicit (d) Order of convergence for the Runge-
Runge-Kutta 3 method. Kutta Lobatto 3B method.

Figure 4.10: Time order of convergence for some of the implemented time meth-
ods w.r.t. the reference solution.

Figure 4.11: Decay of the error as the absolute tolerance is reduced.


4.2. BARRIER OPTIONS IN 1 DIMENSION 77

and computational time. We are optimistic that, with better machines, the
computation can be performed in less time, making it possible to use this tool
to price European Options in a few milliseconds, as required for high-frequency
trading models in the event of volatility or interest rate shocks. Furthermore, it
may be possible to consider using these models after tuning the parameters to
perform the computation on a smaller domain, thereby neglecting points near
the boundaries where we are not interested in estimating a price.

4.2 Barrier Options in 1 dimension


We now focus on the 1-dimensional knockout barrier option within the context
of European options. As discussed in Section 2.3.2, a barrier option can be com-
puted by solving the Black-Scholes PDE on the domain between two barriers,
with boundary conditions ensuring that the price becomes zero at the barriers.
In Section 1.3.1, we also found that using the method of images, we can de-
rive an explicit analytical solution for a 1-dimensional barrier option, which can
serve as a reference for our solver.
We will test our solver (capable of solving only knockout barrier options)
on up-and-out Call options and down-and-out Put options. Explicit formulas
for the prices of these options can be derived by combining the results found
in Section 1.3.1. From Propositions 1.24, 1.25, and 1.26, along with the Put-
Call parity of Proposition 1.27, we can obtain a closed-form expression for the
price of a down-and-out Put PbO (t, s, K). Similarly, the price of an up-and-out
Call C BO (t, s, K) can be obtained using the price of an up-and-out zero-coupon
BO
bond BO (t, s), the price of an up-and-out stock ST BO (t, s), and the price
BO
of an up-and-out European Put P (t, s).
To test our solver, we consider a framework with a single stock with market
conditions σ = 0.2, r = 0.3, q = 0, K = 100. We solve the pricing problems
for down-and-out Puts with barriers b = 20, 40, 60, 80 and up-and-out Calls
with barriers B = 120, 140, 160, 180 on the domain [0.01, 200] (reduced to the
relevant sub-domain above a lower barrier b or below an upper barrier B ). Using
a second-order nite dierence method in space and a Crank-Nicolson method in
time with 1000 time steps and 500 space subdivisions (on the relevant domain),
we obtained the results shown in Figure 4.12 for the Puts and Figure 4.13 for
the Calls, alongside the analytical solutions. The point-wise errors between our
solutions and the analytical ones are reported in Table 4.5, Figure 4.14 for the
Puts, and Figure 4.15 for the Calls.
From these errors, we observe that, as expected, there are unavoidable errors
on the right boundary where we cannot impose a boundary condition (e.g.,
for the Puts in this case). However, this error disappears when a boundary
condition is imposed (e.g., for the Calls). This result is consistent with our
earlier discussion, where we noted the issue of truncating the Black-Scholes
model, leading to errors whenever we cannot impose a boundary condition.
We also solved more general pricing problems for options without an ana-
lytical pricing formula. Specically, we tested our program on Puts and Calls
with double knockout barriers and on digital Calls and Puts with single and
double barriers. As before, we used σ = 0.2, r = 0.3, q = 0, K = 100 on the
domain [0.01, 200], applying a second-order nite dierence method in space
and a Crank-Nicolson method in time with 1000 time steps and 500 space sub-
78 CHAPTER 4. NUMERICAL RESULTS

divisions. The results are shown in Figures 4.16, 4.17, and 4.18. These results
are qualitatively consistent with nancial intuition, though a deeper analysis is
not possible without an analytical formula. Nonetheless, we are satised with
these results because we were able to validate the prices when possible, and the
qualitative behavior is as expected. The reader should note that the diering
proles in these gures are due to the fact that while the payo intervals are
the same length (30) in both cases, the options provide payos in dierent re-
gions of the half-line R+ , leading to slight dierences in the expected probability
distribution under the Black-Scholes model.

(a) Down-and-Out Put Option with bar- (b) Down-and-Out Put Option with bar-
rier b = 20. rier b = 40.

(c) Down-and-Out Put Option with bar- (d) Down-and-Out Put Option with bar-
rier b = 60. rier b = 80.

Figure 4.12: Computed Option price compared with analytical Option price for
some Down-and-Out Put Options.

4.3 Asian Options in 1 Dimension


As discussed in Section 1.3.3, for the 1-dimensional case of Asian options, which
involves a 2-dimensional PDE in space, we can simplify the problem through a
change of variables in specic cases. Particularly, for the oating strike Asian
Call, we can consider the PDE 1.29 instead of 1.28, where the price function F
4.3. ASIAN OPTIONS IN 1 DIMENSION 79

(a) Up-and-Out Call Option with barrier (b) Up-and-Out Call Option with barrier
B = 120. B = 140.

(c) Up-and-Out Call Option with barrier (d) Up-and-Out Call Option with barrier
B = 160. B = 180.

Figure 4.13: Computed Option price compared with analytical Option price for
some Up-and-Out Call Options.
80 CHAPTER 4. NUMERICAL RESULTS

(a) Point-wise error for Down-and-Out (b) Point-wise error for Down-and-Out
Put Option with barrier b = 20. Put Option with barrier b = 40.

(c) Point-wise error for Down-and-Out (d) Point-wise error for Down-and-Out
Put Option with barrier b = 60. Put Option with barrier b = 80.

Figure 4.14: Point-wise error between the computed Option price and the ana-
lytical Option price for some Down-and-Out Put Options.
4.3. ASIAN OPTIONS IN 1 DIMENSION 81

(a)Point-wise error for Up-and-Out Call (b) Point-wise error for Up-and-Out Call
Option with barrier B = 120. Option with barrier B = 140.

(c)Point-wise error for Up-and-Out Call (d) Point-wise error for Up-and-Out Call
Option with barrier B = 160. Option with barrier B = 180.

Figure 4.15: Point-wise error between the computed Option price and the ana-
lytical Option price for some Up-and-Out Call Options.

(a) Price for a double knockout Call Op- (b) Price for a double knockout Call Op-
tion with barriers b = 120, B = 150. tion with barriers b = 50, B = 80.

Figure 4.16: Computed price for Call and Put Options with double knockout
barriers.
82 CHAPTER 4. NUMERICAL RESULTS

Option Type Lower Barrier Upper Barrier Error Elapsed Time (s)
Call 0 110 3.781e-5 0.772
Call 0 120 1.214e-4 0.687
Call 0 130 1.894e-4 0.648
Call 0 140 3.713e-4 0.575
Call 0 150 2.780e-4 0.547
Call 0 160 2.706e-4 0.543
Call 0 170 3.894e-4 0.544
Call 0 180 4.195e-4 0.559
Call 0 190 4.963e-4 0.551
Put 10 inf 0.1677 0.680
Put 20 inf 0.0337 0.694
Put 30 inf 0.0117 0.645
Put 40 inf 0.0050 0.827
Put 50 inf 0.0023 0.825
Put 60 inf 0.0011 0.618
Put 70 inf 0.0005 0.718
Put 80 inf 0.0002 0.696
Put 90 inf 6.029e-5 0.664

Table 4.5: Comparison of Errors and Elapsed Time for Dierent Option Barriers

(a) Price for a knockout Digital Call Op- (b) Price for a knockout Digital Call Op-
tion with barrier b = 120. tion with barrier b = 150.

Figure 4.17: Computed price for Digital Call Options with single knockout
barriers.
4.3. ASIAN OPTIONS IN 1 DIMENSION 83

(a) Price for a knockout Digital Put Op- (b) Price for a knockout Digital Put Op-
tion with barrier B = 50. tion with barrier B = 70.

Figure 4.18: Computed price for Digital Put Options with single knockout bar-
riers.

and the new variable ξ are given by:


 
K − tA/T K − tA/T
F (t, S, A) = Sω t, , ξ= .
S S

Through algebraic manipulation, we can express the variable ξ as:


 
1 t t−T
ξ=− (A − K) + K .
S T T

From this, we derive the transformation for the term (A−K) used in our oating
strike Asian Call:

T t−T
(A − K) = − Sξ + K = −Sξ,
t t
and the payo becomes:

Φ(S) = (A − K)+ = (−Sξ)+ .

Assuming Φ = S Φ̃, we obtain:

Φ̃ = (−ξ)+ ,

which serves as the new boundary condition.


To dene the domain for ξ , we must analyze its behavior and interpretation.
K
Notably, at t = 0, ξ equals
S , indicating that when reversing the transformation,
we are interested only in the domain where ξ is positive. However, during the
resolution of the PDE, ξ can take both positive and negative values, typically
K
ranging between -2 and 2. Indeed, ξ behaves similarly to the moneyness (
S ) at
t = 0.
In implementing the solver for the Asian Option, we kept these develop-
ments in mind, alongside considerations for the Fixed Strike Put Option and
the Floating Strike Call. Using our implementation, we solved the PDE and
84 CHAPTER 4. NUMERICAL RESULTS

obtained the plot in Figure 4.19, using the usual market parameters σ = 0.2,
r = 0.3, q = 0, K = 100, and solving on the space domain (0, 200). In the
gure, the x-axis is represented as the moneyness according to the previously
discussed development.
Since an analytical price for this type of option is not currently available, we
cannot directly compare our results to validate the implementation. However,
we are condent in its correctness due to the shape of the solution, which aligns
with nancial intuition.

Figure 4.19: Option price for a xed strike Asian Call.

4.4 Basket Options in 2 Dimensions


For the implementation of Basket Options in multiple dimensions, we uti-
lized the Python API pyfreefem [13], which enables communication with the
FreeFEM language. This approach allowed us to leverage the built-in functions
in FreeFEM for mesh renement and numerical solutions of the Black-Scholes
model. The FreeFEM documentation [19] demonstrates the use of the Black-
Scholes equation as a prototype for introducing evolution problems ( click here ).
We used this code as a foundation to develop our solver for Basket Options.
As the correctness of this implementation has already been established in the
documentation, we do not provide additional validation results here.
Among the various payo functions we dened, we will focus on the payos
related to Put Options. As indicated by theory (see Theorem 2.15 and sub-
sequent results) and numerical ndings, these options tend to be more stable
due to their payos generally belonging to L2 (see 1.12, 1.13, 1.14). When this
regularity is present, the computed option prices are well-shaped and reliable.
For instance, in the rst two plots in Figure 4.20, the level sets of the solution
align with the denition of the payo. Conversely, in the third image, the level
sets in the top-right region begin to exhibit concavity, resulting in an unrealistic
shape not entirely explained by the payo denition. This outcome is expected
since the rst two payos belong to the L2 space, while the third does not.
Similarly, Call Option prices exhibit the same irregularities due to the same
4.4. BASKET OPTIONS IN 2 DIMENSIONS 85

issues, as shown in Figure 4.21. The results presented in Figures 4.20 and 4.21
are based on a market framework with constant parameters σ = 0.2, r = 0.03,
q = 0, and a correlation between the two stocks of ρ = 0.3, on the domain
[0.01, 200], with a strike price of 100.

(a) Price for a Put Option with payo (b) Price for a Put Option with payo
1.12. 1.13.

(c) Price for a Put Option with payo


1.14.

Figure 4.20: Computed price for Put Options with dierent payos.
86 CHAPTER 4. NUMERICAL RESULTS

(a) Price for a Call Option with payo (b) Price for a Call Option with payo
1.15. 1.16.

(c) Price for a Call Option with payo


1.17.

Figure 4.21: Computed price for Call Options with dierent payos.
Bibliography
[1] Yves Achdou, Olivier Bokanowski, and Tony Lelièvre.  Partial dierential
equations in nance. In: The Encyclopedia of Financial Models 2 (2012).
[2] Yves Achdou and Olivier Pironneau. Computational methods for option
pricing. SIAM, 2005.
[3] Alain Bensoussan.  On the theory of option pricing. In: Acta Applicandae
Mathematica 2 (1984), pp. 139158.

[4] Alain Bensoussan and Jacques Louis Lions.  Impulse control and quasi-
(No Title) (1984).
variational inequalities. In:

[5] Tomas Björk. Arbitrage theory in continuous time. Oxford university press,
2009.

[6] Andrei N Borodin and Paavo Salminen.  Handbook of Brownian motion-


facts and formulae. In: Journal of the Royal Statistical Society-Series A
Statistics in Society 160.3 (1997), p. 596.

[7] Michael J Brennan and Eduardo S Schwartz.  The valuation of American


put options. In: The Journal of Finance 32.2 (1977), pp. 449462.
[8] Susanne C Brenner. The mathematical theory of nite element methods.
Springer, 2008.

[9] John Charles Butcher. Numerical methods for ordinary dierential equa-
tions. John Wiley & Sons, 2016.
[10] Thierry Cazenave and Alain Haraux. An introduction to semilinear evo-
lution equations. Vol. 13. Oxford University Press, 1998.
[11] Antoine Conze and Viswanathan.  Path dependent options: The case of
lookback options. In: The Journal of Finance 46.5 (1991), pp. 18931907.
[12] Black F. and Scholes M.  The pricing of options and corporate liabilities.
In: Journal of political economy 81.3 (1973), pp. 637654.

[13] Florian Feppon.  Shape and topology optimization of multiphysics sys-


tems. In: (2019).

[14] Avner Friedman. Partial dierential equations of parabolic type. Courier


Dover Publications, 2008.

[15] Dariusz Gatarek and Swiech Andrzej.  Optimal stopping in Hilbert spaces
and pricing of American options. In: Mathematical methods of operations
research 50.1 (1999), pp. 135147.

87
88 BIBLIOGRAPHY

[16] M Barry Goldman, Howard B Sosin, and Mary Ann Gatto.  Path de-
pendent options:" Buy at the low, sell at the high". In: The Journal of
Finance 34.5 (1979), pp. 11111127.

[17] Ernst Hairer, Syvert Paul Nørsett, Gerhard Wanner, et al.  Solving Ordi-
nary Dierential Equations I [electronic resource]: Nonsti Problems. In:
().

[18] Charles R. Harris et al.  Array programming with NumPy. In: Nature
585.7825 (Sept. 2020), pp. 357362. doi: 10.1038/s41586-020-2649-2.
url: https://doi.org/10.1038/s41586-020-2649-2.
[19] Frédéric Hecht et al. FreeFem++ Documentation. Version 4.9. 2021. url:
https://doc.freefem.org/.
[20] Patrick Jaillet, Damien Lamberton, and Bernard Lapeyre.  Variational
inequalities and the pricing of American options. In: Acta Applicandae
Mathematica 21 (1990), pp. 263289.

[21] Ioannis Karatzas.  On the pricing of American options. In: Applied math-
ematics and optimization 17.1 (1988), pp. 3760.

[22] Ioannis Karatzas.  Optimization problems in the theory of continuous


trading. In: SIAM Journal on Control and Optimization 27.6 (1989),
pp. 12211259.

[23] Angelien Gertruda Zinnia Kemna and Antonius Cornelis Franciscus Vorst.
 A pricing method for options based on average asset values. In: Journal
of Banking & Finance 14.1 (1990), pp. 113129.

[24] Enrico Magenes and Jacques Louis Lions.  Problèmes aux limites non
homogènes et applications. In: (No Title) (1968).
[25] Andrea Pascucci. A short course on American options. 2009.

[26] Amnon Pazy. Semigroups of linear operators and applications to partial


dierential equations. Vol. 44. Springer Science & Business Media, 2012.
[27] Murray H Protter and Hans F Weinberger. Maximum principles in dier-
ential equations. Springer Science & Business Media, 2012.
[28] Kristin Reikvam.  Viscosity solutions of optimal stopping problems. In:
Stochastics and Stochastic Reports 62.3-4 (1998), pp. 285301.

[29] L Chris G Rogers and Zo Shi.  The value of an Asian option. In: Journal
of Applied Probability 32.4 (1995), pp. 10771088.

[30] Pauli Virtanen et al.  SciPy 1.0: Fundamental Algorithms for Scientic
Computing in Python. In: Nature Methods 17 (2020), pp. 261272. doi:
10.1038/s41592-019-0686-2.
[31] Xiao Lan Zhang.  Numerical analysis of American option pricing in a
jump-diusion model. In: Mathematics of Operations Research 22.3 (1997),
pp. 668690.

You might also like