0% found this document useful (0 votes)
115 views51 pages

Interest Rate Modelling

Uploaded by

andrii.kulishov
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)
115 views51 pages

Interest Rate Modelling

Uploaded by

andrii.kulishov
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
You are on page 1/ 51

Interest Rate Modelling and Derivative Pricing

Sebastian Schlenkrich

HU Berlin, Department of Mathematics

WS, 2019/20
Part VII

Sensitivity Calculation

p. 463
Outline

Introduction to Sensitivity Calculation

Finite Difference Approximation for Sensitivities

Differentiation and Calibration

A brief Introduction to Algorithmic Differentiation

p. 464
Outline

Introduction to Sensitivity Calculation

Finite Difference Approximation for Sensitivities

Differentiation and Calibration

A brief Introduction to Algorithmic Differentiation

p. 465
Why do we need sensitivities?

Consider a (differentiable) pricing model V = V (p) based on some input


parameter p. Sensitivity of V w.r.t. changes in p is
dV (p)
V ′ (p) = .
dp

◮ Hedging and risk management.

◮ Market risk measurement.

◮ Many more applications for accounting, regulatory reporting, ...

Sensitivity calculation is a crucial function for banks and financial institutions.

p. 466
Derivative pricing is based on hedging and risk replication
Recall fundamental derivative replication result

V (t) = V (t, X (t)) = φ(t)⊤ X (t) for all t ∈ [0, T ],

◮ V (t) price of a contingent claim,


◮ φ(t) permissible trading strategy,
◮ X (t) assets in our market.
How do we find the trading strategy?

Consider portfolio π(t) = V (t, X (t)) − φ(t)⊤ X (t) and apply Ito’s lemma

dπ(t) = µπ · dt + [∇X π(t)]⊤ · σX⊤ dW (t).


From replication property follows dπ(t) = 0 for all t ∈ [0, T ]. Thus, in
particular
0 = ∇X π(t) = ∇X V (t, X (t)) − φ(t).
This gives Delta-hedge
φ(t) = ∇X V (t, X (t)).

p. 467
Market risk calculation relies on accurate sensitivities
Consider portfolio value π(t), time horizon ∆t and returns

∆π(t) = π(t) − π(t − ∆t).

Market risk measure Value at Risk (VaR) is the lower quantile q of distribution of
portfolio returns ∆π(t) given a confidence level 1 − α, formally

VaRα = inf {q s.t. P {∆π(t) ≤ q | π(t)} > α} .

Delta-Gamma VaR calculation method consideres π(t) = π (X (t)) in terms of risk


factors X (t) and approximates

1
∆π ≈ [∇X π (X )]⊤ ∆X + ∆X ⊤ [HX π (X )] ∆X .
2

◮ VaR is calculated based on joint distribution of risk factor returns


∆X = X (t + ∆t) − X (t) and sensitivities ∇X π (gradient ) and HX π (Hessian).
◮ Bank portfolio π may consist of linear instruments (e.g. swaps), Vanilla options
(e.g. European swaptions) and exotic instruments (e.g. Bermudans).
◮ Common interest rate risk factors are FRA rates, par swap rates, ATM
volatilities.
p. 468
Sensitivity specification needs to take into account data
flow and dependencies

Depending on context, risk factors can be market parameters or model


parameters.
p. 469
In practice, sensitivities are scaled relative to pre-defined
risk factor shifts

Scaled sensitivity ∆V becomes


dV (p)
∆V = · ∆p ≈ V (p + ∆p) − V (p).
dp
Typical scaling (or risk factor shift sizes) ∆p are
◮ 1bp for interest rate shifts,
◮ 1bp for implied normal volatilities,
◮ 1% for implied lognormal or shifted lognormal volatilities.

p. 470
Par rate Delta and Gamma are sensitivity w.r.t. changes in
market rates I

Bucketed Delta and Gamma


Let R̄ = [Rk ]k=1,...q be the list of market quotes defining the inputs of a yield curve.
The bucketed par rate delta of an instrument with model price V = V (R̄) is the vector
 
