Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates...

18
STCE Fast Delta-Estimates for American Options by Adjoint Algorithmic Differentiation Jens Deussen Software and Tools for Computational Engineering RWTH Aachen University 18 th European Workshop on Automatic Differentiation, 2015

Transcript of Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates...

Page 1: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCE

Fast Delta-Estimates for American Options by Adjoint AlgorithmicDifferentiation

Jens DeussenSoftware and Tools for Computational EngineeringRWTH Aachen University

18th European Workshop on Automatic Differentiation, 2015

Page 2: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEOutline

Motivation

Basics of FinanceAmerican OptionsPath GenerationLongstaff-Schwartz Algorithm

Non-differentiability of the Exercise DecisionPathwise Adjoint Longstaff-Schwartz AlgorithmSigmoidal Smoothing

Simulation and Results

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 2

Page 3: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEMotivation

I In addition to the option price, sensitivities are of particular interest

I Sensitivities play an important role in terms of hedging and riskmanagement

I Numerical approximation is very expensive and inaccurate

I Improve the computation of sensitivities by adjoint algorithmicdifferentiation

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 3

Page 4: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEOptions and Greeks

“An American option gives the holder the right, but not the obligation, totrade an underlying financial asset S at a previously defined strike price Kduring a certain period of time until date T .”[1]

I Payoff function with stock price St and strike price K

v(St,K) =

