aad applications for pricing and hedging applications ... · algorithmic differentiation–whyad in...

52
AAD applications for pricing and hedging Applications : Cega & American & CVA 2014 Speaker: Adil Reghai - NATIXIS

Upload: lamkhue

Post on 01-May-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

AAD applications for pricing and hedgingApplications : Cega & American & CVA

2014

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

1Algorithmic differentiation

4

Many strategies to compute derivatives (differentials)

5

AD references & tools

02/10/2012 – EDA - AAD & Cega calculations6

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

What is AD ?

7

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

Financial applications – AD in pricing

Using AD in pricing

8

����� ∶ � ⟶ ������� ∶ …………… .

Linear form (n)

• Calculating derivative makes the problem linearIdea of Pontryagin

Adjoint : Ordering the calculations

9

� � :���������

� �������,…,�

� � ��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

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 modificationRicher Forward

Non-generic Backward

Tremendous human cost

10

Algorithmic differentiation

11

! � " ��! � "# � ��

�$ �" � |�� &" � �'(')

� Price variation

� Price function

� Tangent model

� Adjoint model

�! �$ �� | �( | �) |��>

�$ �� | �( | �) |��>

input

input

output

output

Algorithmic differentiation - Adjoint model

12

�̅ �$ +,|�" � &�$ ��" � �-|+, &

// Forward sweepFor i = 1..n

.� � /� .�0�!123 .�// Backward sweep. � 4� dim �For i = n..1

.� � !'!.�0� � ��/� .� �- . .�8

Algorithmic differentiation – Adjoint model

/ ��, �9 � ���9 : sin����

Wikipedia – Reverse accumulation illustration

� One computation to calculate all the derivatives

� Keep the same asymptotic complexity

13

Financial applications – AD in pricing

14

����� � =���+'//'>�//12�'��'?�@�A��B�'�$ ������| �$ ���+'// �>�//12�'� �?�@�A��B�'�|

FD AD Implicit function

Finite differences

C�����C�� ������ �� : D �������� D�

2D

Algorithmic differentiation – Why AD in MC ?

15

Price Price(bump)

ΔGH � Δ : I DJK�LM3 vs ΔNNG � Δ : DO � Δ : I� 1��

AD for pricing – Example of vanilla call

16

Market Data

Convolution

AD back-projection

Cega – Multi dimensional copula diffusion

The model

C K, T � B 0, T Uℚ SX K Y FX K � 1 : 1B�0, T�

CC�K, T�CK

� Sampling of [\� Correlation of samples : , [ ≡ ^. [\� _ � ` [� a �"0� _� � � ��a�

17

Copula

Cega – Multi dimensional copula

� Computing a��B� � bcbde�-�

� Computing

� [� B � bcbfe -

� _8 � a, �g�Hhi�j�

� [̅ � _8k�[�� ,̂ � ∑ [- [\m

• Finite Diff• Vibrato• Smoothing

AnalyticalFinite 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: �0��9 ∗ ?'���@o���pB�1�B1��?'1�B

– 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 differencesBarycentric bump

�/ � q / � : r /�� r�2r

( )

+−=+

1000

0100

0...011

0...011

1 εεε CC

( ) ( ) ( ) ( )

( ) ( ) ( ) ( )ερ

ρερ

ρε

ερ

ρερ

ρε

ε

ε

oVV

CVCV

oVV

CVCV

ji ijij

ji ijij

+∂∂−

∂∂+−=

+∂∂−

∂∂−+=

+

2,1,1212

2,1,1212

1

1

( ) ( ) ( )1212

oCVCVV +

−=

∂∂ −+

ερεε

Estimator

Automatic differentiation

� Operator overloading (TL)� Custom compilers like DCC (AM)

20

Cega – BS & VolLoc diffusion

Model BS & VolLoc

� Sampling of [\� Correlation of the samples : , [ ≡ ^. [\� Computation of martingale and spot :

� s- � ��! te,uhiv wuhi9 �B �B 1�� �B �B 1��x�,-0��s-0��[ s-0�

� a- � �-. s- : y-pour B ∈ 1, o� Payout computation� � ��a�

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

23

����� � ��+'//'>�//12�'�'?�@�A��B�'�$ ������| �$ ���+'// �>�//12�'� �?�@�A��B�'�|

FD AD Not Needed

virtual void GenericCalculateCega(path,bumpedPaths,isAnti);

Is it the end of grid computing?

24

• 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

2Sensitivity Greeks Duality

25

Gamma Vega in a Black Scholes Model

26

Ct! � oxp9C{{!

• 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?

Gamma local Vega local in a Local Vol Model

27

�pp � x B, p �y

• local volatility and drift processes are local,

• We have a local link between local vega(parameter sensitivity) and a local greekgamma – For European

C!Cx B, p � k B, p x B, p p9C{{! B, pk B, p Density at point S at time t

Calculated using a forward pde

Gamma local Vega local in a Local Vol Model

28

Adjust the density for American option

C!Cx B, p � k B, p x B, p p9C{{! B, p

Cross Gamma vs local correlation in a Local Vol local correlation Model

29

�p�p� � x� B, p� �y�

• 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)

C!C|}~ B, p� � k B, p� p}p~x} B, p} x~ B, p~ C{�{�! B, p

Delta local vs local drift in a Local Vol Model

30

�pp � 1 B, p �B : x B, p �y

• 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) C!

C1 B, p � k B, p 1 B, p pC{! B, pk B, p Density at point S at time t

Calculated using a forward pde

3Perturbation Techniques for pricing extension

31

AD for pricing – Fudge VolLoc 1/2

32

C-! : 12x~�L9 p9C{{! � 0

C-!� : 12x�{9 p9C{{!� � 0�1�

C-!� : 12x�{9 p9C{{!� � 12 x~�L9 x�{9 p9C{{!��2�

C-! : 12x�{9 p9C{{! � 12 D�x~�L9 x�{9 �p9C{{!

Can be interpreted in terms of perturbations

! � !� : D!�Solution of the form:

AD for pricing – Fudge VolLoc 2/2

33

Using Feymann-Kac

! � !�{ :�12 x~�L9 x�{9 k�p�C{{!�{p9�B�p�∗�

Same for 1 � bJ��bt��v �{,m� , 1 � 0�A'1������2�

!�� q!�{ :� x~�L9 x�{9 C!�{Cx~�L9 �p, o� �p�o

General Pricing Formula

34

American And European Options can be priced with a unique Black & Scholes volatility calculated as follows:

x�{9 q∬x~�L9 C!�{Cx~�L9 �p, o� �p�o∬ C!�{Cx~�L9 �p, o� �p�o

European Vanilla Call & Put

35

American Put

36

American Call

37

5CVA

38

CVA Problem

39

• Formula to calculate CVA adjustment:

CVA Perturbation

40

• Act 1: Perturbation

CVA Perturbation

41

• Act 1: Numerical verification

CVA Monte Carlo

42

Approach

CVA Monte Carlo

43

• Estimator

CVA AAD

44

• Act 2 : AAD Rapid calculation

CVA Duality

45

• Act 2 bis : Duality greeks AAD

CVA Duality Numerical Verification

46

CVA Ito Integral

47

• Act 3 : Martingale Representation Theorem

2 interesting consequences

48

• Automatic Control Variate

• Alternative to LSM

CVA numerical application

49

• The proof of the pudding is in the eating …

6

50

Conclusion

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

52

Experience + Theory = ScienceScience + Efficiency = Industry

Ely Klepfish