CVA on an ipad Mini Part 2: The Beast



Similar documents
Quant History. Quant Factory Symposium Aarhus January Jesper Andreasen Danske Markets, Copenhagen

CVA on an ipad Mini Part 3: XVA Algorithms

Markovian projection for volatility calibration

Hedging Illiquid FX Options: An Empirical Analysis of Alternative Hedging Strategies

On the Valuation of Power-Reverse Duals and Equity-Rates Hybrids

Model Independent Greeks

Some Practical Issues in FX and Equity Derivatives

Cash-settled swaptions How wrong are we?

Master of Mathematical Finance: Course Descriptions

On Black-Scholes Equation, Black- Scholes Formula and Binary Option Price

Stephane Crepey. Financial Modeling. A Backward Stochastic Differential Equations Perspective. 4y Springer

How the Greeks would have hedged correlation risk of foreign exchange options

Vanna-Volga Method for Foreign Exchange Implied Volatility Smile. Copyright Changwei Xiong January last update: Nov 27, 2013

DIGITAL FOREX OPTIONS

IL GOES OCAL A TWO-FACTOR LOCAL VOLATILITY MODEL FOR OIL AND OTHER COMMODITIES 15 // MAY // 2014

How To Understand The Latest Features Of F3 Excel Edition 4.3.3

Derivatives: Principles and Practice

Properties of the SABR model

Markov modeling of Gas Futures

No-arbitrage conditions for cash-settled swaptions

Hedging Barriers. Liuren Wu. Zicklin School of Business, Baruch College (

INTEREST RATES AND FX MODELS

The Heston Model. Hui Gong, UCL ucahgon/ May 6, 2014

Pricing Barrier Options under Local Volatility

Caput Derivatives: October 30, 2003

Pricing Options with Discrete Dividends by High Order Finite Differences and Grid Stretching

Using the SABR Model

Moreover, under the risk neutral measure, it must be the case that (5) r t = µ t.

Contents. Bibliografische Informationen digitalisiert durch

A spot price model feasible for electricity forward pricing Part II

Monte Carlo Methods and Models in Finance and Insurance

Mathematical Finance

Implied Volatility Surface

Interest rate Derivatives

Quanto Adjustments in the Presence of Stochastic Volatility

Caps and Floors. John Crosby

OpenGamma Quantitative Research Adjoint Algorithmic Differentiation: Calibration and Implicit Function Theorem

Monte Carlo Methods in Finance

Pricing and calibration in local volatility models via fast quantization

Consistent pricing and hedging of an FX options book

Introduction to Arbitrage-Free Pricing: Fundamental Theorems

FX Options and Smile Risk_. Antonio Castagna. )WILEY A John Wiley and Sons, Ltd., Publication

Exam MFE Spring 2007 FINAL ANSWER KEY 1 B 2 A 3 C 4 E 5 D 6 C 7 E 8 C 9 A 10 B 11 D 12 A 13 E 14 E 15 C 16 D 17 B 18 A 19 D

A Vega-Gamma Relationship for European-Style or Barrier Options in the Black-Scholes Model

Simulating Stochastic Differential Equations

SWAPTION PRICING OPENGAMMA QUANTITATIVE RESEARCH

INTEREST RATES AND FX MODELS

On Market-Making and Delta-Hedging

The interest volatility surface

Equity-Based Insurance Guarantees Conference November 1-2, New York, NY. Operational Risks

Swaps: complex structures

Pricing of an Exotic Forward Contract

OPTIONS, FUTURES, & OTHER DERIVATI

Does Black-Scholes framework for Option Pricing use Constant Volatilities and Interest Rates? New Solution for a New Problem

Pricing Barrier Option Using Finite Difference Method and MonteCarlo Simulation

Consistent Pricing of FX Options

Open issues in equity derivatives modelling

Pricing of cross-currency interest rate derivatives on Graphics Processing Units

A Guide to Modelling Counterparty Credit Risk

Numerical Methods for Option Pricing

Guaranteed Annuity Options

The Implied Volatility Surfaces

Lecture 11: The Greeks and Risk Management

Invesco Great Wall Fund Management Co. Shenzhen: June 14, 2008