∂V ∂V
∆R = 1bp · ,..., .
∂R1 ∂Rq

Bucketed Gamma is calculated as


 
∂2V ∂2V
ΓR = [1bp]2 · 2
,..., .
∂R1 ∂Rq2

◮ For multiple projection and discounting yield curves, sensitivities are calculated
for each curve individually.

p. 471
Par rate Delta and Gamma are sensitivity w.r.t. changes in
market rates II

Parallel Delta and Gamma


Parallel Delta and Gamma represent sensitivities w.r.t. simultanous shifts of all market
rates of a yield curve. With 1 = [1, . . . 1]⊤ we get

X ∂V V (R̄ + 1bp · 1) − V (R̄ − 1bp · 1)


¯ R = 1⊤ ∆R = 1bp ·
∆ ≈ and
∂Rk 2
k

X ∂2V
Γ̄R = 1⊤ ΓR = [1bp]2 · ≈ V (R̄ + 1bp · 1) − 2V (R̄) + V (R̄ − 1bp · 1).
∂Rk2
k

p. 472
Vega is the sensitivity w.r.t. changes in market volatilities

BucketedATM
 Normal Volatility Vega
k,l
Denote σ̄ = σN the matrix of market-implied At-the-money normal volatilites for
expiries k = 1, . . . , q and swap terms l = 1, . . . , r . Bucketed ATM Normal Volatility
Vega of an instrument with model price V = V (σ̄) is specified as
 
∂V
Vega = 1bp · k,l
.
∂σN k=1,...,q, l=1,...,r

Parallel ATM Normal Volatility Vega


Parallel ATM Normal Volatility Vega represents sensitivity w.r.t. a parallel shift in the
implied ATM swaption volatility surface. That is

X ∂V V (σ̄ + 1bp · 1 1⊤ ) − V (σ̄ − 1bp · 1 1⊤ )


Vega = 1bp·1⊤ [Vega] 1 = 1bp· k,l
≈ .
∂σN 2
k,l

◮ Volatility smile sensitivities are often specified in terms of Vanilla model


parameter sensitivities.

p. 473
Outline

Introduction to Sensitivity Calculation

Finite Difference Approximation for Sensitivities

Differentiation and Calibration

A brief Introduction to Algorithmic Differentiation

p. 474
Crutial part of sensitivity calculation is evaluation or
approximation of partial derivatives
Consider again general pricing function V = V (p) in terms of a scalar
parameter p. Assume differentiability of V w.r.t. p and sensitivity
dV (p)
∆V = · ∆p.
dp

Finite Difference Approximation


Finite difference approximation with step size h is
dV (p) V (p + h) − V (p) dV (p) V (p) − V (p − h)
≈ or ≈ (one-sided), or
dp h dp h
dV (p) V (p + h) − V (p − h)
≈ (two-sided).
dp 2h

◮ Simple to implement and calculate (only pricing function evaluation).


◮ Typically for black-box pricing functions.

p. 475
We do a case study for European swaption Vega I
Recall pricing function
 p 
V Swpt = Ann(t) · Bachelier S(t), K , σ T − t, φ

with
  φ [F − K ]
Bachelier (F , K , ν, φ) = ν · Φ (h) · h + Φ′ (h) , h= .
ν
First, analyse Bachelier formula. We get
h i
d Bachelier (ν)  dh dh
Bachelier (ν) = + ν Φ′ (h) h + Φ (h) − Φ′ (h) h
dν ν dν dν
Bachelier (ν) dh
= + νΦ (h) .
ν dν

dh
With dν
= − νh follows

d
Bachelier (ν) = Φ (h) · h + Φ′ (h) − Φ (h) · h = Φ′ (h) .

p. 476
We do a case study for European swaption Vega II

Moreover, second derivative (Volga) becomes

d2 dh h2 ′
Bachelier (ν) = −hΦ′ (h) = Φ (h) .
dν 2 dν ν

