2014 AAD applications for pricing and hedging Applications : Cega & American & CVA Speaker: Adil Reghai - NATIXIS
Acknowledgement Thanks to the help of Florian Despeysse, José Luu, Marouen Messaoud, Ben Haj Yedder and Adnane Moulim for providing graphs and proof reading. 2
Table of contents 1. Algorithmic differentiation (AD) 2. Greeks Sensitivity Duality 3. Pricing Adjustments 4. Applications 5. Conclusion 3
4 1Algorithmic differentiation
Many strategies to compute derivatives (differentials) 5
AD references & tools Industry: Meteo France, Dassault, EDF, Finance : Luca Caprioti-Risk 2010 M. Gilles, P. Glasserman-Risk 2005 C. Homescu, ssrn O. Pirroneau, Y. Adchoui Mark Joshi & al General : Laurent Hascöet & al Uwe Nauman & al Software: Autodiff.org C++ framework (ADOL ) Code generation : tapenade DIY do it yourself methodology 6 02/10/2012 EDA - AAD & Cega calculations
What is AD? What is AD? A set of techniques to numerically evaluate the derivative of a function specified by a computer program Automatic methodology Computes any number of derivatives 7
Financial applications AD in pricing Using AD in pricing. Linear form (n) Calculating derivative makes the problem linear Idea of Pontryagin 8
Adjoint : Ordering the calculations :,, 1 1 Calculate the matrix x vector from the end is computationally more efficient than computing the product of all matrices Price of efficiency : Need of memory of the jacobian at each step 9
Algorithmic differentiation Tangent linear model Forward propagation of the chosen derivate More stable computation Automatic method, naturally object oriented Adjoint model Transposed differentiation problem Fast, Constant cost (Worst case: 4X the problem complexity) Important source code modification Richer Forward Non-generic Backward Tremendous human cost 10
Algorithmic differentiation Price variation Price function output input Tangent model > output input Adjoint model > 11
Algorithmic differentiation - Adjoint model // Forward sweep For i = 1..n // Backward sweep dim For i = n..1. 12
Algorithmic differentiation Adjoint model, sin One computation to calculate all the derivatives Keep the same asymptotic complexity Wikipedia Reverse accumulation illustration 13
Financial applications AD in pricing FD AD Implicit function Finite differences 2 14
Algorithmic differentiation Why AD in MC? Δ Δ vs Δ Δ Δ 1 Price Price(bump) 15
AD for pricing Example of vanilla call Convolution Market Data AD back-projection 16
Cega Multi dimensional copula diffusion The model C K,T B 0,T Q S K F K 1 1 C K,T B 0,T K Sampling of Correlation of samples :,. Copula 17
Cega Multi dimensional copula Computing Computing Finite Diff Vibrato Smoothing Analytical Finite Differences 18
Cega Problematic & technical chalenges One of the most costly calculations in Monte Carlo pricing For a basket option with 10 underlying Cost of computation: 45 = 10*(10-1)/2 price computation using asymmetrical differentiation Local correlation model -> twice as much computation Important risk Call Worst of with 2 underlying Almost 2.5% of the price (CWO 100% - 1Y - C95%) Tremendous technical challenge Why use AD? To be generic Doesn t impact the diffusion process 19
Cega Finite Diff & AD Finite differences Barycentric bump 1 + ( ) 1 C ε = 1 ε C + ε 0 0 2 1 1 0 0 0... 0... 1 0 0 0 0 1 Automatic differentiation Operator overloading (TL) Custom compilers like DCC (AM) V V + V V ( Cε ) = V ( C) + ε ( 1 ρ12 ) ε ρij + o( ε ) ρ V V ( Cε ) = V ( C) ε ( 1+ ρ12 ) ε ρij + o( ε ) V ρ 12 V = ρ 12 12 Estimator + ( C ) V ( C ) ε 2ε ε i, j 1,2 i, j 1,2 + o ( 1) ρ ρ ij ij 20
Cega BS & VolLoc diffusion Model BS & VolLoc Sampling of Correlation of the samples :,. Computation of martingale and spot :, 1 1,. pour 1, Payout computation 21
Cega Technical tricks 1/2 1. Common forms of diffusion models Calibration Diffusion Payout Aggregation 2. Hybrid method Ease in development Generic Fast and memory friendly 22
Cega Technical tricks 2/2 FD AD Not Needed virtual void GenericCalculateCega( path, bumpedpaths, isanti); 23
Is it the end of grid computing? Not at all New regulations and search of robustness and scalability is rapidly tackled with grid computing Typically : stress tests, VaR, Cvar, CVA, VaRCVA, Real time calculations Key remark : finite differences is a necessary benchmark 24
25 2Sensitivity Greeks Duality
Gamma Vega in a Black Scholes Model In a Black Sholes Model, vega and gamma are related by the formula above P. Carr & F. Mercurio & al showed many similar formula for Homogeneous models (stochastic volatility and jumps) Can be interpreted as a relationship between a parameter sensitivity (vega) and a greek (gamma) What about local volatility type models? 26
Gamma local Vega local in a Local Vol Model, local volatility and drift processes are local, We have a local link between local vega (parameter sensitivity) and a local greek gamma For European,,,,, Density at point S at time t Calculated using a forward pde 27
Gamma local Vega local in a Local Vol Model Adjust the density for American option,,,, 28
Cross Gamma vs local correlation in a Local Vol local correlation Model, local parameters including local correlation We have also a local link between local correlation sensitivity (parameter sensitivity) and a local greek cross gamma (includes local correlation effect),,,,, 29
Delta local vs local drift in a Local Vol Model,, local volatility and drift processes are local, We have a local link between local drift sensitivity (computer parameter sensitivity) and a local greek delta (we use this result for CVA),,,,, Density at point S at time t Calculated using a forward pde 30
31 3Perturbation Techniques for pricing extension
AD for pricing Fudge VolLoc 1/2 1 2 0 Can be interpreted in terms of perturbations 1 2 1 2 Solution of the form: 1 2 0 1 1 2 1 2 2 32
AD for pricing Fudge VolLoc 2/2 Using Feymann-Kac 1 2 Same for,, 0, 33
General Pricing Formula American And European Options can be priced with a unique Black & Scholes volatility calculated as follows:,, 34
European Vanilla Call & Put 35
American Put 36
American Call 37
38 5 CVA
CVA Problem Formula to calculate CVA adjustment: 39
CVA Perturbation Act 1: Perturbation 40
CVA Perturbation Act 1: Numerical verification 41
CVA Monte Carlo Approach 42
CVA Monte Carlo Estimator 43
CVA AAD Act 2 : AAD Rapid calculation 44
CVA Duality Act 2 bis : Duality greeks AAD 45
CVA Duality Numerical Verification 46
CVA Ito Integral Act 3 : Martingale Representation Theorem 47
2 interesting consequences Automatic Control Variate Alternative to LSM 48
CVA numerical application The proof of the pudding is in the eating 49
6 Conclusion 50
AD Conclusions Benefits of this Revolution Cega : Very good computation time (+10% of a single pricing for complete structure) AD Combine different techniques (finite diff, tangent, adjoint) and make your library evolve Generalization of Malliavin (weights) optimized implementation (scientific computing) New techniques for Automatic Control Variates / Early exercise value Perturbation techniques Adjusters new generation : turn good prices into great ones 51
Experience + Theory = Science Science + Efficiency = Industry Ely Klepfish 52