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
Outline Motivation Basics of Finance American Options Path Generation Longstaff-Schwartz Algorithm Non-differentiability of the Exercise Decision Pathwise Adjoint Longstaff-Schwartz Algorithm Sigmoidal Smoothing Simulation and Results, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 2
Motivation In addition to the option price, sensitivities are of particular interest Sensitivities play an important role in terms of hedging and risk management Numerical approximation is very expensive and inaccurate Improve the computation of sensitivities by adjoint algorithmic differentiation, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 3
Options and Greeks An American option gives the holder the right, but not the obligation, to trade an underlying financial asset S at a previously defined strike price K during a certain period of time until date T. [1] Payoff function with stock price S t and strike price K { max(k S t, 0) (put) v(s t, K) = max(s t K, 0) (call) Greeks of the option price V Measurement for risks and stability = V S 0 ν = V σ Γ = 2 V S 2 0 Vanna = 2 V S 0σ, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 4
Path Generation Path generation of stock prices S t at time t with Black-Scholes formula [2] for given risk-free interest rate r, volatility σ, time of maturity T, number of time steps N T and standard normal random numbers Z ( (r S t = S t 1 exp 0.5σ 2 ) ) T + σz t N T ( (r = S 0 exp 0.5σ 2 ) ) T t t + σ Z i N T i=1, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 5
Longstaff-Schwartz Algorithm Longstaff-Schwartz algorithm to estimate American option price V Monte-Carlo simulation with least-squares approach (LSA) [3] 1: for p = 1 to N P do 2: v p = max(k S T,p, 0) 3: end for 4: for t = N T 1 to 1 do 5: Identify set of in-the-money paths I 6: Least squares method for all p I to estimate the exercise boundary b 7: for all p I do 8: if K S t,p < b then 9: v p = v p exp( r T N T ) 10: else 11: v p = K S t,p 12: end if 13: end for 14: end for 15: V = exp( r T 1 N T ) N P NP p=1 v p, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 6
Code Analysis For given exercise times t p the LSA computes the option price as V = 1 N P = 1 N P N P )] [(K S tp,p ( r ) exp TNT t p p=1 N P ) K exp ( r TNT t p S 0 exp 0.5σ 2 T t p + σ N T p=1 Differentiating with respect to the initial stock price S 0 yields V = 1 N P t exp 0.5σ 2 t T p p + σ Z i S 0 N P N T p=1 i=1 t p Z i Exercise decision is not differentiable at K S t,p = b From the viewpoint of AD the option price V is independent of the boundary b and therefore the exercise times t p behave like constants AD will compute some second-order Greeks to be zero, e.g. Γ = 0 i=1, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 7
Pathwise Adjoint LSA Run the primal of the LSA and store exercise times t p for each path Compute the option price V with 1: for p = 1 to N P do ( (r 2: S t = S p,p 0 exp ) 0.5σ 2 T N T t p + σ ) t i=1 Z i 3: v p = (K S t ) exp( r T p,p N T t p ) 4: end for 5: V = 1 NP N P p=1 v p Adjoint computation and path loop can be interchanged due to Embarrassingly parallel 1 N vp P = 1 vp x N P x Pathwise approach yields the the same values for the Greeks as the other AD approaches, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 8
Smoothing Discontinuous function f(x) = smooth transition between f 1 and f 2 : with sigmoid function and transition width α { f 1 (x) for x < x 0 f 2 (x) else f(x) = [1 σ s (x)] f 1 (x) + σ s (x)f 2 (x) σ s = 1 1 + exp( (x x 0 )/α), RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 9
Smoothing of LSA Apply smoothing to exercise decision in LSA 1: if K S t,p < b then 2: v p = v p exp( r T N T ) 3: else 4: v p = K S t,p 5: end if Exercise decision is replaced by 1: σ = 1/(1 + exp( (K S t,p b)/α)) 2: v p = (1 σ) (v p exp( r T N T )) + σ (K S t,p ), RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 10
Setup 5 active inputs: initial stock price S0 = 1.0 strike price K = 1.0 time of maturity T = 1.0 volatility σ = 0.2 risk-free interest rate r = 0.04 1 active output: option price V smoothing parameter α = 0.005 Computation of gradient and two columns of Hessian, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 11
Results: First-order Greeks Compare Greeks obtains with numerical (N) and algorithmic (A) differentiation with Greeks of the smoothed LSA (S) Analytical reference value = 0.416 [4] N P N T N A S ν N ν A ν S 100000 100-0.4186-0.4186-0.4150 0.3761 0.3761 0.3785 200 454.9442-0.4193-0.4149 0.3763 0.3763 0.3813 500-0.4236-0.4236-0.4202 0.3762 0.3762 0.3801 1000-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.3786 200-0.4211-0.4211-0.4209 0.3765 0.3765 0.3795 500 49.1352-0.4238-0.4196 0.3764 0.3764 0.3814 1000-10.2527-0.4253-0.4207 0.3760 0.3760 0.3833, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 12
Results: Second-order Greeks N P N T Γ N Γ A Γ S / σ N / σ A / σ S 100000 100-17777.4563 0.0000 0.5063-148.4161 0.3761 0.4460 200-20023.3616 0.0000 0.7151-1615.1344 0.3763 0.3963 500-37873.6509 0.0000 1.0385-894.4365 0.3762 0.3754 1000-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.4075 200-18052.8577 0.0000 1.0584-11.8954 0.3765 0.4306 500-44991.0654 0.0000 1.2196-146.1275 0.3764 0.3343 1000-81752.7066 0.0000 1.1069-246.8543 0.3760 0.4247, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 13
Results: Wall Time Wall time comparison of the numerical differentiation, an adjoint method and the pathwise adjoint method Adjoint method with an equidistant checkpointing on the time loop Wall time in seconds N P N T Pricer Numerical Differentiation Checkpoint Adjoint Pathwise Adjoint 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), RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 14
Results: Memory Requirements Memory requirements in gigabyte N P N T Pricer Numerical Differentiation Checkpoint Adjoint Pathwise Adjoint 100000 100 0.08 0.08 1.14 0.10 200 0.16 0.16 2.14 0.18 500 0.38 0.38 5.15 0.40 1000 0.75 0.75 10.16 0.89 500000 100 0.40 0.40 5.59 0.41 200 0.77 0.77 10.50 0.78 500 1.89 1.89 25.25 1.90 1000 3.75 3.75 49.83 3.78, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 15
Conclusion Pathwise approach computes the first-order sensitivities at the computational cost of a single pricing calculation Local non-differentiability of the exercise decision yields e.g. Γ = 0 Approximation of second-order sensitivities by a sigmoidal smoothing of the exercise decision, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 16
Outlook Use another stochastic differential equation for the stock price evolution (e.g. local volatility) Check accuracy of the exercise boundary by using another set of random numbers Analysis of the smoothing with another function and of the smoothing parameters should be considered, RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 17
For Further Reading I [1] Wilmott, P. (2007). Paul Wilmott introduces quantitative finance. John Wiley & Sons. [2] Black, F., and Scholes, M. (1973). The pricing of options and corporate liabilities. The journal of political economy, 637-654. [3] Longstaff, F. A., and Schwartz, E. S. (2001). Valuing American options by simulation: a simple least-squares approach. Review of Financial studies, 14(1), 113-147. [4] Geske, R., and Johnson, H. E. (1984). The American put option valued analytically. Journal of Finance, 1511-1524., RWTH Aachen, American Option Pricing, EuroAD Workshop, 2015 18