Investing in Volatility

Hedging Variable Annuity Guarantees

1.2 Structured notes

FX Barriers with Smile Dynamics

A non-gaussian Ornstein-Uhlenbeck process for electricity spot price modeling and derivatives pricing

Black-Scholes Equation for Option Pricing

Schonbucher Chapter 9: Firm Value and Share Priced-Based Models Updated

Interest Rate Models: Paradigm shifts in recent years

Potential Future Exposure and Collateral Modelling of the Trading Book Using NVIDIA GPUs

Barrier Options. Peter Carr

Valuing Stock Options: The Black-Scholes-Merton Model. Chapter 13

CVA in Derivatives Trading

Lecture 4: The Black-Scholes model

Lecture 1: Stochastic Volatility and Local Volatility

ELECTRICITY REAL OPTIONS VALUATION

From thesis to trading: a trend detection strategy

EDF CEA Inria School Systemic Risk and Quantitative Risk Management

American Monte Carlo for Bermudan CVA. Roland Lichters

4. ANNEXURE 3 : PART 3 - FOREIGN EXCHANGE POSITION RISK

Credit volatility : Options and beyond

or enters into a Futures contract (either on the IPE or the NYMEX) with delivery date September and pay every day up to maturity the margin

FORWARDS AND EUROPEAN OPTIONS ON CDO TRANCHES. John Hull and Alan White. First Draft: December, 2006 This Draft: March 2007

Market Risk Analysis. Quantitative Methods in Finance. Volume I. The Wiley Finance Series

Stocks paying discrete dividends: modelling and option pricing

CS 522 Computational Tools and Methods in Finance Robert Jarrow Lecture 1: Equity Options

Stock Price Dynamics, Dividends and Option Prices with Volatility Feedback

International Master Economics and Finance

QUANTIZED INTEREST RATE AT THE MONEY FOR AMERICAN OPTIONS

Pricing Dual Spread Options by the Lie-Trotter Operator Splitting Method

Bootstrapping the interest-rate term structure

Stochastic Skew in Currency Options

VALUATION IN DERIVATIVES MARKETS

Margin Calculation Methodology and Derivatives and Repo Valuation Methodology

Implied Volatility of Leveraged ETF Options

LECTURE 9: A MODEL FOR FOREIGN EXCHANGE

Transcription:

CVA on an ipad Mini Part 2: The Beast Aarhus Kwant Factory PhD Course January 2014 Jesper Andreasen Danske Markets, Copenhagen kwant.daddy@danskebank.com

The Beast... was initially developed for the pricing of arbitrary hybrid and exotic payoffs. Covering all asset classes [rates, fx, equities, commodities, inflation] and including a lot of facilities for skew/smiles etc.... with scripting language interface for arbitrary payoffs, of course. The Beast is a true product of the cold war of exotics that took place in the mid 00s, now converted to CVA duties. At Danske: 2

- Multi-factor (4F) Cheyette model (MFC) for rates with stochastic and local volatility. - Fully flexed non-parametric stochastic and local volatility model for fx and equities. - Deterministic default probabilities. As such, probably cutting the edge in 2010, but I could possibly do it a tad better today. 3

SuperFly Model Structure The Danske quant C++ library is called SuperFly. The SuperFly models are structured in to three categories: 1. Linear models produce forwards and discount. For example: - LRS: Linear Rate Surface model can produce Libor forwards and discount them. - LE: Linear Equity model stores dividend information and a LRS model to be able to produce equity forwards. 2. Molecule models can price European options. For example: 4

- MR SABR: Molecule Rate SABR, stores an LRS model and SABR parameters to price caps and swaptions. - MP SV: Molecule Price SV, stores an LX or LE model to produce forwards and Heston parameters to price European FX or equity options. 3. Dynamic models that can simulate or roll backward rates or prices. For example: - DR MFC MC: Dynamic Rate MFC MC simulates a DR MFC that is calibrated to swaption prices produced by an MR. - DP SLV MC: Dynamic Price Stochastic Local Volatility MC simulates a vector of DP SLV models each of which are calibrated to an MP SV for an FX or equity underlying. 5