{max(K − St, 0) (put)

max(St −K, 0) (call)

I Greeks of the option price VI Measurement for risks and stability

∆ = ∂V∂S0

ν = ∂V∂σ

Γ = ∂2V∂S2

0Vanna = ∂2V

∂S0σ

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 4

Page 5: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEPath Generation

I Path generation of stock prices St at time t with Black-Scholes formula[2] for given risk-free interest rate r, volatility σ, time of maturity T ,number of time steps NT and standard normal random numbers Z

St = St−1 · exp

((r − 0.5σ2

) T

NT+ σZt

)= S0 · exp

((r − 0.5σ2

) T

NTt+ σ

t∑i=1

Zi

)

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 5

Page 6: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCELongstaff-Schwartz Algorithm

I Longstaff-Schwartz algorithm to estimate American option price VI Monte-Carlo simulation with least-squares approach (LSA) [3]

1: for p = 1 to NP do2: vp = max(K − ST,p, 0)3: end for4: for t = NT − 1 to 1 do5: Identify set of in-the-money paths I6: Least squares method for all p ∈ I to estimate the exercise boundary b7: for all p ∈ I do8: if K − St,p < b then9: vp = vp · exp(−r T

NT)

10: else11: vp = K − St,p12: end if13: end for14: end for15: V = exp(−r T

NT) · 1

NP

∑NP

p=1 vp

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 6

Page 7: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCECode Analysis

I For given exercise times t̃p the LSA computes the option price as

V =1

NP

NP∑p=1

[(K − St̃p,p) · exp

(−r T

NTt̃p

)]

=1

NP

NP∑p=1

K · exp

(−r T

NTt̃p

)− S0 · exp

−0.5σ2 T

NTt̃p + σ

t̃p∑i=1

Zi

I Differentiating with respect to the initial stock price S0 yields

∂V

∂S0=

1

NP

NP∑p=1

− exp

−0.5σ2t̃pT

NT+ σ

t̃p∑i=1

Zi

I Exercise decision is not differentiable at K − St,p = bI From the viewpoint of AD the option price V is independent of the

boundary b and therefore the exercise times t̃p behave like constantsI AD will compute some second-order Greeks to be zero, e.g. Γ = 0

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 7

Page 8: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEPathwise Adjoint LSA

I Run the primal of the LSA and store exercise times t̃p for each path

I Compute the option price V with

1: for p = 1 to NP do

2: St̃p,p = S0 · exp((r − 0.5σ2

)TNT

t̃p + σ∑ti=1 Zi

)3: vp = (K − St̃p,p) · exp(−r T

NTt̃p)

4: end for5: V = 1

NP

∑NP

p=1 vpI Adjoint computation and path loop can be interchanged due to

∂ 1NP

∑vp

∂x=

1

NP

∑ ∂vp∂x

I Embarrassingly parallel

I Pathwise approach yields the the same values for the Greeks as theother AD approaches

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 8

Page 9: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCESmoothing

I Discontinuous function

f(x) =

{f1(x) for x < x0

f2(x) else

I smooth transition between f1 and f2:

f(x) = [1− σs(x)] f1(x) + σs(x)f2(x)

I with sigmoid function

σs =1

1 + exp(−(x− x0)/α)

I and transition width α

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 9

Page 10: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCESmoothing of LSA

I Apply smoothing to exercise decision in LSA

1: if K − St,p < b then2: vp = vp · exp(−r T

NT)

3: else4: vp = K − St,p5: end if

I Exercise decision is replaced by

1: σ = 1/(1 + exp(−(K − St,p − b)/α))2: vp = (1− σ) · (vp · exp(−r T

NT)) + σ · (K − St,p)

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 10

Page 11: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCESetup

I 5 active inputs:I initial stock price S0 = 1.0I strike price K = 1.0I time of maturity T = 1.0I volatility σ = 0.2I risk-free interest rate r = 0.04

I 1 active output:I option price V

I smoothing parameter α = 0.005

I Computation of gradient and two columns of Hessian

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 11

Page 12: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEResults: First-order Greeks

I Compare Greeks obtains with numerical (N) and algorithmic (A)differentiation with Greeks of the smoothed LSA (S)

I Analytical reference value ∆ = −0.416 [4]

NP NT ∆N ∆A ∆S νN νA νS

100000 100 -0.4186 -0.4186 -0.4150 0.3761 0.3761 0.3785200 454.9442 -0.4193 -0.4149 0.3763 0.3763 0.3813500 -0.4236 -0.4236 -0.4202 0.3762 0.3762 0.38011000 -0.4266 -0.4266 -0.4196 0.3762 0.3762 0.3870

500000 100 28.5414 -0.4189 -0.4170 0.3759 0.3759 0.3786200 -0.4211 -0.4211 -0.4209 0.3765 0.3765 0.3795500 49.1352 -0.4238 -0.4196 0.3764 0.3764 0.38141000 -10.2527 -0.4253 -0.4207 0.3760 0.3760 0.3833

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 12

Page 13: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEResults: Second-order Greeks

NP NT ΓN ΓA ΓS ∂∆/∂σN ∂∆/∂σA ∂∆/∂σS

100000 100 -17777.4563 0.0000 0.5063 -148.4161 0.3761 0.4460200 -20023.3616 0.0000 0.7151 -1615.1344 0.3763 0.3963500 -37873.6509 0.0000 1.0385 -894.4365 0.3762 0.37541000 -66975.9573 0.0000 1.0045 2414.4518 0.3762 0.4312

500000 100 -10547.4894 0.0000 0.7742 441.0091 0.3759 0.4075200 -18052.8577 0.0000 1.0584 -11.8954 0.3765 0.4306500 -44991.0654 0.0000 1.2196 -146.1275 0.3764 0.33431000 -81752.7066 0.0000 1.1069 -246.8543 0.3760 0.4247

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 13

Page 14: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEResults: Wall Time

I Wall time comparison of the numerical differentiation, an adjointmethod and the pathwise adjoint method

I Adjoint method with an equidistant checkpointing on the time loop

Wall time in seconds

NP NT Pricer NumericalDifferentiation

CheckpointAdjoint

PathwiseAdjoint

100000 100 1 39 (39.0) 18 (18.0) 1 (1.0)200 3 77 (25.7) 35 (11.7) 3 (1.0)500 8 196 (24.5) 81 (10.1) 8 (1.0)1000 14 391 (27.9) 172 (12.3) 15 (1.1)

500000 100 8 213 (26.6) 92 (11.5) 8 (1.0)200 17 505 (29.7) 189 (11.1) 18 (1.1)500 38 1107 (29.1) 479 (12.6) 39 (1.0)1000 77 2215 (28.8) 1057 (13.7) 79 (1.0)

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 14

Page 15: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEResults: Memory Requirements

Memory requirements in gigabyte

NP NT Pricer NumericalDifferentiation

CheckpointAdjoint

PathwiseAdjoint

100000 100 0.08 0.08 1.14 0.10200 0.16 0.16 2.14 0.18500 0.38 0.38 5.15 0.401000 0.75 0.75 10.16 0.89

500000 100 0.40 0.40 5.59 0.41200 0.77 0.77 10.50 0.78500 1.89 1.89 25.25 1.901000 3.75 3.75 49.83 3.78

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 15

Page 16: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEConclusion

I Pathwise approach computes the first-order sensitivities at thecomputational cost of a single pricing calculation

I Local non-differentiability of the exercise decision yields e.g. Γ = 0

I Approximation of second-order sensitivities by a sigmoidal smoothingof the exercise decision

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 16

Page 17: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEOutlook

I Use another stochastic differential equation for the stock priceevolution (e.g. local volatility)

I Check accuracy of the exercise boundary by using another set ofrandom numbers

I Analysis of the smoothing with another function and of the smoothingparameters should be considered

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 17

Page 18: Fast Delta-Estimates for American Options by Adjoint ... EuroAd Workshop... · Fast Delta-Estimates for American Options by Adjoint Algorithmic Di erentiation Jens Deussen Software

STCEFor Further Reading I

[1] Wilmott, P. (2007). Paul Wilmott introduces quantitative finance. JohnWiley & Sons.

[2] Black, F., and Scholes, M. (1973). The pricing of options and corporateliabilities. The journal of political economy, 637-654.

[3] Longstaff, F. A., and Schwartz, E. S. (2001). Valuing American optionsby simulation: a simple least-squares approach. Review of Financialstudies, 14(1), 113-147.

[4] Geske, R., and Johnson, H. E. (1984). The American put option valuedanalytically. Journal of Finance, 1511-1524.

,

STCE, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 18