Notes - Mike Giles - Aad
Notes - Mike Giles - Aad
u0 - - - -
- - - - uN
∂un+1
u̇n+1 = Dn u̇n , Dn ≡
∂un
and hence
u̇N = DN −1 DN −2 . . . D1 D0 u̇0
and uN = 1.
uN = fN −1 ◦ fN −2 ◦ . . . ◦ f1 ◦ f0 (u0 ).
and hence
u̇N = DN −1 DN −2 . . . D1 D0 u̇0 .
and hence
c = f (a, b)
∂Cij ∂ output
Notation: Ċij ≡ , C ij ≡
∂ input ∂Cij
C =A+B C = AB
Ċ = Ȧ + Ḃ Ċ = Ȧ B + A Ḃ
A = C, A = C BT
B=C B = AT C
C = A−1 C = A−1 B
Ċ = − C Ȧ C Ċ = A−1 (Ḃ − Ȧ C)
A = −C T C C T B = (AT )−1 C, A = −B C T
C = A−1 B
Ċ = A−1 (Ḃ − Ȧ C)
B = (AT )−1 C, A = −B C T
f (u, v) = 0
to iteratively solve
∂f ∂f
u̇ + v̇ = 0
∂u ∂v
where
T
∂f
w + v = 0.
∂v
pn+1 = An pn
f T M pN = f T M AN −1 AN −2 . . . A0 p0 .
pT0 v0
where
v0 = AT0 . . . ATN −2 ATN −1 M f T
the adjoint solution vn is defined by
vn = ATn vn+1
un = (M −1 )T vn ,
un = (M An M −1 )T un+1
uN = f,
∂p ∂ 1 ∂2 2
+ (a p) = 2
b p
∂t ∂x 2 ∂x
for probability density p(x, t) for path St satisfying the SDE
∂ 1 ∂2 2
Lp ≡ − (a p) + 2
b p
∂x 2 ∂x
and
∂u 1 ∂ 2u
L∗ u ≡ a + b2 2
∂x 2 ∂x
The identity
(Lv, w) = (v, L∗ w), ∀v, w
Pn+1 = BnT Pn
An un = Cn un+1
so
Bn ≡ A−1
n Cn
In this case,
BnT ≡ CnT (ATn )−1
so
Pn+1 = CnT (ATn )−1 Pn
un = Bn un+1 .
where
ḃn ≡ Ḃn un+1
Adjoints for finance – p. 32
FDE sensitivities
What is “reverse mode” adjoint?
u0 = e
un+1 = BnT un , bn = un
f = uN
The key is that they all use the same f and bn , and it is just
this final AD step which depends on θ, and the cost is
independent of the number of parameters.
fi = H(K −Si )
u = x2
uh = x2 + h2 sin(x/h)
In the digital put case, the problem was the strike moving
across the grid.
(0) (0) t
log Si (t) = log Si + (log K − log K )
T
(0)
This uses a baseline grid Si corresponding to the true
strike K (0) then considers perturbations to this which move
with the strike.
Adjoints for finance – p. 40
Use of adjoint sensitivities
Fokker-Planck discretisation:
standard calculation goes forward in time, then
performs a separate vector dot product for each vanilla
European option
adjoint sensitivity calculation goes backward in time,
gives sensitivity of vanilla prices to initial prices, model
constants
if the Greeks are needed for each option, then a
separate adjoint calculation is needed for each – might
be better to use “forward mode” AD instead, depending
on number of parameters and options
one adjoint calculation can give a weighted average of
Greeks – useful for calibrating a model to market data
Adjoints for finance – p. 41
Use of adjoint sensitivities
A calibration procedure might find the optimum vector of
parameters θ which minimises the mean square difference
between vanilla option model prices and market prices:
X 2
1 (k) (k)
2 Cmodel (θ) − Cmarket
k
X (k) ∂C (k)
(k) model
Cmodel − Cmarket
∂θ
k
The matrix
∂σl
∂σI
can be obtained by forward mode sensitivity analysis (more
expensive), or approximated by bumping (more expensive
and less accurate)
Sn+1 = fn (θ; Sn ), n = 0, . . . , N −1
T
This is equal to S0 Ṡ0 if the adjoint solution is defined by
T
∂P
SN =
∂SN
and
T
∂P
Sn = BnT S n+1 + , n = N −1, . . . , 0
∂Sn
Adjoints for finance – p. 52
Path dependent payoffs
When Ṡ0 = 0, and there is just one ḃn which is non-zero,
then the payoff sensitivity is
∂P T
Ṗ = BN −1 . . . Bn+1 ḃn = S n+1 ḃn
∂SN
so bn ≡ S n+1
What if d is smallest?
· · · · · · · · · · ·
· · · · ·
·
· · · · ·
· · · · · · · · · · · · · · · ·
· · · · · · · · · · ·
· · · · · · · · · · ·
Needs
K ≫ 1 to get a good estimate of the confidence interval
K ≪ M for cost of K adjoint Cholesky calculations to
be smaller than M path calculations
SN = SN −1 + µN −1 ∆t + σN −1 ∆WN −1
Instead, one can apply the Likelihood Ratio Method for the
final step – I called this the “vibrato” method because of the
uncertainty in the final value SN