SuperFly models are stacked on top of each other, typically: Dynamic model Molecule model Linear model An example: 6

DP SLV MC DP SLV.SX5E DP SLV.EUR/USD MP BLACK.SX5E MP SV.EUR/USD LE.SX5E LX.EUR/USD LRS.EURLIBOR LRS.USDLIBOR Quiz: Spot the missing arrow! This creates a plug-n-play system of models that can be assembled in countless configurations. 7

Structure can be quite complex. In fact, we have created a small scripting language called Lingo to manage assembly and disassembly of models. An example of a Beast on the board. The point is that the flexibility of the plug-n-play system enables us to re-use the components used elsewhere in the bank. The LRS.EURLIBOR and 30 other currencies are automatically produced and stored on the database every few seconds, based on quotes continuously submitted by the swap desks. The LRS.EURLIBOR is being re-used by everyone in Danske Bank that need to use Libors and discount in EUR. 8

This seems natural but it is far from the case among many of our competitors where the EURLIBOR curve may be simultaneously constructed by many different desks with many different code libraries. Without this consistent re-cycling of all models and extensive automatisation, it would be a day-trip to get a 20+ ccy Beasts off the ground. As is, for a given portfolio with a certain set of underlying indexes we construct the Beast on-the-fly based on the relevant models pulled from the database. All pricing can be based on parameters that are only seconds old. 9

Cheyette with Multiple Factors [MFC] The multi-factor HJM result states that in any (continuous evolution) arbitrage free model of the yield curve, the forward rates have to evolve according to T df ( t, T) ( t, T) ( t, s) dsdt ( t, T) dw( t), f ( t, T) t ln P( t, T) T (1) where { ( tt, )} is some family of vector volatility processes and W is a vector Brownian motion under the risk-neutral measure. However, an arbitrary specification of { (, )} tt will typically lead to yield curve dynamics that are non-markovian. 10

So during simulations one needs to use the whole yield curve as a state variable. Cheyette and others (early 90s) show that if the forward rate volatilities have the following separable form i ( T t ) ( t, T ) e ( t ) g ( T )' h ( t ) (2) i i for some constants 1,, n and vector processes 1,, n, then a finite dimensional Markov representation emerges: 11

G ( ) x ( t) 1 G ( ) y ( t) G ( ) 2 P( t, t ) P(0, t ) e i ij, G ( ) 1 e P(0, t) i dx ( t) ( x ( t) y ( t)) dt ( t) dw ( t) i i i ij ij j j j dy ( t) ( ( t) ( t) ( ) y ( t)) dt ij ik jk i j ij k i i i ij j i i (3) The state variables have the interpretation: - ( x i ) are n state variables that shock the yield curve. - ( ) ij y are ( 1)/2 nn state variables that have to be dragged along to keep the model arbitrage free. 12

The Cheyette volatility specification corresponds to spanning the forward rate volatility structure with the exponential basis: 1.0000 0.9000 0.8000 0.7000 0.6000 0.5000 0.4000 0.3000 kappa = 0.00 kappa = 0.02 kappa = 0.05 kappa = 0.15 kappa = 0.25 kappa = 1.00 0.2000 0.1000 0.0000 0 5 10 15 20 25 30 The trouble with the Cheyette volatility specification is that it is quite abstract: the model is specified in terms of dynamics of abstract state variables ( x i ) with no simple link to rates. 13

The Link between LMM and MFC models The task is to put the HJM (LMM) model df ( t, t ) ( t, ) dw ( t ) O ( dt ) (4) on the Cheyette form: j j j G ( ) x ( t) 1 G ( ) y ( t) G ( ) 2 P( t, t ) P(0, t ) e i ij, G ( ) 1 e P(0, t) i dx ( t) ( x ( t) y ( t)) dt ( t) dw ( t) i i i ij ij j j j dy ( t) ( ( t) ( t) ( ) y ( t)) dt ij ik jk i j ij k i i i ij j i i (5) 14

As df ( t, t ) e i ( t) dw ( t) O( dt ) (6) i j... it turns out that this can be achieved with ij j () t 1 1 1 n 1 1 1 n 1 g ( ) g ( ) ( t, ) ( t, ) g ( ) g ( ) ( t, ) ( t, ) 1 n n n 1 n n n (7) g() e i i for a selected set of tenors 1,, n and mean-reversions 1,, n. 15