This gives for ATM options with h = 0 that


◮ d2
Volga dν 2
Bachelier (ν) = 0.
◮ ATM option price is approximately linear in volatility ν.
Differentiating once again yields (we skip details)

d3  h2
3
Bachelier (ν) = h2 − 3 2 Φ′ (h) .
dν ν

It turns out that Volga has a maximum at moneyness



h = ± 3.

p. 477
We do a case study for European swaption Vega III

Swaption Vega becomes

d Swpt d p
V = Ann(t) · Bachelier (ν) · T − t.
dσ dν

Test case
◮ Rates flat at 5%, implied normal volatilities flat at 100bp.
◮ 10y into 10y European payer swaption (call on swap rate).
√ √
◮ Strike at 5% + 100bp · 10y · 3 = 10.48% (maximizing Volga).

p. 478
What is the problem with finite difference approximation? I

◮ There is a non-trivial trade-off between convergence and numerical accuracy.


◮ We have analytical Vega formula from Bachelier formula and implied normal
volatility p
Vega = Ann(t) · Φ′ (h) · T − t.

◮ Compare one-sided (upward and downward) and two-sided finite difference


approximation VegaFD using
◮ Bachelier formula,
◮ Analytical Hull-White coupon bond option formula,
◮ Hull-White model via PDE solver (Crank-Nicolson, 101 grid points, 3
stdDevs wide, 1m time stepping),
◮ Hull-White model via density integration (C 2 -spline exact with break-even
point, 101 grid points, 5 stdDevs wide).
◮ Compare absolute relative error (for all finite difference approximations)

VegaFD
|RelErr| = −1
Vega

p. 479
What is the problem with finite difference approximation?
II

Optimal choice of FD step size h is very problem-specific and depends on


discretisation of numerical method.

p. 480
Outline

Introduction to Sensitivity Calculation

Finite Difference Approximation for Sensitivities

Differentiation and Calibration

A brief Introduction to Algorithmic Differentiation

p. 481
Derivative pricing usually involves model calibration
Consider swap pricing function V Swap as a function of yield curve model parameters z,
i.e.
V Swap = V Swap (z).
Model parameters z are itself derived from market quotes R for par swaps and FRAs.
That is
z = z(R).

This gives mapping


R 7→ z 7→ V Swap = V Swap (z(R)) .
Interest rate Delta becomes

dV Swap dz
∆R = 1bp · (z(R)) · (R) .
dz dR
| {z } | {z }
Pricing Calibration

◮ Suppose a large portfolio of swaps:


◮ Calibration Jacobian dz(R)
dR
is the same for all swaps in portfolio.
◮ Save computational effort by pre-calculating and storing Jacobian.
◮ Brute-force finite difference approximation of Jacobian may become inaccurate
due to numerical scheme for calibration/optimisation.

p. 482
Can we calculate calibration Jacobian more efficiently?
Theorem (Implicit Function Theorem)
Let H : Rq × Rr → Rq be a continuously differentiable function with
H(z̄, R̄) = 0 for some pair (z̄, R̄). If the Jacobian
dH
Jz = (z̄, R̄)
dz
is invertible, then there exists an open domain U ⊂ Rr with R̄ ∈ U and a
continuously differentiable function g : U → Rq with

H (g(R), R) = 0 ∀R ∈ U .

Moreover, we get for the Jacobian of g that

dg(R)
h i−1 h i
dH dH
=− (g(R), R) (g(R), R) .
dR dz dR

Proof.
See Analysis.

p. 483
How does Implicit Function Theorem help for sensitivity
calculation? I

◮ Consider H(z, R) the q-dimensional objective function of yield curve


calibration problem:
◮ z = [z1 , . . . , zq ]⊤ yield curve parameters (e.g. zero rates or forward
rates),
◮ R = [R1 , . . . , Rq ]⊤ market quotes (par rates) for swaps and FRAs,
◮ set r = q, i.e. same number of market quotes as model parameters.
◮ Reformulate calibration helpers slightly such that
Hk (z, R) = ModelRatek (z) − Rk ,

