Preliminaries Pricing by binomial tree method Computational Methods for Quantitative Finance Models, Algorithms, Numerical Analysis Christoph Schwab N. Hilber, C. Winter ETHZ-UNIZ Master of Advanced Studies in Finance Spring Term 2008 Christoph Schwab Computational Methods for Quantitative Finance
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
PreliminariesPricing by binomial tree method
Computational Methods for Quantitative FinanceModels, Algorithms, Numerical Analysis
Christoph SchwabN. Hilber, C. Winter
ETHZ-UNIZ Master of Advanced Studies in Finance
Spring Term 2008
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
Scope of the course
Analysis and implementation of numerical methods forpricing options.
I Testat: 75% of solved homework assignments(theoretical exercises + MATLAB programming).
Examination: On Thursday, May 29, 10–12.Written, closed-book examination includes theoretical andMATLAB programming problems.Examination takes place on ETH-workstations running MATLABunder LINUX. Own computer will NOT be required.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
Details of the course
I Elementary Pricing
1. Pricing by binomial trees2. Pricing by Finite Difference Solution of PDEs3. American options4. Barrier and Asian contracts
II Pricing by Finite Element methods
5. Variational Formulation of BS model6. Finite Element Methods for infinite horizon problems7. Time stepping for finite horizon European vanillas8. Finite horizon American contracts
III Pricing in incomplete markets
9. Stochastic volatility models10. Levy models
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Outline
PreliminariesOptionsStochastic processesBlack-Scholes model
Pricing by binomial tree methodBinomial tree modelMatlab implementation: Euro1.m–Euro9.m
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Definition
An option is a contract which gives the right (but not theobligation) to buy or to sell a risky asset at a specified date T inthe future (or within a specified period) at a specified price K.
T : maturity or expiry date (after T the option is worthless)
K: strike or exercise price
Options are derivative contracts.
Examples of underlying assets (or underlyings): stocks (shares ofa company), indices (weighted means of several stocks), bonds,currencies, other options . . .
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Examples
Call: right to buy the underlying
Put: right to sell the underlying
Exercise styles
I European: exercise only at maturity T
I American: exercise at any date before the maturity T(the holder chooses when exercise the option)
More complicated, exotic (as opposed to simple vanilla) options:
I Barrier: depend on particular asset price level(s) attained over a period
I Asian: depend on the average price of the underlying over a period
I Lookback: depend on the minimum or maximum asset price over a period
(⇒ path-dependent options)
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Value of an option
The right without obligations is not given for free: option has avalue called premium (do not confuse with the exercise price K!)
What is the fair price of an option? It depends on:
I Assumptions on the market
I Model for the underlying price
Note: the price of standard liquid options is defined by the market(offer-demand equilibrium). Models are mostly needed forvaluation of exotic options.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Modelling assumptions on the market
I There are no arbitrage opportunities: no gain without initialinvestment nor risk (no free lunch).
I There exists a riskless bank account with riskless continuouslycompounded interest rate r ≥ 0:
time 0 t
$ X ertX
I Market is frictionless: there are no transaction costs, interestrates for lending and borrowing are equal, all securities andcredits are available at any time and in any volume.
I All market participants have immediate access to anyinformation; individual trading does not influence the price.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Payoff function
The payoff of an option is its value at the time of exercise.The payoff is a function of the underlying price S at this time.
Examples:
I Call: max(S −K, 0) ≡ (S −K)+.
I Put: max(K − S, 0) ≡ (K − S)+.
Note: the payoff function can be obtained by no arbitrageargument. It does not depend on the model for the underlyingprice.On the contrary, to find values of the option before the exercise, wehave to do some assumptions on the evolution of the asset price.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Stochastic modelling of the stock price
Stock prices in the future are not known: they are modelled bystochastic processes.
A stochastic process (St)t∈[0,T ] is a random function of t.
Filtered probability space: (Ω,F ,P, (Ft)t∈[0,T ]).
I Ω: set of elementary events ω
I F : σ-algebra of all events (i.e. subsets of Ω)
I P: probability measure on FI (Ft)t∈[0,T ] (filtration): increasing family of σ-algebras.Ft represents the information available up to time t.
(St(ω))t∈[0,T ] is a trajectory or sample path of the process.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Important definitions
A stochastic process X is adapted (w.r.t. the filtration) if Xt isFt-measurable (notation: Xt ∈ Ft).It means that the value of Xt is revealed at time t.
X is a Markov process if, for any bdd Borel function f and ∀s ≥ t,E[f(Xs) | Ft] = E[f(Xs) |Xt]:the future values of X do not depend on the past but only on thepresent value.
An adapted process X is a martingale if
(i) E[|Xt|] <∞ for all t ≥ 0(ii) E[Xs | Ft] = Xt, for all s ≥ t
(the best prediction for future values is the present value).
X is cadlag if its trajectories Xt(ω) are almost surely rightcontinuous and have left limits at all t ∈ [0, T ].French: continu a droite, limite a gauche.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Brownian motion
Normal distribution N (µ, σ2) has the density
f(x) = 1√2πσ2
exp(− (x−µ)2
2σ2
).
A stochastic process W is a Wiener process or Brownian motion if
I W0 = 0 a.s.
I W has independent increments: for all t1 ≤ t2 ≤ t3 ≤ t4,Wt4 −Wt3 ⊥⊥Wt2 −Wt1 .
I increments of W are normally distributed:Wt+s −Wt ∼ N (0, s).
Properties:
I Wiener process is a Markov process and a martingale.
I Wt ∼ N (0, t), E[Wt] = 0, VarWt = t.
I W has continuous paths.
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Black-Scholes model
In the Black-Scholes model, the stock price is given by
St = S0e(r−σ2/2)t+σWt
where Wt is a Brownian motion (under the risk-neutral probability).
Risk-neutral means the discounted price e−rtSt is a martingale.
The value at time t ≤ T of a European option with maturity Tand payoff H(S) is defined as
Vt = e−r(T−t) E[H(ST ) | Ft].Due to the Markov property,
Vt = V (S, t) = e−r(T−t) E[H(ST ) |St = S].
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
OptionsStochastic processesBlack-Scholes model
Example: European call price
European Call: payoff function H(S) = (S −K)+.
Let Xt = (r − σ2/2)t+ σWt. Call price at time t is:
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
Binomial tree modelMatlab implementation: Euro1.m–Euro9.m
Reference:
Desmond J. Higham, Nine Ways to Implement the BinomialMethod for Option Valuation in MATLAB, SIAM Review, 2002.
(See lecture web site for the link on this paper and accompanyingMatlab files)
Christoph Schwab Computational Methods for Quantitative Finance
PreliminariesPricing by binomial tree method
Binomial tree modelMatlab implementation: Euro1.m–Euro9.m
Improving execution time in Matlab
Some useful general rules:
I Eliminate redundant computations (e.g. precompute aconstant expression if it is used many times);
I Avoid for loops;
I Work directly on entire arrays or subarrays instead ofindividual array elements:
I supply array-valued arguments to Matlab functions;
I apply elementwise operations such as .* and .ˆ to arrays;
I exploit the colon notation to access subarrays: W(1:i).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEs
Computational Methods for Quantitative FinancePricing by Finite Difference Solution of PDEs
Christoph SchwabN. Hilber, Ch. Winter
Lecture 2
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Outline
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Setup
Consider the SDE
dXt = b(t,Xt)dt+ σ(t,Xt)dWt, X0 = x. (2.1)
Assume ∃K > 0 such that ∀x, y ∈ R, ∀0 ≤ t ≤ T(A1) |b(t, x)− b(t, y)|+ |σ(t, x)− σ(t, y)| ≤ K|x− y|(A2) |b(t, x)|+ |σ(t, x)| ≤ K(1 + |x|)(A3) the RV x is independent of the σ−algebra generated by W
and satisfies E[|x|2] <∞(A1)–(A3) ⇒ for any T ≥ 0 (2.1) admits an unique solution(Xt)0≤t≤T with the properties
I (Xt)0≤t≤T is t–continuous,
I (Xt)0≤t≤T is adapted to the filtration generated by x and W ,
I E[∫ T0 |Xt|2dt] <∞.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Setup
I Assume the risky underlying (Xt)0≤t≤T evolves according tothe SDE
dXt = b(t,Xt)dt+ σ(t,Xt)dWt, X0 = x.
I Assume r(t, x) is a bounded and continuous functionmodelling the riskless interest rate.
Objective: Compute the value of an option with payoff h(·) whichis the conditional expectation
Vt = u(t,Xt) = E[e−
R Tt r(s,Xt,x
s )dsh(Xt,xT )|Ft
], (2.2)
where Xt,xs is the solution of the SDE (2.1) starting from x at time
t.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Infinitesimal generator
Solution: characterize u(t, x) as solution of a partial differentialequation.
We need some auxiliary results.
Assume that σ, b in (2.1) are independent of t. Denote by A thedifferential operator
(Af)(x) =12σ2(x)f ′′(x) + b(x)f ′(x), (2.3)
acting on functions f ∈ C2.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Infinitesimal generator
Proposition
Assume that σ, b in (2.1) are independent of t. Then the process
Mt := f(Xt)−∫ t
0(Af)(Xs) ds (2.4)
is a martingale with respect to the filtration of Wt. In particular,for all t,
E[f(Xt)
]= f(x) + E
[∫ t
0Af(Xs)ds
]. (2.5)
Proof. Ito’s Lemma, stochastic integral w.r. to W is a martingale.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Infinitesimal generator
Based on this Proposition, we have
TheoremDenote by Xx
t the solution of the SDE (2.1) with initial conditionXx
0 = x. Then for any function f ∈ C2, the functiont→ E[f(Xx
t )] is continuously differentiable and
ddt
E[f(Xx
t )]|t=0 = (Af)(x)
with A as in (2.3)
RemarkThe operator A is called infinitesimal generator of the diffusionprocess Xx
t .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Prices of European contracts are moments of the price process Xxt
of the formu(x, t) = E
[e−
R t0 r(X
xs )dsh(Xx
t )]
(2.6)
where h(x) and r(x) are continuous functions of x ∈ R.
Such moments are solutions of deterministic PDEs, as thefollowing theorem, the so-called Feynman-Kac theorem, shows.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Feynman-Kac
TheoremLet u(x, t) ∈ C2,1(R× R+) be a solution of the parabolic Cauchyproblem
∂tu+Au− ru = 0 in R× R+
u(x, 0) = h(x) in R (2.7)
with A as in (2.3). Then u(x, t) can be represented as in (2.6), i.e.
u(x, t) = E[e−
R t0 r(X
xs )dsh(Xx
t )].
Viceversa, any u(x, t) as in (2.6) which is in C2,1(R× R+) solvesthe deterministic Fokker Planck equation (2.7).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
This result is still true in a multi-dimensional model and for thecase when the coefficient functions b, σ and the discounting factorc depend also on t.For p ∈ N consider the system of SDEs
dXkt = bk(t,Xt)dt+
p∑j=1
σkj(t,Xt)dWjt , 1 ≤ k ≤ n. (2.8)
Denote by A the operator
(Au)(x, t) =12
tr[σσ>D2u] + 〈b,∇u〉, (2.9)
where D2 = (∂xixj )1≤i,j≤n is the Hessian, σ = (σij)1≤i≤n,1≤j≤pand 〈·, ·〉 denotes the standard inner product in Rn.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Feynman-Kac (baskets)
Theorem(baskets)
(i) If (Xt)t≥0 is a solution of (2.8) and u(x, t) : Rn × R+ → Rhas bounded, second order derivatives in x and bounded firstorder derivatives in t and if r(t, x) : R+ × Rn → R is acontinuous, bounded function on R+ × Rn, then the process
Mt := e−R t0 r(s,Xs)dsu(Xt, t)
−∫ t
0e−
R s0 r(τ,Xτ )dτ (∂tu+Au− ru) (Xs, s)ds
is a martingale.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
(ii) Let u(x, t) ∈ C2,1(Rn × [0, T ]) be a solution of the parabolicCauchy problem
∂tu+Au− ru = 0 in Rn × R+
u(x, T ) = h(x) in Rn (2.10)
with A as in (2.9). Then u(x, t) can be represented as
u(x, t) = E[e−
R Tt r(s,Xt,x
s )dsh(Xt,xT )]. (2.11)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Application to the Black Scholes model
Assume for simplicity that no dividends are paid.Dynamics of risky underlying: Geometric Brownian motion
dSt = St(rdt+ σdWt), S0 = S (2.12)
i.e. we have b(S) = rS, σ(S) = σS. The infinitesimal generator Ais
A =: ABS =12σ2S2∂SS + rS∂S .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
The discounted price of a European contract with payoff h(S), i.e.
V (S, t) := E[e−r(T−t)h(ST ) | St = S],
is equal to a regular solution V (S, t) of the Black Scholes (BS)equation
∂tV +ABSV − rV = 0 in R+ × [0, T )V (S, T ) = h(S) in R+
, (2.13)
where
ABS =12σ2S2∂SS + rS∂S .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsOption prices as solutions of PDEs: Fokker-Planck equationFinite Difference method for the heat equation
Heat equation
By change of variables
y(x, τ) := e−αx−βτV (ex, T − 2τ/σ2), α, β ∈ R
the Black-Scholes equation can be transformed to the heatequation (see exercise):
∂τy − ∂xxy = 0 in R× (0, 1/2σ2T ]y(x, 0) = y0(x) in R
We first study finite difference method on this simple example.Boundary conditions If the equation is satisfied for x ∈ (a, b), weneed conditions at x = a and x = b, for all τ . Examples:
DefinitionThe consistency error Emi at (xi, τm) is the difference operator Emiwith ymi replaced by y(xi, τm) where y is the exact solution.
Note Consistency error measures the quality of the approximationof the differential operator by finite differences. A scheme is calledconsistent if its consistency error goes to zero as h, k → 0.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Consistency error
We want to estimate the consistency errors Emi in terms of meshwidth h and time step size k.
Proposition
If the exact solution y(x, τ) of the heat equation is sufficientlysmooth, then, for m = 1, ...,M − 1 and i = 1, ..., N , we have
|Emi | ≤ C(h2 + k) 0 ≤ θ ≤ 1 ,
|Emi | ≤ C(h2 + k2) θ =12.
where C depends on the exact solution y and its derivatives.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Discretization error
Define εm, the error vector at time τm:
εmi = y(xi, τm)− ymi , 1 ≤ i ≤ N, 0 ≤ m ≤M .
The error vectors εmMm=0 satisfy the difference equation
1k
B εm+1 − 1k
C εm = Em
or, in explicit form,
εm+1 = Aθ εm + kB−1Em
where Aθ ≡ B−1C is called amplification matrix.
Note: the scheme is convergent (in L∞(0, τmax;L2(a, b)) norm) ifsupm
√h‖εm‖l2 → 0 as h, k → 0.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Recall on matrix and vector norms
Let v = (v1, . . . , vN )> and M be an N ×N matrix. We define
‖v‖`2 := (v21 + · · ·+ v2
N )1/2
‖M‖2 := supv 6=0
‖Mv‖`2‖v‖`2
.
Remark If M is symmetric with eigenvalues λl, 1 ≤ l ≤ N , then
‖M‖2 = max1≤l≤N
|λl|.
Property For all v and M , we have ‖Mv‖`2 ≤ ‖M‖2‖v‖`2 .
Remark Let f be a function on (a, b) with f(a) = f(b) = 0, andlet f = (f1, . . . , fN ) be the vector of its values on the grid. Then
‖f‖2L2(a,b) =∫ b
af2(x)dx =
N∑i=0
∫ xi+1
xi
f2(x)dx ≈N∑i=1
f2i h = h‖f‖2`2 .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Consistency + Stability = Convergence
Proposition
For all M ∈ N, 1 ≤ m ≤M , holds
‖εm‖`2 ≤ ‖Aθ‖m2 ‖ε0‖`2 + km−1∑n=0
‖Aθ‖m−1−n2 ‖En‖`2 .
Corollary
If the stability condition ‖Aθ‖2 ≤ 1 holds then, as M →∞,N →∞, the FD scheme converges and, if ε0 = 0,
supm‖εm‖`2 ≤ τmax sup
m‖Em‖`2 .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability
When the stability condition ‖Aθ‖2 ≤ 1 is satisfied?
We need some auxiliary results.
LemmaThe eigenvalues of the tridiagonal matrix X ∈ RN×N :
X =
α β
γ α. . .
. . .. . . βγ α
.
are given by
λX` = α+ 2
√βγ cos
( `π
N + 1
), ` = 1, . . . , N.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability (cont.)
I Eigenvalues of B = I + θkh−2G are given by
λB` = 1+2θ
k
h2+2θ
k
h2cos( `π
N + 1
)= 1+4θ
k
h2sin2
( `π
2(N + 1)
)I Eigenvalues of C = I − (1− θ)kh−2G are given by
λC` = 1− 4(1− θ) k
h2sin2
( `π
2(N + 1)
)I Eigenvalues of Aθ = B−1C are given by
λAθ` =
λC`
λB`
=1− 4(1− θ) kh−2 sin2
( `π
2(N + 1)
)1 + 4θ kh−2 sin2
( `π
2(N + 1)
) .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability of the θ-scheme
‖Aθ‖2 ≤ 1 ⇐⇒ ∀l = 1, . . . , N, |λAθl | ≤ 1.
Denoting x` = 4kh−2 sin2(`π/2(N + 1)) ≥ 0 we can write
λAθl =
1− (1− θ)x`1 + θx`
= 1− x`1 + θx`
≤ 1.
It remains to check that λAθl ≥ −1, ∀l = 1, . . . , N .
Proposition
If 12 ≤ θ ≤ 1, the θ-scheme is stable for all k and h.
If 0 ≤ θ < 12 , the θ-scheme is stable if the CFL-condition holds:
k
h2≤ 1
2(1− 2θ).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Convergence of the θ-scheme
TheoremIf y(x, τ) is sufficiently smooth (y ∈ C4([a, b]× [0, τmax])), then
i) for 12 < θ ≤ 1 or for 0 ≤ θ < 1
2 and CFL-condition,
supm
h12 ‖εm‖`2 ≤ C(y)(h2 + k) ,
ii) for θ = 12 (Crank-Nicolson scheme),
supm
h12 ‖εm‖`2 ≤ C(y)(h2 + k2) .
Conclusion If the scheme is consistent and stable, then it isconvergent with the same order that the consistency error.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Black-Scholes equation in real price
Recall that in the BS model European option prices satisfy
∂V
∂t+
12σ2S2∂
2V
∂S2+ rS
∂V
∂S− rV = 0, in R+ × [0, T )
V (S, T ) = H(S), in R+
We denote
ABS V =12σ2S2∂
2V
∂S2+ rS
∂V
∂S.
I The coefficients of this Black-Scholes operator arenon-constant.
I The operator degenerates near S = 0.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Black-Scholes equation in log-price
To obtain a non-degenerate operator with constant coefficients, wechange to log-price:
x = logS.
It is also convenient to work with time to maturity instead of time:
τ = T − t.Define v(x, τ) := V (S, t) = V (ex, T − τ). Then v solves
∂τv −ABS−logv + rv = 0 in R× (0, T )
v(0, x) = H(ex) in R
where ABS−log denotes the BS operator in log-price:
ABS−logv =σ2
2∂2v
∂x2+(r − σ2
2
)∂v
∂x.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Initial condition
Terminal condition for V becomes initial conditions for v.
European call:
European put:
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Truncation of the domain
In the European case, v(x, τ) is defined for −∞ < x <∞.
For numerical solution, we truncate the domain to (−R,R):
∂τvR −ABS−logvR + rvR = 0 in (−R,R)× (0, T ),
vR(x, 0) = H(ex) |x| < R
We then need artificial boundary conditions at x = ±R.
The simplest choice are homogeneous Dirichlet conditions:
vR(±R, τ) = 0 0 < τ < T .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Estimation of the truncation error
Let us estimate the difference between v and vR.
TheoremAssume that the payoff function is bounded, i.e.
there exists M such that |H(ex)| ≤M ∀x ∈ R.
Then with µ := r − σ2
2 , for all x ∈ (−R+ |µ|τ,R− |µ|τ),
|v(x, τ)− vR(x, τ)| ≤ M
exp(− |R− |µ|τ − x|
2
2σ2τ
)+ exp
(− |R− |µ|τ + x|2
2σ2τ
)In particular, |v(x, τ)− vR(x, τ)| → 0 as R→∞.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Boundary layer
The error is large near the boundary:
We have to choose R much larger than the values x of interest.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Asymptotics of the solution
How to reduce the error near the boundary? We have to chooseboundary conditions accordingly to the asymptotics of the solution.
For European calls and puts, we have:
∀t, VC(S, t)|S=0 = 0, VP (S, t)|S→∞ = 0.
At the complementary sides, we use Call-Put parity:
S + VP − VC = Ke−r(T−t).
This implies, for all t:
VC(S, t) ≈ S −K e−r(T−t) S →∞ ,
VP (S, t) ≈ K e−r(T−t) − S S → 0.
Note Asymptotics for v(x, τ) may be obtained by change of variables.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Asymptotic boundary conditions
We obtain the following boundary conditions at Smin and Smax:
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Discretization
∂τvR −ABS−logvR + rvR = 0 in (−R,R)× (0, T ),
vR(x, 0) = H(ex) |x| < R
For N,M ∈ N define (equidistant) grid (xi, τm) in[−R,R]× [0, T ]:
I space grid with mesh width h: xi = −R+ ih, h = 2RN+1 ,
i = 0, . . . , N + 1I time grid with mesh width k: τm = mk, k = T
M ,m = 0, . . . ,M
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Discretization (cont.)
Discretize ABS−log by second order finite differences: Fori = 1, . . . , N
(ABS−logh v
)i=
12σ2
h2(vi−1−2vi+vi+1)+
(r− σ
2
2
)12h
(vi+1−vi−1),
where v(τ) = (v1(τ), . . . , vN (τ))> and vi(τ) is an approximationin space to vR(xi, τ). For simplicity, adopt homogeneous Dirichletboundary conditions:
v0(τ) = vN+1(τ) = 0.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Discretization (cont.)
Let Ah = ABS−logh − rI ∈ RN×N . Then (where ˙= ∂τ )
v = Ahv, v(0) = H(ex),
where x = (x1, . . . , xN )>.
This is a N ×N -system of ordinary differential equations.
To discretize it, use the θ-scheme. Let wm be an approximation tov(τm). We obtain
1k(wm+1 − wm) = Ah(θwm+1 + (1− θ)wm).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
θ-scheme for Black-Scholes equation
We obtain the following scheme:
Given w0 = H(ex) ∈ RN , for m = 0, . . . ,M − 1 find wm+1 ∈ RN
such that (I − kθAh
)wm+1 =
(I + k(1− θ)Ah
)wm,
where Ah is given by
Ah = tridiag(α−, β, α+),
with
α± =σ2
2h2± 1
2h
(r − σ2
2
), β = −σ
2
h2− r.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability analysis
Denote by λi,N < 0, 1 ≤ i ≤ N , the eigenvalues of Ah ∈ RN×N .The scheme is stable if the amplification factors
Ri(λi,Nk) := 1 +λi,Nk
1− θλi,Nk , 1 ≤ i ≤ N
satisfy|Ri(λi,Nk)| ≤ 1,∀i.
These inequalities always hold if 12 ≤ θ ≤ 1 (unconditionally
stable).
If, however, 0 ≤ θ < 12 , we must have the CFL-condition
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability analysis (cont.)
k ≤ −2λi,N (1− 2θ)
, 1 ≤ i ≤ N.
Since λN,N < · · · < λ1,N < 0, this is equivalent to
k ≤ −2λN,N (1− 2θ)
.
By Lemma 2.12 of the lecture notes we have
λN,N = −σ2
h2− r +
1h
√σ4
h2−(r − σ2
2
)2
cos(
Nπ
N + 1
).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability analysis (cont.)
We may estimate
λN,N ≥ −2σ2
h2− r
and obtain the CFL-condition
k ≤ 2h2
(1− 2θ)(2σ2 + rh2).
Example. θ = 0 (explicit Euler).Let T = 1, σ = 0.3, r = 0.05, R = 5, N = 500. Then
M ≥ T
k=
2(N + 1)2σ2 + 4R2r
8R2≈ 226
time steps are needed to fullfill the CFL-condition.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Stability of θ-scheme
Christoph Schwab Computational Methods for Quantitative Finance
Pricing by Finite Difference Solution of PDEsAnalysis of the Finite Difference methodFinite Difference solution of the Black-Scholes equation
Summary
θ CFL-condition Convergence Remark
0 k ≤ 2|λN,N | O(h2 + k) no linear system has to be solved
12 none O(h2 + k2) linear systems have to be solved
1 none O(h2 + k) linear systems have to be solved
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Computational Methods for Quantitative FinancePricing American options using Finite Difference method
Christoph SchwabN. Hilber, Ch. Winter
Lecture 4
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Outline
Pricing American options using Finite Difference methodBlack-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Assumption
Black-Scholes market, no dividends (δ = 0):
dSt = St(rdt+ σ dWt) t > 0 .
American options are options that can be exercised at any time upto the expiration date T . The problem of optimal exercising isequivalent to an optimal stopping problem: denote by Tt,T the setof all stopping times with values in the interval (t, T ). Then, withthe payoff H(S) = (S −K)+ (call) or H(S) = (K − S)+ (put),
V am(S, t) = supτ∈Tt,T
E[e−r(τ−t)H(Se(r−
σ2
2)(τ−t)+σ(Wτ−Wt))
].
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Basic properties of the Value V am(S, t) of an American contract(δ = 0):
V amC = V eur
C
V amP ≥ V eur
P
V amP (S, t) ≥ (K − S)+, V am
C (S, t) ≥ (S −K)+ .
As for the European vanilla, there is a close connection betweenthe probabilistic representation of the option’s value and adeterministic, PDE based representation of this value.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
American option as Free Boundary Problem
There exists a point Sf = Sf (t) such that
V amP (S, t) > (K − S)+ for S > Sf (t)V amP (S, t) = (K − S)+ for S ≤ Sf (t)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
American option as Free Boundary Problem (cont.)
A priori the boundary Sf (t) is not known. Therefore, the problemof calculating V am
P (S, t) for S > Sf (t) is called freeboundary-value problem and Sf (t) is called free boundary.
The free boundary Sf (t) separates R+ × [0, T ] into thecontinuation region (hold the option) and the stopping region(exercise the option).
As soon the price of the asset reaches Sf (t) the holder shouldexercise the option. The corresponding time instant τ is calledstopping time.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
American option as Free Boundary Problem (cont.)
Calculated free boundary for a put with maturity T = 1 and strikeK = 20.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
A simple obstacle problem
Let −1 < α < β < 1. Assume an obstacle ψ such that ψ(x) > 0for α < x < β, ψ ∈ C2, ψ′′ < 0.The obstacle problem reads: Find u ∈ C1[−1, 1] such that
u′′ = 0 (then u > ψ) for x ∈ (−1, α) ∪ (β, 1)
u = ψ (then u′′ = ψ′′ < 0) for x ∈ (α, β)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
A simple obstacle problem (cont.)
This manifests a complementarity in the sense
if u > ψ, then u′′ = 0if u = ψ, then u′′ < 0
The obstacle problem can be reformulated as: Find u ∈ C1[−1, 1]such that u(±1) = 0 and such that
−u′′ ≥ 0 in (−1, 1)u ≥ ψ in (−1, 1)
u′′(u− ψ) = 0 in (−1, 1)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Linear complementarity problem (LCP)
The finite difference discretization of the obstacle problemproceeds in the usual fashion:
−1 = x0 < x1 < . . . < xi < . . . < xN < xN+1 = 1
with
xi = −1 + i∆x, i = 0, 1, . . . , N + 1 , ∆x = 2/(N + 1),
yi ≈ u(xi) : y = (y1, . . . , yN )> ∈ RN .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Linear complementarity problem (LCP) (cont.)
We approximate the obstacle problem by the LCP
Ay ≥ b = 0
y ≥ ψ(Ay − b) · (y − ψ) = 0
where
A = tridiag(−1, 2,−1)
ψ =(ψ(x1), . . . , ψ(xN )
)>.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Projected Successive Over Relaxation (PSOR)
We solve the LCP by the projected SOR iteration:
Definition (Projected SOR/Cryer 1971)
Given y0 ≥ ψ, for k = 0, 1, 2, . . . , compute yk+1 from yk via:
i) for i = 1, . . . , n, do
yk+1i :=
1Aii
(bi −
i−1∑j=1
Aij yk+1j −
N∑j=i+1
Aij ykj
).
ii) yk+1i := max
(ψi, y
ki + ω(yk+1
i − yki ))
if ‖yk+1 − yk‖2 < ε stop; else: k → k + 1.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Remark1) if ii) is replaced by
yk+1i = yki + ω(yk+1
i − yki ) ,
then we get the classical SOR for the solution of Ay = b.
Step ii) ensures the inequality condition (y ≥ ψ).
2) 0 < ω < 2 is a relaxation parameter - the PSOR convergesfor all these ω. Convergence speed can be optimized for1 < ω < 2.
We turn back to American options.
In analogy to the simple obstacle problem, we have the followingTheorem.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
TheoremLet v(x, t) be a regular solution of the BS-inequality(g(x) := H(ex)):
∂tv +ABS−log v − rv ≤ 0, in R× (0, T ) ,
v(x, t) ≥ H(ex) =: g(x) in R× (0, T ) ,
(∂tv +ABS−log v − rv)(g − v) = 0, in R× (0, T ) ,
v(x, T ) = g(x) in R .
ThenV am(S, t) = v(logS, t) .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
To prepare the FD discretization, we truncate the domain: werestrict x ∈ R to |x| < R <∞, where R is a truncation parameter,and ΩR = (−R,R). Then vR(x, t) solves
∂tvR +ABS−logvR − rvR ≤ 0 in ΩR × (0, T )
vR ≥ g in ΩR × (0, T )
(vR − g)(∂tvR +ABS−logvR − rvR) = 0 in ΩR × (0, T )
vR(x, T ) = g(x) in ΩR
∂xvR(±R, t) = 0 in (0, T )
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
As in the European case, we choose the time step ∆t = k = TM ,
and the space step ∆x = h = 2RN+1 .
Then
tm = mk, xi = −R+ ih, i = 0, . . . , N + 1, k = 0, . . . ,M.
The vector of approximate option prices at time level m is
w = (w1, . . . , wN )>; we expect that w(m)i ∼ v(xi, tm).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Applying the FD discretization in space and the θ-scheme in timeyields the following sequence of Matrix Inequality Problems:
w(M) = gh
:=(g(x1), . . . , g(xN )
)>.
For m = M − 1, . . . , 0: find w(m) ∈ RN s.t.
w(m+1) − w(m) + k[θAhw
(m) + (1− θ) Ahw(m+1)
]≤ 0
w(m) ≥ gh(
w(m+1) − w(m) + k[θAhw
(m) + (1− θ) Ahw(m+1)
])·(w(m) − g
h) = 0 .
Note: the problem is posed in real time t rather than in time tomaturity τ , hence the time-stepping is backward in time.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Here, as in the European case
Ah := ABS−logh − rI,
where, due to homogeneous Neumann boundary conditions
0 = ∂xvR(±R, t)
=1
2h(± 3vR(±R, t)∓ 4vR(±R∓ h)± vR(±R∓ 2h, t)
)+O(h2)
the tridiagonal matrix ABS−logh ∈ RN×N is given by
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
ABS−logh =
β+4
3α− α+−1
3α−
α− β α+
α−. . .
. . .. . . β α+
α−−13α
+ β+43α
+
with
β = −σ2
h2, α± =
σ2
2h2± 1
2h
(r − σ2
2
).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
We write the matrix inequality problem succinctly asLinear Complementarity Problem (LCP):
Ay ≥ b
y ≥ g
(y − g) · (Ay − b) = 0
where
A := 1− kθAh, y = w(m), b = (1 + k(1− θ)Ah)w(m+1)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Transformation to normal form
With the same transformation that we used in the European case,the problem transforms as follows: the exercise condition
V amP (S, t) ≥ (K − S)+ = K max1− ex, 0
becomes (where q := 2rσ2 )
y(x, τ) ≥ e 12(q−1)x+ 1
4(q+1)2τ max1− ex, 0
= e14(q+1)2τ max
e
12(q−1)x − e 1
2(q+1)x, 0
=: ψ(x, τ) .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Hence, the problem becomes (with R > 0 sufficiently large and
J := (0, σ2T2 )):
Find y(·, τ) ∈ C1(−R,R) such that
∂τy − ∂xxy ≥ 0 in (−R,R)× Jy ≥ ψ in (−R,R)× J
(y − ψ)(∂τy − ∂xxy) = 0 in (−R,R)× Jy(x, 0) = ψ(x, 0) in (−R,R)
y(±R, τ) = ψ(±R, τ) in J
RemarkThe condition y ∈ C1 is called smooth fit or smooth pastingcondition.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Inserting finite differences in the parabolic variational inequality(assumed to hold pointwise), we get at each time level the linearsystem of algebraic inequalities for the unknown values
y(m)i ≈ y(xi, τm) at the nodes (xi, τm):
y(m+1)i −λθ(y(m+1)
i+1 − 2y(m+1)i + y
(m+1)i−1
)− y
(m)i −λ(1− θ)(y(m)
i+1 − 2y(m)i + y
(m)i−1
) ≥ 0,
with
λ :=∆t
∆x2=
k
h2.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
This is equivalent to the following LCP: Given
y(0) = ψ(0) =(ψ(x1, 0), . . . , ψ(xN , 0)
)> ∈ RN ,
for m = 0, . . . ,M − 1, find y(m+1) ∈ RN such that
Ah,ky(m+1) ≥ b(m)
y(m+1) ≥ ψ(m+1)(Ah,ky
(m+1) − b(m)) · (y(m+1) − ψ(m+1))
= 0
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
We focus now on the matrix LCP obtained from the discretizationof the BS inequality, i.e.
Ay ≥ b
y ≥ ψ
(y − ψ) · (Ay − b) = 0
where inequalities between vectors are to be read componentwise.
Assume that A is SPD (symmetric positive definite):
RN×N 3 A = A> and ∃γ > 0 : ∀x ∈ RN : x>Ax ≥ γx>x.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
It is useful to rewrite the LCP into the following standard form:Put
x := y − ψ, b := b−Aψ, z := Ay − b.Then
x ≥ 0, z = Ax− b ≥ 0, x · z = 0 .
This LCP is equivalent to
x = arg miny∈RN+
12y>Ay − b>y
.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
Generalized Cryer algorithm
Let H ∈ RN×N be any symmetric positive definite matrix and letC ∈ RN×N be any invertible matrix.
Consider the minimization problem
minuu>Hu− 2f>u subject to Cu ≥ 0 element-wise,
which corresponds to the LCP
Find u ∈ RN such that Cu ≥ 0
C−>(Hu− f) ≥ 0
u>(Hu− f) = 0.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
We solve this LCP approximately by the Cryer algorithm
Algorithm
(Cryer) Choose ω ∈ (0, 2). Set si := C−1ei, i = 1, . . . , N .0) Choose a starting vector u0 with Cu0 ≥ 0.1) For k = 1, . . . do (until convergence):
1.1) Set uk0 := uk−1.1.2) For i = 1, . . . , N do:
1.2.1) Set rki = (s>i Hsi)−1s>i[f −Huki−1
]si.
1.2.2) Choose the maximal ωki with ωki ≤ ω,such that C(uki−1 + ωki r
ki ) ≥ 0.
1.2.3) Set uki = uki−1 + ωki rki .
1.3) Next i.1.4) Set uk := ukN .
2) Next k.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing American options using Finite Difference method
Black-Scholes Variational InequalityDomain truncationFinite Difference discretizationSolution of matrix linear complementarity problems (LCPs)
TheoremUnder the above assumptions, the Generalized Cryer Algorithmconverges to the solution of the minimization problem.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference method
Computational Methods for Quantitative FinanceFinite Difference methods for barrier and Asian contracts
Prof. Ch. SchwabN. Hilber, Ch. Winter
Lecture 5
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Outline
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Barrier options differ from vanillas in the sense that the optioncontract is triggered if the price of the underlying hits some barrier,S = B, say, during [0, T ].
To be more specific, consider a contract which pays a specifiedamount at maturity T provided during 0 ≤ t ≤ T the price St doesnot cross a specified barrier B > 0 either from above (‘down-and-out’ barrier option) or from below (‘up-and-out’ barrieroption).
If the barrier is crossed before T , the option expires worthless(‘out’ barrier option). We assume here for convenience that B isconstant.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
The 4 standard ‘out’ barrier options on a risky asset are
1. down-and-out call with terminal payoff (ST −K)+ with valueV Cdo(K,B, T ;S, t) at spot price S and time t,
2. down-and-out put with terminal payoff (K − ST )+ and withvalue V P
do(K,B, T ;S, t),
3. up-and-out put with terminal payoff (K − ST )+ and withvalue V P
uo(K,B, T ;S, t),
4. up-and-out call with terminal payoff (ST −K)+ and withvalue V C
uo(K,B, T ;S, t).
An “in” barrier option becomes the corresponding European vanillawhen the barrier B is crossed at time t ∈ (0, T ). E.g., theup-and-in call becomes the European call when B is crossed frombelow; we denote its price at spot S and time t byV Cui (K,B, T ;S, t).
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
A European plain vanilla option pays the same at T as adown-and-out plus an up-and-in with the same barrier B and ofthe same type (call/put) as the plain vanilla. The standard noarbitrage consideration shows that pricing an “in” barrier reducesto pricing the corresponding “out” barrier contract and a plainEuropean vanilla, i.e.
V Cdi (K,B, T ;S, t) = V C(K,T ;S, t)− V C
do(K,B, T ;S, t)
V Cui (K,B, T ;S, t) = V C(K,T ;S, t)− V C
uo(K,B, T ;S, t).(5.1)
Analogous identities hold for values of the other barrier contracts,too.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Out-Barrier
Assume that the riskless rate r > 0 is independent of t. Inlog-price x = logS, g(x) = (ex −K)+ = f(ex) is the terminalpayoff of a down-and-out call with barrier B = 1 for convenience(general B will be dealt with below). Let
v(x, t) = V Cdo(K, 1, T ;S, t)|x=logS
be the price of the down-and-out barrier call at t < T and at spotS > B = 1. Then,
v(x, t) = E[er(t−T )g(XT )1τ0>T|Xt = x
]where τ0 is the hitting time of (−∞, 0] = (−∞, logB] by theprocess Xt.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Consequently, v(x, t) is the solution of the BS equation in log-price
∂tv +ABS−logv − rv = 0 in (0,∞)× (0, T )v(0, t) = 0 in (0, T )v(x, T ) = g(x) in (0,∞)
In real price S and for a general barrier B > 0,V (S, t) = V C
do(K,B, T ;S, t) satisfies
V Cdo(K,B, T ;S, t) = E
[er(t−T )f(ST )1τB>T|St = S
]where τB is the first hitting time of [0, B] by the process St.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Therefore, V (S, t) = V Cdo(K,B, T ;S, t) is solution of the
deterministic BS equation
∂tV +ABSV − rV = 0 in (B,∞)× (0, T )V (B, t) = 0 in (0, T )V (S, T ) = f(S) in (B,∞)
(5.2)
As St →∞, the probability that St ≤ B gets small, so we expectfor 0 < t < T that
V (S, t) ∼ S as S →∞ . (5.3)
The above equations specify V (S, t) completely, and can be solvedapproximately with the FD methods of the previous sections.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
In-Barriers
“In”-barriers become worthless unless St reaches B before T . If Stcrosses B before T , then the barrier option becomes a plain vanillawith identical payoff.
To derive the BS equations for “in” barrier contracts, we considera down-and-in European call and denote by C(S, t) a Europeanvanilla call with same K,T as the ‘down-and-in’ barrier call.
Since the BS equations are linear, we apply the principle ofsuperposition and use (5.1) to derive the BS equations for the “in”barrier.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
We get for V (S, t) = V Cdi (K,B, T ;S, t) the BS PDE
∂tV +ABSV − rV = 0 (B,∞)× (0, T ),
and, by (5.1) and (5.3)
V (S, t)→ 0 as S →∞ .
Finally, again by (5.1) and superposition, we get the terminalcondition
V (S, T ) = 0 in (B,∞)
If S(t) = B for some t < T , then V Cdo(B, t) = 0 yields in (5.1)
V (B, t) = C(B, t) .
Therefore, we must only solve BS (5.2) for S > B.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
European Average Strikes
Asians are path-dependent: their payoffs depend on price history.Consider a European contract with payoff depending on S and on
T∫0
ϕ(S(τ), τ)dτ,
where ϕ is a given function of S, t. E.g. an average strike call haspayoff function
f(S, T ) =
(S − 1
T
∫ T
0S(τ)dτ
)+
.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
To get the PDE for Asians, we introduce the new variable
I(t) :=
t∫0
ϕ(S(τ), τ)dτ . (5.4)
Since the history of the asset price is independent of the currentprice we may treat S(t), I(t) and t as independent variables. Thevalue of an Asian will then be searched in the form V (S, I, t). Toderive a PDE for V , we need a SDE for I(t). Formally, for smalldt > 0,
I(t+ dt) = I + dI =
t+dt∫0
ϕ(S(τ), τ)dτ
=
t∫0
ϕ(S(τ), τ)dτ + ϕ(S(t), t)dt+O(dt) ,
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
hence, as dt→ 0, we get the deterministic equation:
dI = ϕ(S, t)dt .
Note that the vector process (S(t), I(t)) is a diffusion. In fact, forϕ(S, t) = S
dS(t) = r S(t)dt+ σ S(t) dWt ,
dI(t) = S(t)dt .
The infinitesimal generator AAS of this diffusion is given by
AASV =σ2
2S2∂2
SS V + r S∂SV + ϕ(S, t)∂IV.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Applying Ito’s lemma to V (S, I, t) gives the relation
dV = σS∂SV dW +(σ2
2S2∂2
SSV +rS∂SV +∂tV +ϕ(S, t)∂IV)
dt .
No-arbitrage arguments lead to the following PDE for V (S, I, t):
LASV := ∂tV+ϕ(S, t)∂IV+σ2
2S2∂2
SSV+rS∂SV−rV = 0 . (5.5)
The terminal condition is, for the average strike,
V (S, I, T ) = (S − I/T )+ =: f(S, I) ;
the boundary conditions in S are as for the BS case.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
American Average Strikes
Denoting by LAS the operator in (5.5), we find for the value ofAmerican-Asian style contracts the parabolic differential inequality:
LAS V ≤ 0
and the constraint
V (S, I, t) ≥ f(S, I, t) = (S − I/t)+ , 0 < t < T
for the American average strike call. Also, the complementaritycondition
(V − f) · LAS V = 0
must hold, and we have the final condition
V (S, I, T ) = f(S, I, T ) .
The above equations/inequalities specify the value of the Americanaverage strike call.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Similarity Reduction
In many cases, the bivariate PDE (5.5) can be reduced to aunivariate one the numerical solution of which is less costly. Forillustration, consider the average strike European call:
LAS V = 0, V (S, I, T ) = (S − I/T )+, I(t) =
t∫0
S(τ)dτ .
Writing
f(S, I, T ) = (S − I/T )+ = Smax(
1− 1ST
T∫0
S(τ)dτ, 0),
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
and changing the variables
R :=1S
t∫0
S(τ)dτ =I
S,
we get the pay-off Smax(1−R/T, 0).
Making the Ansatz V (S, I, t) = SH(R, t), we find from LASV = 0that H must satisfy the PDE
∂tH +σ2
2R2∂2
RRH + (1− rR)∂RH = 0, 0 < t < T (5.6)
with terminal condition
H(R, T ) = (1−R/T )+ .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
For the boundary conditions at R = 0, R→∞, we get (exercise)
∂tH + ∂RH = 0 at R = 0, 0 < t < T ,
H(R, t) = 0 as R→∞ .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
FD Discretization
We solve (5.6) by Finite-Difference time-stepping from T = M∆tto t = 0, with ∆t = T/M , and truncate 0 ≤ R <∞ to0 ≤ R ≤ Rmax = N∆R.
Let tm = m∆t, Rn = n∆R, m = M, . . . , 0, n = 0, . . . , N . We useFinite Differences with Hm
n ∼ H(Rn, tm). Recall (for f ∈ C4, withfn := f(xn)):
f ′(xn) =1h
(fn+1 − fn
)+O(h) := (δxf)n +O(h)
f ′(xn) =1
2h(− fn+2 + 4fn+1 − 3fn
)+O(h2) := (δ+x f)n +O(h2)
f ′′(xn) =1h2
(fn+1 − 2fn − fn−2
)+O(h2) := (δ2xxf)n +O(h2)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
We get from (5.6), i.e.
∂tH +σ2
2R2∂2
RRH + (1− rR)∂RH = 0 ,
the FD-approximation
Emn := (δtH)mn + θ
[σ2
2(n∆R)2(δ2RRH)mn + (1− rn∆R)(δ+RH)mn
]+(1− θ)
[σ2
2(n∆R)2(δ2RRH)m+1
n + (1− rn∆R)(δ+RH)m+1n
]= 0 .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
The boundary condition H(R, t) = 0 as R→∞ becomes
HmN = 0 0 ≤ m ≤M .
The boundary condition
∂tH + ∂RH = 0, at R = 0, 0 < t < T
is automatically satisfied by the scheme Emn = 0 at n = 0.
The terminal condition H(R, T ) = (1−R/T )+ becomes
HMn = (1− n∆R/T )+, 0 ≤ n ≤ N .
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
Summary
Consider the price V of an ‘average strike’ call option with pay-off
max(S − 1
T
∫ T
0S(τ)dτ , 0
).
The similarity reduction allows to express the value V of the optionas V (S, I, t) = SH(R, t), R = I/S, with H solving
∂tH +σ2
2R2∂2
RRH + (1− rR)∂RH = 0
H(R, T ) = (1−R/T )+∂tH + ∂RH = 0 at R = 0
H(R, t) = 0 as R→∞ .
(5.7)
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
We restrict (5.7) to (0, Rmax) with Rmax > 0 sufficiently large,take ∆t = T/M and ∆R = Rmax/N with M,N ∈ N, anddiscretize (5.7) by Finite Differences and obtain
Emn = 0HMn = (1− n∆R/T )+, 0 ≤ n ≤ N,
HmN = 0, 0 ≤ m ≤M .
(5.8)
Problem (5.8) reads in matrix form: Given HM = HMn Nn=0, for
m = M − 1, . . . , 0 find Hm = Hmn Nn=0 such that
AHm = BHm+1.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
The matrices A and B having the following band structure
A =
B0 C0 D0 0 0 . . . 0A1 B1 C1 D1 0 0
0 A2 B2 C2 D2...
0 0. . .
. . .. . .
. . . 0... AN−2 BN−2 CN−2 DN−2
0 0 AN−1 BN−1 CN−1
0 . . . 0 0 0 AN BN
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
B =
b0 c0 d0 0 0 . . . 0a1 b1 c1 d1 0 0
0 a2 b2 c2 d2...
0 0. . .
. . .. . .
. . . 0... aN−2 bN−2 cN−2 dN−2
0 0 aN−1 bN−1 cN−1
0 . . . 0 0 0 aN bN
,
where
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
An = −σ2
2θn2∆t
Bn = 1 +(σ2n2 +
3(1− r∆Rn)2∆R
)θ∆t
Cn =(− σ2
2n2 − 2
1− r∆Rn∆R
)θ∆t
Dn =1− r∆Rn
2∆Rθ∆t
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
and
an =σ2
2(1− θ)n2∆t
bn = 1−(σ2n2 +
3(1− r∆Rn)2∆R
)(1− θ)∆t
cn =(σ2
2n2 − 2
1− r∆Rn∆R
)(1− θ)∆t
dn = −1− r∆Rn2∆R
(1− θ)∆t.
Christoph Schwab Computational Methods for Quantitative Finance
Pricing barrier and Asian contracts by Finite Difference methodBarrier OptionsAsian OptionsMatlab implementation
function H = asian(N,M,Rmax)
sigma = 0.8; r = 0.05; T = 0.5; % model parameters
A = spdiags([A_vec B_vec C_vec D_vec], -1:2, N+1, N+1);
B = spdiags([a_vec b_vec c_vec d_vec], -1:2, N+1, N+1);
H = max(1-[0:N]’*dR/T, 0); % terminal condition, payoff
while T > 0
T = T - dt; H = A\(B*H); % solve linear system AH^m = BH^m+1
end
plot([0:dR:Rmax], H);
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Computational Methods for Quantitative FinancePricing by Finite Element Methods
Prof. Ch. SchwabN. Hilber, Ch. Winter
Lecture 6
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
Outline
The idea of finite element methodsVariational formulationGalerkin discretization
Variational formulation of parabolic problemsGeneral frameworkExamples
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
Problem to solve: (here, A is a linear differential operator)
∂u
∂t−Au = f in (0, T )× Iu(x, 0) = u0(x) in I
Multiply by a test function v(x) and integrate on I: Denote(u, v) :=
∫I uv and a(u, v) := −(Au, v) (bilinear form).
Variational formulation: Find u ∈ L2(0, T ;V ) ∩H1(0, T ;V ∗) suchthat
ddt
(u(t), v) + a(u(t), v) = (f(t), v) in (0, T ), ∀ v ∈ V ,u(0) = u0,
where V is some space of test functions.
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
Example: heat equation
∂u
∂t− ∂2u
∂x2= f in (0, T )× I
u(x, 0) = u0(x) in I
Let v be a differentiable function on I such that v = 0 on ∂I.
We have Au = ∂2u∂x2 , hence
a(u, v) = −∫I
∂2u
∂x2(x)v(x)dx =
∫I
∂u
∂x(x)
∂v
∂x(x)dx.
Note: here, u may be less regular than in the original equation.The variational formulation is a weak formulation.
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
Let V N be a finite (N) dimensional subspace of V .
Example: V N is the space of piecewise linear, continuous functionson a mesh T on I.
The idea is to approximate u(t, ·) by an element uN (t) of V N .The variational formulation is approximated by
ddt
(uN (t), vN ) + a(uN (t), vN ) = (f(t), vN ) in (0, T ), ∀ vN ∈ V N .
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
Let (bj)j=1,...,N be a basis of V N . For example:
. . .
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
Variational formulationGalerkin discretization
We have uN (t, x) =∑N
j=1 uNj (t)bj(x) where
uN (t) = (uN1 (t), uN2 (t), . . . , uNN (t))>
is a vector of unknown functions. Similarly,
∀vN ∈ V N , vN (x) =N∑j=1
vNj bj(x).
As vN is arbitrary, the variational equation gives
ddt
MuN (t) + AuN (t) = fN (t) in (0, T ),
where M and A are N ×N matrices with Mij = (bi, bj),Aij = a(bj , bi), and fN is a vector with fNj = (f, bj).
This is a system of ordinary differential equations that can besolved using some discretization in time (e.g., explicit, implicit, orCrank-Nicolson scheme).
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
General frameworkExamples
Outline
The idea of finite element methodsVariational formulationGalerkin discretization
Variational formulation of parabolic problemsGeneral frameworkExamples
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
General frameworkExamples
Recall that we consider the following problem:
∂u
∂t−Au = f in (0, T )× I
u(x, 0) = u0(x) in I
and its variational formulation:
ddt
(u(t), v) + a(u(t), v) = (f(t), v) in (0, T ), ∀ v ∈ V ,u(0) = u0.
I What are the conditions on the operator A, initial condition u0,right-hand side f , and the space of test functions V for thisproblem to have a unique solution?
I What is the regularity of this solution?
The answers are given in a general framework of Hilbert spaces.
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
General frameworkExamples
Recall on Hilbert spaces
• Hilbert space: vector space H with scalar (= inner) product (u, v).Example: H = L2(I), (u, v) =
∫I u(x)v(x)dx.
• If X is a vector space, X∗ denotes the space of continuous linearfunctionals on X (dual space):
f ∈ X∗ is a continuous linear mapping from X to R.
If x ∈ X and f ∈ X∗, we denote f(x) = 〈f, x〉 (dual pairing).
• If H is a Hilbert space, H∗ may be identified with H:
f ∈ H∗ ⇐⇒ ∃ l ∈ H : ∀x ∈ H, 〈f, x〉 = (l, x).
We identify f with l and write H ∼= H∗.
Christoph Schwab Computational Methods for Quantitative Finance
The idea of finite element methodsVariational formulation of parabolic problems
General frameworkExamples
Weak derivatives
Note: if u is smooth, then ∀φ ∈ C∞0 (I),∫Iuφ′ = −
∫Iu′φ (integration by parts).
Definition: g is called the weak derivative of u on I if, ∀φ ∈ C∞0 (I),∫Iuφ′ = −
∫Igφ (we write g = u′).
Remark: this expression is valid if u and g are (locally) integrable. Wecan generalize the definition to linear functionals on C∞0 (I):