So we can specify the Cheyette volatility structure to equate to the LMM volatility structure for n selected forward rates. Idea introduced in Andreasen (2005). 16

Here, one can think of the forward rates and the mean reversions as a basis, for example - Mean reversions (,,, ) (0,0.1,0.3,1.0) 1 2 3 4 - Forward rates (,,, ) (6 m,2 y,10 y,30 y ) 1 2 3 4 Now set the LMM model to be Piterbarg (2003) s most sophisticated (tenor dependent shift and stochastic volatility): j ( t, ) z [ f (1 ) f ] ( ) dz( t) (1 z( t)) dt ( t) z( t) dz( t), dz dw 0 ( t, ) ( t, ) f f ( t, t ) f f (0, t ) 0 0 j j (8) 17

We have here included a as a zero parameter to be able to handle negative and/or very low interest rates. We have model dynamics that agree with the HJM (LMM) on a set of selected forward rates, including correlation, and use the Cheyette formulas for the rest. The model has the following parameters - ( t, ),, ( t, ) control ATM volatility 1 n - ( t, ),, ( t, ) blend the rates between normal and log-normal and 1 control the skew n - () t vol of var controls the smile 18

- [ ( ) ( )'] i j correlation structure of forward rates So the model is specified in terms of forward rate volatility, blending, vol of var, and correlation structure exactly like LMM models. 19

MFC Advantages The MFC is a lot faster than comparable a LMM model... but also more flexible: Discrete time simulation schemes can be designed in such a way that all discount factors are martingales: P( t, T) Es[ P( u, T) ], (, ) t t u s T P t s P( u, s) (9) Hence, the discretised model is by nature always consistent with absence of arbitrage. 20

Further, it is straightforward to incorporate basis between different tenor Libors in to the modelling. Again, without trouble with breaking the arbitrage condition. Also, in the context of hybrid (x-ccy) models, discrete time fully arbitrage consistent quanto adjustments are possible to implement. These points are quite important when modelling long dated portfolios. 21

MFC Calibration Technique The approach is the following: A. Approximate the dynamics of the swap rate in the MFC model by a time-dependent SV (shifted Heston) model. Read Andreasen (2006). B. Approximate the time-dependent SV model with a constant parameter one. Read Piterbarg (2007). In the MFC we have that under the annuity measure (note zero drift): ds( t) St () ij( t) dw j( t) S ( t)' ( t) dw( t) x i i j x 1 n nn n 1 (10) 22

Using expansions around at-the-money we approximate the swap rate process (10) as a shifted Heston process with time dependent parameters ds( t) z( t) ( t)[ ( t) S( t) (1 ( t)) S(0) ] dw dz( t) (1 z( t)) dt z( t) ( t) dz The time-dependent SV parameters can now be turned into constant parameters using the Piterbarg parameter averaging method: () t () t () t Piterbarg(2007) (11) Once we have the constant parameters, the SV model option prices can be obtained by numerical inversion of the Fourier transform. 23

MFC calibration very quick: <1.0 second to calibrate model out to 30y maturity, ie approximately 100 caplet/swaptions. 24

Stochastic Cross Currency Basis Let P be the discount factors used for computing the forward rates, and let f P be the discount factors used for discounting. d In the MFC we set 25

P ( t, T) f s( T t) G( t, T)' x( t) 1G( t, T)' y( t) G( t, T) 2 P (0, T) P ( t, T) d e e d P (0, t) G ( t, T) s 1 f d s G( t, T)' x( t) 1G( t, T)' y( t) G( t, T) G (, ) ( ) 1 (, ) ( ) 2 s t T xs t G 2 s t T ys t dxs ( sxs ys) dt sdws, dws dw 0 dy ( 2 y 2) dt s P (0, T) f e P (0, t) e s s s (12) Using EUR s 0 and CCY s 0 for CCY EUR creates a stochastic cross currency basis for everything against EUR. 26

Doing the reverse, ie EUR s 0 and CCY s 0 for CCY EUR, creates value, beyond the intrinsic, for the option of switching collateral between several CCYs. Note here, that correlation between the discount basis of the different currencies have to be specified for this to make sense. 27

Stochastic Local Volatility for the FX Rates For the FX we use the model ds dt z ( t, S) dw S dz (1 z) dt z dz, z(0) 1, dw dz 0 (13)...where is set to be the (stochastic discount) interest rate differential for the currency pair considered. Outside CVA land this type model is frequently used for pricing exotic equity and fx options. Normally, in this type of model, calibration and pricing is implemented with different numerical methods that are not necessarily mutually consistent. 28

Our implementation, however, is based on the discretely consistent forward/backward finite difference approach in Andreasen and Huge (2011b). 29

Finite Difference The backward PDE associated with the model is discretised by a fully implicit LOD finite difference scheme (1 tdx) v( t ) v( t ) h 1/2 h 1 (1 tdy) v( t ) v( t ) h h 1/2 D 1 () 2 x y x 2 xx D y 1 y 2 (1 ) 2 2 y y yy (14) There exists a dual forward (Fokker-Planck) FD scheme for the state prices that is fully discretely consistent with the backward scheme (14) and this scheme is used for calibration of the model. 30

Further, as [1 td ] 1[1 td ] 1 0 the scheme can (almost) directly be used for simulation. y x This approach ensures perfect discrete consistency between calibration and simulation. 31

Volatility Interpolation The trouble with (stochastic) local volatility models is generally stability. If input option prices are not perfectly consistent with absence of arbitrage, ie c 0, c 0 t kk... for all ( tk, ) then local volatility functions will have spikes. To avoid this problem we use the finite difference based volatility interpolation algorithm of AH (2011a): 1 [1 t ( t, k) 2 ] c( t, k) c( t, k), c(0, k) ( s k ) 2 h kk h 1 h 32

In an initial step the volatility interpolation scheme is calibrated to a set of discrete input option prices using the slightly un-conventional time stepping scheme The long time steps go from calibration maturity to calibration maturity. The short time steps are used to fill option prices at in-between maturities. The procedure is very fast (<0.01s), but more importantly also very robust. The total calibration time for our stochastic local volatility model is around 0.1s. 33

Beast Default Configuration We have the ability run the Beast with very sophisticated modelling both on the rate and the FX side. But we actually typically run it with a somewhat simpler default specification. Per default we use a 4F MFC models with - Mean reversions - The skew rates (, 1, 2, 3 ) (0,0.1,0.3,1.0) 4 (,,, ) (0.5,2,10,30) 1 2 3 4 - Correlation { corr[ df ( t, t ), df ( t, t )]} 44 - Flat skew at i 0.2 - No stoch vol 0 i j 34

- Calibrated to n 6 m, n 2 y, n 10 y, n 30y ATM swaptions. The FXs are modelled without local and stochastic volatility. We only use single numbers for correlation between the different factors. There are multiple reasons for this: - Market data availability and reliability. - Stability: It has to function under really hard front line battle conditions. - Sometimes more model sophistication adds more confusion than insight. In the following I will go into a bit more detail about this. 35

Stochastic Volatility and Term Correlation Suppose dsi zi idwi dz (1 z ) dt z dz, z (0) 1 i i i i i i i We have corr[ s ( t), s ( t)] i j t E[( z 1/2 0 i( u) z j( u)) ] i ij jdu t t E z 2 1/2 2 1/2 0 i u i du E z 0 j u jdu [ [ ( )] ] [ [ ( )] ] 1 t [( ( ) ( )) 1/2 ij E z ] 0 i u z j u t du 36

...which will be decreasing in maturity unless z i z j. This effect is quite significant, particularly for the maturities considered here. So for stochastic volatility to be meaningful in the multi asset case, it more or less has to be the same stochastic volatility process that drives all market factors. Hence, if we use stochastic volatility in the Beast then we need to set 1,, SV ij i j i j... for the exercise to be meaningful. 37

This means that the curvature of all rate smiles have to be more or less the same. 38

Beast Correlation To chain the full beast together we need to specify all correlations and there are many of them. For the roughly 50 currencies Danske trades we need to maintain a correlation matrix of approx 300x300, i.e. approx 45,000 correlations to keep track of. We need some way of handling this. In essence, we need to simplify the specification. Let ( aij, bij, cij, dij, e ij) be the inputs in the big Beast correlation matrix 39

df : ( aij) ds: ( bij) ( cij) dxs: 0 ( d ) ( e ) ij ij Between forward rates of different tenors ( kl, ) of different currencies ( ij, ) we use the correlation: a corr[ df ( ), df ( )] [ corr[ df ( ), df ( )] corr[ df ( ), df ( )]] i j 2 ij k l i k i l j k j l For correlation between FX and forward rates: ds corr[ i, df j( )] b k ij k S i 40

For correlation between FXs: ds ds corr[ i, j ] S S i j c ij For correlation between discount spreads and rates corr [ df ( ), dx s] 0 i, j, k i k j For correlation between discount spreads and FX ds corr[ i, dxs j] d S i ij 41

For correlation between discount spreads corr[ dxs, dxs] e i j ij Again: correlations matter. Setting them to zero is also a choice that has consequences. 42

Quanto Adjustments For anything but the most simple models, quanto adjustments can be perplexingly difficult to get right. Particularly for long maturities and stochastic interest rates. In skool we learn that all we need to do is to change the drift of the Brownian motion by the FX volatility dw ' dw dt S However, in practice, and practice is discrete, this only really works if the model is step wise Gaussian. 43

... and our finite difference simulation scheme is not. This can potentially manifest itself in two places: - Trouble with simulation of 1/ S as we have seen for very skewed FX pairs such as EUR/CHF and EUR/DKK. - Trouble with simulation of the interest rate processes. The academic solution to the problem would be to increase the number of time steps to the ridiculous. To avoid any problems of this nature we have, for now at least, decided to switch off finite difference simulation in our default configuration. 44

FX Volatility Triangles If we simulate EUR/USD and EUR/SEK we are effectively also simulating the USD/SEK FX. The trouble with this is that we only have a single correlation input to control the USD/SEK volatility (including the smile) once we have fixed the EUR/USD and EUR/SEK smiles. So the FX correlations are important and should be set in such a way that we broadly hit the cross FX rate vols. Ideally, we would like to have a local correlation model to be able to hit the cross smile, in this case the USD/SEK. 45

This is in itself not exactly trivial, though we are quite sure it can be done. We have developed a positive 2D ADI FD scheme with correlation that could be used for this. 46

FX Volatility and Interest Rate Volatility We only have FX volatility quotes up to about 1-3 years of expiry. But we routinely have to price xva exposures up and above 30y. At the moment the model is set up to calibrate out to the longest FX option and implicitly extrapolate using the local volatilities for the FX plus the interest rate volatility plus the correlations to obtain effective FX volatilities. We note that the FX/interest rate correlations matter for the pricing of long dated FX options. Generally, FX volatilities will increase with the maturity because of the interest rate effect. 47

FX volatilities can easily double over a 10y to 30y horizon. This is consistent with what we observe empirically. 48

Model Summary In its default configuration the Beast is a multi factor Black-Scholes model with 4F LV Cheyette rates. On top stochastic discount basis can be added. We can switch on local and stochastic volatility on the FX and stochastic volatility on the rates. But it comes with the warning that we have had trouble with it particularly for very skewed (pegged) FX [EUR/CHF and EUR/DKK]. More work is needed here. Besides that I am not sure it really is worth the effort as we re not fully on top of cross FX skews and long dated FX options. 49

Asset classes where we do not have a dynamic model for, such as inflation and credit, are handled on their forward curves. The Beast is assembled and calibrated on-the-fly and only simulates the data that is needed. In terms of capability, flexibility and speed, it is, in my usual humble opinion, at least as good as anything our competitors have. Further, it is the industrial kwant at work in the sense that the Beast is constructed by reuse of existing machinery. Primarily, - DR MFC MC - DP SLV MC (DP SLV, DP LVI) - MP CORR 50

... resting plug-and-play on the standard SuperFly models - Molecules MR (SABR), MP (SV, BLACK) - Linear models (LM, LRS, LX, LI, LB, LMO, LE...) 51