◮ e.g. for swaps model-implied par swap rate becomes


Pmk δ
j=1
L (0, T̃j−1 , T̃j−1 + δ) · τ̃j · P(t, T̃j )
ModelRatek (z) = Pnk .
i=1
τi · P(0, Ti )

p. 484
How does Implicit Function Theorem help for sensitivity
calculation? II
dH
If pair (z̄, R̄) solves calibration problem H(z̄, R̄) = 0 and dz
(z̄, R̄) is invertible,
then there exists a function
z = z(R)
in a vicinity of R̄ and
h i−1 h i
dz dH dH
(R) = − (g(R), R) (g(R), R) .
dR dz dR
Reformulation of calibration helpers gives
 d

dz
ModelRate1 (z)
dH  .. 
(g(R), R) =  . , and
dz
d
dz
ModelRateq (z)
 
−1
dH  .. 
(g(R), R) =  . .
dR
−1

p. 485
How does Implicit Function Theorem help for sensitivity
calculation? III
Consequently
 d
−1
h i−1 dz
ModelRate1 (z)
dz dH  .. 
(R) = (g(R), R) = .  .
dR dz
d
dz
ModelRateq (z)

We get Jacobian method for risk calculation


 d
−1
dz
ModelRate1 (z)
Swap
dV  .. 
∆R = 1bp · (z(R)) ·  .  .
| dz {z } d
ModelRate (z)
dz q
Pricing
| {z }
Calibration

◮ Requires only sensitivities w.r.t. model parameters.


◮ Reference market intruments/rates Rk can also be chosen independent of
original calibration problem.
◮ Calibration Jacobian and matrix inversion can be pre-computed and
stored.
p. 486
We can adapt Jacobian method to Vega calculation as well
I

Bermudan swaption is determined via mapping


h i h i
σN1 , . . . σNk̄ 7→ σ 1 , . . . σ k̄ 7→ V Berm .
| {z } | {z }
market-impl. normal vols HW short rate vols

Assign volatility calibration helpers

Hk (σ, σN ) = VkCBO (σ) − VkSwpt (σNk ) .


| {z } | {z }
Model[σ] Market(σ k
N)

◮ VkCBO (σ) Hull-White model price of kth co-terminal European swaption


represented as coupon bond option.
◮ VkSwpt (σNk ) Bachelier formula to calculate market price for kth co-terminal
European swaption from given normal volatility σNk .

p. 487
We can adapt Jacobian method to Vega calculation as well
II
Implicit Function Theorem yields
h i−1 h i
dσ dH dH
=− (σ (σN ) , σN ) (σ (σN ) , σN )
dσN dσ dσN
 
d
dσN
V1Swpt (σN1 )
h i−1
d  .. 
= Model[σ]  . .

d
dσN
Vk̄Swpt (σNk̄ )

◮ d

Model[σ] are Hull-White model Vega(s) of co-terminal European
swaptions.
◮ d
dσN
VkSwpt (σNk ) are Bachelier or market Vega(s) of co-terminal European
swaptions.
Bermudan Vega becomes
h i−1
d d Berm d d 
V Berm = V · Model[σ] · Market σNk .
dσN dσ dσ dσN

p. 488
Outline

Introduction to Sensitivity Calculation

Finite Difference Approximation for Sensitivities

Differentiation and Calibration

A brief Introduction to Algorithmic Differentiation

p. 489
What is the idea behind Algorithmic Differentiation (AD)

◮ AD covers principles and techniques to augment computer models or


programs.

◮ Calculate sensitivities of output variables with respect to inputs of a


model.

◮ Compute numerical values rather than symbolic expressions.

◮ Sensitivities are exact up to machine precision (no rounding/cancellation


errors as in FD).

◮ Apply chain rule of differentiation to operations like +, *, and intrinsic


functions like exp(.).

p. 490
Functions are represented as Evaluation Procedures
consisting of a sequence of elementary operations
v−3 = x1 = F
v−2 = x2 = K
v−1 = x3 = σ
v0 = x4 = τ
v1 = v−3 /v−2 ≡ f1 (v−3 , v−2 )
v2 = log(v1 ) ≡ f2 (v1 )

Example: Black Formula v3 = v0 ≡ f3 (v0 )
v4 = v−1 · v3 ≡ f4 (v−1 , v3 )
Black(·) = ω [F Φ(ωd1 ) − K Φ(ωd2 )] v5 = v2 /v4 ≡ f5 (v2 , v4 )
√ v6 = 0.5 · v4 ≡ f6 (v4 )
log(F /K ) σ τ
with d1,2 = √ ± 2
v7 = v5 + v6 ≡ f7 (v5 , v6 )
σ τ
v8 = v7 − v4 ≡ f8 (v7 , v4 )
◮ Inputs F , K , σ, τ v9 = ω · v7 ≡ f9 (v7 )
◮ Discrete parameter ω ∈ {−1, 1} v10 = ω · v8 ≡ f10 (v8 )
◮ Output Black(·) v11 = Φ(v9 ) ≡ f11 (v9 )
v12 = Φ(v10 ) ≡ f12 (v10 )
v13 = v−3 · v11 ≡ f13 (v−3 , v11 )
v14 = v−2 · v12 ≡ f14 (v−2 , v12 )
v15 = v13 − v14 ≡ f15 (v13 , v14 )
v16 = ω · v15 ≡ f16 (v15 )
y1 = v16

p. 491
Alternative representation is Directed Acyclic Graph (DAG)
v−3 = x1 = F v−3 v−2 v−1 v0

v−2 = x2 = K
v−1 = x3 = σ v1 v3
v0 = x4 = τ
v1 = v−3 /v−2 ≡ f1 (v−3 , v−2 ) v2 v4
v2 = log(v1 ) ≡ f2 (v1 )

v3 = v0 ≡ f3 (v0 ) v5 v6
v4 = v−1 · v3 ≡ f4 (v−1 , v3 )
v5 = v2 /v4 ≡ f5 (v2 , v4 )
v7
v6 = 0.5 · v4 ≡ f6 (v4 )
v7 = v5 + v6 ≡ f7 (v5 , v6 )
v8
v8 = v7 − v4 ≡ f8 (v7 , v4 )
v9 = ω · v7 ≡ f9 (v7 )
v10 = ω · v8 ≡ f10 (v8 ) v9 v10

v11 = Φ(v9 ) ≡ f11 (v9 )


v12 = Φ(v10 ) ≡ f12 (v10 ) v11 v12
v13 = v−3 · v11 ≡ f13 (v−3 , v11 )
v14 = v−2 · v12 ≡ f14 (v−2 , v12 ) v13 v14
v15 = v13 − v14 ≡ f15 (v13 , v14 )
v16 = ω · v15 ≡ f16 (v15 ) v15
y1 = v16
v16

p. 492
Evaluation Procedure can be formalized to make it more
tractable

Definition (Evaluation Procedure)


Suppose F : Rn → Rm and fi : Rni → Rmi . The relation j ≺ i denotes that vi ∈ R
depends directly on vj ∈ R. If for all x ∈ Rn and y ∈ Rm with y = F (x ) holds that

vi−n = xi i = 1, . . . , n
vi = fi (vj )j≺i i = 1, . . . , l
ym−i = vl−i i = m − 1, . . . , 0,

then we call this sequence of operations an evaluation procedure of F with elementary


operations fi . We assume differentiability of all elementary operations fi (i = 1, . . . , l).
Then the resulting function F is also differentiable.

◮ Abbreviate ui = (vj )j≺i ∈ Rni the collection of arguments of the operation fi .


◮ Then we may also write
vi = fi (ui ).

p. 493
Forward mode of AD calculates tangents
◮ In addition to function evaluation vi = fi (ui ) evaluate derivative

X ∂
v̇i = fi (ui ) · v̇j .
∂vj
j≺i

Forward Mode or Tangent Mode of AD


Use abbreviations u̇i = (v̇j )j≺i and f˙i (ui , u̇i ) = fi′ (ui ) · u̇i . The Forward Mode of AD is
the augmented evaluation procedure

[vi−n , v̇i−n ] = [x
 i , ẋi ]  i = 1, . . . , n
[vi , v̇i ] = fi (ui ), f˙i (ui , u̇i ) i = 1, . . . , l
[ym−i , ẏm−i ] = [vl−i , v̇l−i ] i = m − 1, . . . , 0.

Here, the initializing derivative values ẋi−n for i = 1 . . . n are given and determine the
direction of the tangent.
◮ With ẋ = (ẋi ) ∈ Rn and ẏ = (ẏi ) ∈ Rm , the forward mode of AD evaluates

ẏ = F ′ (x )ẋ .

◮ Computational effort is approx. 2.5 function evaluations of F .


p. 494
Black formula Forward Mode evaluation procedure...

v−3 = x1 = F v̇−3 = 0
v−2 = x2 = K v̇−2 = 0
v−1 = x3 = σ v̇−1 = 1
v0 = x4 = τ v̇0 = 0
v1 = v−3 /v−2 v̇1 = v̇−3 /v−2 − v1 · v̇−2 /v−2
v2 = log(v1 ) v̇2 = v̇1 /v1

v3 = v0 v̇3 = 0.5 · v̇0 /v3
v4 = v−1 · v3 v̇4 = v̇−1 · v3 + v−1 · v̇3
v5 = v2 /v4 v̇5 = v̇2 /v4 − v5 · v̇4 /v4
v6 = 0.5 · v4 v̇6 = 0.5 · v̇4
v7 = v5 + v6 v̇7 = v̇5 + v̇6
v8 = v7 − v4 v̇8 = v̇7 − v̇4
v9 = ω · v7 v̇9 = ω · v̇7
v10 = ω · v8 v̇10 = ω · v̇8
v11 = Φ(v9 ) v̇11 = φ(v9 ) · v̇9
v12 = Φ(v10 ) v̇12 = φ(v10 ) · v̇10
v13 = v−3 · v11 v̇13 = v̇−3 · v11 + v−3 · v̇11
v14 = v−2 · v12 v̇14 = v̇−2 · v12 + v−2 · v̇12
v15 = v13 − v14 v̇15 = v̇13 − v̇14
v16 = ω · v15 v̇16 = ω · v̇15
y1 = v16 ẏ1 = v̇16

p. 495
Reverse Mode of AD calculates adjoints

◮ Forward Mode calculates derivatives and applies chain rule in the same order as
function evaluation.

◮ Reverse Mode of AD applies chain rule in reverse order of function evaluation.

◮ Define auxiliary derivative values v̄j and assume initialisation v̄j = 0 before
reverse mode evaluation.

◮ For each elementary operation fi and all intermediate variables vj with j ≺ i,


evaluate

v̄j + = v̄i · fi (ui ).
∂vj

◮ In other words, for each arguments of fi the partial derivative is derived.

p. 496
Reverse Mode of AD calculates adjoints 2/2

Reverse Mode or Adjoint Mode of AD


Denoting ūi = (v̄j )j≺i ∈ Rni and f¯i (ui , v̄i ) = v̄i · fi′ (ui ), the incremental reverse mode
of AD is given by the evaluation procedure

vi−n = xi i = 1, . . . , n
vi = fi (vj )j≺i i = 1, . . . , l
ym−i = vl−i i = m − 1, . . . , 0
v̄i = ȳi i = 0, . . . , m − 1
ūi += f¯i (ui , v̄i ) i = l, . . . , 1
x̄i = v̄i i = n, . . . , 1.

Here, all intermediate variables vi are assigned only once. The initializing values ȳi are
given and represent a weighting of the dependent variables yi .
◮ Vector ȳ = (ȳi ) can also be interpreted as normal vector of a hyperplane in the
range of F .
◮ With ȳ = (ȳi ) and x̄ = (x̄i ), reverse mode of AD yields
 
x̄ T = ∇ ȳ T F (x ) = ȳ T F ′ (x ).

◮ Computational effort is approx. 4 function evaluations of F .

p. 497
Black formula Reverse Mode evaluation procedure ... I
v−3 = x1 = F
v−2 = x2 = K
v−1 = x3 = σ
v0 = x4 = τ
v1 = v−3 /v−2
v2 = log(v1 )

v3 = v0
v4 = v−1 · v3
v5 = v2 /v4
v6 = 0.5 · v4
v7 = v5 + v6
v8 = v7 − v4
v9 = ω · v7
v10 = ω · v8
v11 = Φ(v9 )
v12 = Φ(v10 )
v13 = v−3 · v11
v14 = v−2 · v12
v15 = v13 − v14
v16 = ω · v15
y1 = v16
v̄16 = ȳ1 = 1
.
.
.
p. 498
Black formula Reverse Mode evaluation procedure ... II
.
.
.
y1 = v16
v̄16 = ȳ1 = 1
v̄15 += ω · v̄16
v̄13 += v̄15 ; v̄14 += (−1) · v̄15
v̄−2 += v12 · v̄14 ; v̄12 += v−2 · v̄14
v̄−3 += v11 · v̄13 : v̄11 += v−3 · v̄13
v̄10 += φ(v10 ) · v̄12
v̄9 += φ(v9 ) · v̄11
v̄8 += ω · v̄10
v̄7 += ω · v̄9
v̄7 += v̄8 ; v̄4 += (−1) · v̄8
v̄5 += v̄7 ; v̄6 += v̄7
v̄4 += 0.5 · v̄6
v̄2 += v̄5 /v4 ; v̄4 += (−1) · v5 · v̄5 /v4
v̄−1 += v3 · v̄4 ; v̄3 += v−1 · v̄4
v̄0 += 0.5 · v̄3 /v3
v̄1 += v̄2 /v1
v̄−3 += v̄1 /v−2 ; v̄−2 += (−1) · v1 · v̄1 /v−2
τ̄ = x̄4 = v̄0
σ̄ = x̄3 = v̄−1
K̄ = x̄2 = v̄−2
F̄ = x̄1 = v̄−3
p. 499
We summarise the properties of Forward and Reverse Mode

Forward Mode Reverse Mode



ẏ = F (x )ẋ x̄ T = ȳ T F ′ (x )
◮ Approx. 2.5 function evaluations. ◮ Approx. 4 function evaluations.

◮ Computational effort independent ◮ Computational effort independent


of number of output variables of number of input variables
(dimension of y ). (dimension of x ).

◮ Chain rule in same order as ◮ Chain rule in reverse order of


computation. computation.

◮ Memory consumption in order of ◮ Requires storage of all intermediate


function evaluation. results (or re-computation).

◮ Memory
consumption/management key
challange for implementations.
◮ Computational effort can be improved by AD vector mode.
◮ Reverse Mode memory consumption can be managed via checkpointing
techniques.
p. 500
How is AD applied in practice?

◮ Typically, you don’t want to differentiate all your source code by hand.
◮ Tools help augmenting existing programs for tangent and adjoint computations.

Source Code Transformation Operator Overloading


◮ Applied to the model code in ◮ provide new (active) data type.
compiler fashion.
◮ Overload all relevant operators/
◮ Generate AD model as new source functions with sensitivity aware
code. arithmetic.
◮ Original code may need to be ◮ AD model derived by changing
adapted slightly to meet intrinsic to active data type.
capabilities of AD tool.
Some example C++ tools:
ADIC2, dcc, TAPENADE ADOL-C, dco/c++, ADMB/AUTODIF

◮ There are also tools for Python and other lamguages:

More details at autodiff.org

p. 501
There is quite some literature on AD and its application in
finance

Standard textbook on AD:


◮ A. Griewank and A. Walther. Evaluating derivatives: principles and
techniques of algorithmic differentiation - 2nd ed.
SIAM, 2008
Recent practitioner’s textbook:

◮ U. Naumann. The Art of Differentiating Computer Programs: An


Introduction to Algorithmic Differentiation.
SIAM, 2012
One of the first and influencial papers for AD application in finance:

◮ M. Giles and P. Glasserman. Smoking adjoints: fast monte carlo greeks.


Risk, January 2006

p. 502
Part VIII

Wrap-up

p. 503
Outline

p. 504
What was this lecture about?

Interbank swap deal example


Trade details (fixed rate, notional, etc.)

Date calculations
Market conventions

Stochastic interest rates

Optionalities
Bank A may decide to early terminate deal in 10, 11, 12,.. years

p. 505
References I

F. Ametrano and M. Bianchetti.


Everything you always wanted to know about Multiple Interest Rate Curve
Bootstrapping but were afraid to ask (April 2, 2013).
Available at SSRN: http://ssrn.com/abstract=2219548 or
http://dx.doi.org/10.2139/ssrn.2219548, 2013.

L. Andersen and V. Piterbarg.


Interest rate modelling, volume I to III.
Atlantic Financial Press, 2010.

D. Bang.
Local-stochastic volatility for vanilla modeling.
https://ssrn.com/abstract=3171877, 2018.

M. Beinker and H. Plank.


New volatility conventions in negative interest environment.
d-fine Whitepaper, available at www.d-fine.de, December 2012.
References II
D. Brigo and F. Mercurio.
Interest Rate Models - Theory and Practice.
Springer-Verlag, 2007.

D. Duffy.
Finite Difference Methods in Financial Engineering.
Wiley Finance, 2006.

M. Fujii, Y. Shimada, and A. Takahashi.


Collateral posting and choice of collateral currency - implications for
derivative pricing and risk management (may 8, 2010).
Available at SSRN: https://ssrn.com/abstract=1601866, May 2010.

M. Giles and P. Glasserman.


Smoking adjoints: fast monte carlo greeks.
Risk, January 2006.

P. Glasserman.
Monte Carlo Methods in Financial Engineering.
Springer, 2003.
References III
A. Griewank and A. Walther.
Evaluating derivatives: principles and techniques of algorithmic
differentiation - 2nd ed.
SIAM, 2008.

P. Hagan, D. Kumar, A. Lesniewski, and D. Woodward.


Managing smile risk.
Wilmott magazine, September 2002.

P. Hagan and G. West.


Interpolation methods for curve construction.
Applied Mathematical Finance, 13(2):89–128, 2006.

M. Henrard.
Interest rate instruments and market conventions guide 2.0.
Open Gamma Quantitative Research, 2013.

M. Henrard.
A quant perspective on ibor fallback proposals.
https://ssrn.com/abstract=3226183, 2018.
References IV

J. Hull and A. White.


Pricing interest-rate-derivative securities.
The Review of Financial Studies, 3:573–592, 1990.

Y. Iwashita.
Piecewise polynomial interpolations.
OpenGamma Quantitative Research, 2013.

U. Naumann.
The Art of Differentiating Computer Programs: An Introduction to
Algorithmic Differentiation.
SIAM, 2012.

V. Piterbarg.
Funding beyond discounting: collateral agreements and derivatives pricing.

Asia Risk, pages 97–102, February 2010.


References V

R. Rebonato.
Volatility and Correlation.
John Wiley & Sons, 2004.

S. Shreve.
Stochastic Calculus for Finance II - Continuous-Time Models.
Springer-Verlag, 2004.
Contact

Dr. Sebastian Schlenkrich


Office: RUD25, R 1.211
Mail: [email protected]

d-fine GmbH
Mobile: +49-162-263-1525
Mail: [email protected]

You might also like