CVA on an ipad Mini Part 3: XVA Algorithms

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

CVA in Derivatives Trading

American Monte Carlo for Bermudan CVA. Roland Lichters

Contents. Bibliografische Informationen digitalisiert durch

Risk analysis with depth. Software, Services and. XVA Capital IM Limits Adjoint

Funding Value Adjustment, a practitioner's view

LIBOR vs. OIS: The Derivatives Discounting Dilemma

Instructions and Guide for Pricing and Valuation of Interest Rate Swap Lab

Distinguishing duration from convexity

With the derivative markets having changed dramatically since the 2008 financial crisis,

EDF CEA Inria School Systemic Risk and Quantitative Risk Management

Models of Risk and Return

CVA, Hedging and Best Practices Denny Yu, CFA

The xva Challenge. Counterparty Credit Risk, Funding, Collateral and Capital. Third Edition. Jon Gregory

Managing Counterparty Credit Risk through CVA. Karin Bergeron Director, CVA Trading

ASSET LIABILITY MANAGEMENT Significance and Basic Methods. Dr Philip Symes. Philip Symes, 2006

Interest Rate Swaps. Key Concepts and Buzzwords. Readings Tuckman, Chapter 18. Swaps Swap Spreads Credit Risk of Swaps Uses of Swaps

Basel Committee on Banking Supervision. Basel III counterparty credit risk - Frequently asked questions

Interest rate Derivatives

January 1, Year 1 Equipment ,000 Note Payable ,000

Margin Calculation Methodology and Derivatives and Repo Valuation Methodology

Single Name Credit Derivatives:

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

OVERVIEW OF THE USE OF CROSS CURRENCY SWAPS

Application of Interest Rate Swaps in Indian Insurance Industry Amruth Krishnan Rohit Ajgaonkar Guide: G.LN.Sarma

A Practical Guide to Fair Value and Regulatory CVA. Alexander Sokol, Numerix/CompatibL PRMIA Global Risk Conference 2012, NYC

Basel Committee on Banking Supervision

CHAPTER 23: FUTURES, SWAPS, AND RISK MANAGEMENT

Contents. List of Figures. List of Tables. Acknowledgments PART I INTRODUCTION 1

Credit Risk Stress Testing

ARMS Counterparty Credit Risk

A Short Introduction to Credit Default Swaps

1.2 Structured notes

RISK MANAGEMENT PRACTICES RISK FRAMEWORKS MARKET RISK OPERATIONAL RISK CREDIT RISK LIQUIDITY RISK, ALM & FTP

(Part.1) FOUNDATIONS OF RISK MANAGEMENT

Replicating Life Insurance Liabilities

Hedging Pension Liabilities

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

WHITE PAPER CHALLENGES IN IMPLEMENTING A COUNTERPARTY RISK MANAGEMENT PROCESS. Key data and technology challenges Current trends and best practices

The Master of Science in Finance (English Program) - MSF. Department of Banking and Finance. Chulalongkorn Business School. Chulalongkorn University

An empirical analysis of the dynamic relationship between investment grade bonds and credit default swaps

Facilitating On-Demand Risk and Actuarial Analysis in MATLAB. Timo Salminen, CFA, FRM Model IT

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

Introduction 3. Understanding the Measurement of Processing Costs 4. Cost per Trade Benchmarking Methodology 6

BASICS OF CREDIT VALUE ADJUSTMENTS AND IMPLICATIONS FOR THE ASSESSMENT OF HEDGE EFFECTIVENESS

New valuation and pricing approaches for derivatives in the wake of the financial crisis

Autumn Investor Seminar. Workshops. Managing Variable Annuity Risk

Chapter 5 Financial Forwards and Futures

GENERALI PANEUROPE LIMITED

CALYPSO ENTERPRISE RISK SYSTEM

Fast Monte Carlo CVA using Exposure Sampling Method

A Guide to Modelling Counterparty Credit Risk

Master of Mathematical Finance: Course Descriptions

How To Understand The Latest Features Of F3 Excel Edition 4.3.3

VALUATION OF FIXED INCOME SECURITIES. Presented By Sade Odunaiya Partner, Risk Management Alliance Consulting

David Bob Case Scenario

Setting the scene. by Stephen McCabe, Commonwealth Bank of Australia

DACT autumn diner workshop. Risk management, valuation and accounting

Managers Directive AIFs. Issued :

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

Training Agenda. Structuring and Pricing Derivatives using Numerix CrossAsset XL, CrossAsset SDKs & CAIL (C++/Java/C#)

The new ACI Diploma. Unit 2 Fixed Income & Money Markets. Effective October 2014

Tenor Adjustments for a Basis Swap

Insights. Investment strategy design for defined contribution pension plans. An Asset-Liability Risk Management Challenge

Bootstrapping the interest-rate term structure

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

Industry Environment and Concepts for Forecasting 1

Derivatives, Measurement and Hedge Accounting

Kondor+ 3.3 What s New Enterprise trade and risk management for the new world of finance

CVA: Default Probability ain t matter?

Equity-index-linked swaps

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

List of Submissions to IASB Draft Standard General Hedge Accounting. 2 Visual Risk 3 Finance and Treasury Association

IFRS Practice Issues for Banks:

Chapter Nine Selected Solutions

1. If the opportunity cost of capital is 14 percent, what is the net present value of the factory?

Swaps: complex structures

Stress Testing Trading Desks

How To Account For A Forex Hedge

P R O D U C T T R A D I N G R A T E S & C O N D I T I O N S F O R E X O P T I O N S

YIELD CURVE GENERATION

2. Determine the appropriate discount rate based on the risk of the security

Class Note on Valuing Swaps

Numerix CrossAsset XL and Windows HPC Server 2008 R2

Options on 10-Year U.S. Treasury Note & Euro Bund Futures in Fixed Income Portfolio Analysis

Understanding duration and convexity of fixed income securities. Vinod Kothari

Basel Committee on Banking Supervision. Consultative Document. Review of the Credit Valuation Adjustment Risk Framework

THE DIMENSION OF A VECTOR SPACE

Big Data & Analytics. Counterparty Credit Risk Management. Big Data in Risk Analytics

Bond valuation and bond yields

EEV, MCEV, Solvency, IFRS a chance for actuarial mathematics to get to main-stream of insurance value chain

Model Independent Greeks

A closer look Fair value measurement of financial instruments under IFRS 13

International Master Economics and Finance

1 Shapes of Cubic Functions

Transcription:

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

XVA Calculations The task is to compute T CVA E[ V( t) ( t) dt ] 0 At 10 out of 9 banks this is done by having quick models for computing Vt () for all t on all paths. This is doable and it gives job security: - Every time a new product comes along a new fast model for Vt () has to be developed and coded. - Massive amounts of hardware has to be used. 2

This is how pretty much all our competitors have designed their systems. For exotic products this approach starts running out of steam and many players (for example Barclays, BAML, Nordea, Murex, Numerix, etc) use the following approach: T C E[ V( t) ( t) dt ] 0... where V is a regression proxy for V which is obtained in a pre-simulation for each product. But in this, V needs to be a quite close (and stable) approximation of V for the calculation of E[ V( t ) ] not to go bananas due to some (or one) outlier/wing path. 3

This in turn creates a lot of work on the choice of regression basis and requires a lot of pre simulations => job security. 4

XVA Regressions Our approach is based on using the following T C E[ V( t) ( t) dt] 0 T E[ V( t) 1 ( t) dt] 0 Vt ( ) 0 regression proxy T T 0 t t futurecash flow Vt ( ) 0 T T E[ E [ c( u) du]1 ( t) dt] E[ c( u)1 ( t) dudt] 0 t Vt ( ) 0 T u E[ ( 1 ( t) dt) c( u) du] 0 0 Vt ( ) 0 CVA notional 5

We note that the approximation V is only used for determining whether V 0 We also note that the approach gives a lower bound. Effectively, what we are pricing is a contract that in case of counterparty default and portfolio value is positive to us, pays us the future cash-flows of the portfolio not the present value. Economically, there is no difference but we do not have to be able to accurately value the portfolio at default time only assess whether the portfolio has positive value to us and then simulate the cash flows. The first advantage of this is that the approximation V doesn t have to be accurate on the entire state space, it only needs to be accurate around V 0. 6

This in turn means that we do not have to work very hard on the regressions or use a very high number of pre simulations. We usually use 256-1024 pre simulations for the regressions. We have seen competitors that use 65,536 simulations in the regressions on their GPUs. 7

CVA Risk Our approach is based on using the following T C E[ V( t) ( t) dt] E[ V( t)1 ( t) dt ] 0 0 Vt ( ) 0 T... with equality only for V V. It follows that C 0 C 0 V V V V V V So if the approximation V is close to the true value around V 0, then the we can ignore re-estimating V during risk bumps. 8

Let a be a vector of parameters and let us write the CVA as C F( a, V( a), V( a )) We get C F F V F V a a V a V a dc duetochange dc duetochange 0 inbeast parameters in portfoliovalue peroptimality F F V a V a The quantity 9

F V V a... tells us what risks in the portfolio that affect the CVA and thus gives us ideas on how to restructure the portfolio to reduce the risks that affect the CVA. 10

Marginal Incremental CVA Consider the incremental CVA of changing the portfolio to V V W where 0, i.e. lim C lim { E[ [( V W)1 ]( t) ( t) dt]} 0 0 0 0 0 0 0 lim E[ [ W1 ( V W) ( V W)]( t) ( t) dt] V W 0 E[ [ W1 W1 1 V ( V)]( t) ( t) dt] V 0 V 0 W 0 E[ [ W1 W1 1 ]( t) ( t) dt] V V 0 V 0 W 0 For linear portfolios { Vt ( ) 0} has non-zero probability only if c( u) 0, u t. W 0 11

Hence, if T is the maturity of the original linear portfolio then the marginal incremental CVA splits in the two components 0 T 0 V 0 T W 0 F V on previousslides V a stand alonecva lim C E [ [ W 1 ]( t ) ( t ) dt ] E [ [ W 1 ]( t ) ( t ) dt ] If we write the original portfolio as V( t) ( S ( t) S (0)) A( t) A ( t) i i i i i i j j ATM swaps annuity positions V(0) V(0) A (0) 1 i Ai, S j i j 12

... then the marginal incremental CVA is individual par swaps and annuity trades are C F V W t A V(0) S t S A t lim, ( ) [ (0) 1 ]( ( ) (0)) ( ) 0 V S i i i i i Si lim C F V, W ( t ) [ V(0) ] A ( ) 0 i t V A S i i That is, for linear portfolios we can (more-or-less) read off the marginal CVA charge (+/-)for any vanilla trade from the risk report. So if we can create the risk reports quickly it will help us in structuring the client s portfolio. 13

Jive Infrastructure One of the primary advantages of the regression approach is that it fits (extremely) nice with the Danske infrastructure. Danske has since 2008 used a scripting language called Jive for all valuation in the quant library SuperFly. This includes everything that we trades from completely simple stuff such as FX forwards to exotic equity options. Vanilla trades typically get on-the-fly Ottomatically converted to Jive cash flows. We can reuse existing Ottomatic machinery that Jives the cash flows, we just need to modify the discounting of the simulated Jive cash flows. 14

Jive Overlay Note that there is a whole collection of different things that you want to compute once you can compute the CVA. After that you want the CVA, DVA, FVA, collateral options, CVA on collateralised counterparties, VaR, VaR on CVA, etc etc etc The new exotic are not the promised cash flows but how you discount them. This means that it makes a lot of sense give all xva calculations a Jive interface. This is what we have done with the sjivecva() function. 15

pos S S event rf_var regress() cva_ntl = cva_ntl + (1-recovery(enddate(), enddate(), SG))*(index(startdate(), startdate(), SG) - index(enddate(), enddate(), SG))*(proxy(RF_VAR)>0) pay var pay ntl rf_var 1 cva_var cva_ntl 16

This generates a script that looks something like 12-Jun-17 SWAP PAY(11JUN2018,CVG(12JUN2017,11JUN2018,ACT/360,),EUR) 12-Jun-17 _2 = CVG(12JUN2017,11JUN2018,ACT/360,) 11-Jun-18 RF_VAR REGRESS() 11-Jun-18 CVA_NTL = CVA_NTL + (1-RECOVERY(11JUN2018,11JUN2018,SG))*(INDEX(12JUN2017,12JUN2017,SG) - INDEX(11JUN2018,11JUN2018,SG))*(PROXY(RF_VAR)>0) 11-Jun-18 RF_VAR PAY(11JUN2018,1*_2,EUR,,"INT",11JUN2018,11JUN2018,) 11-Jun-18 CVA_VAR PAY(11JUN2018,CVA_NTL * _2,EUR) The structure is the following: - The yellow line is the original script. - The payment is recorded on the auxiliary variable _2 in the orange line. - The actual payment is executed on two extra variables RF_VAR and CVA_VAR in the blue lines. - The green lines specify how regressions and the CVA_NTL is updated. 17

Yellow, orange (with new var name) and blue lines are repeated for every payment. Green lines for other commands are inserted as specified by the user. Note that we can use existing Otto machinery we do not need to clone Otto to write the regression statements etc. The industrial kwant at work again! This methodology creates more lines of Jive to execute but it does not carry a higher overhead in terms market data that needs to be generated and stored during regressions. It ensures that the we correctly handle the accumulation of the CVA notional between fixing and payment. 18

...which is also useful for collateral options. 19

Regression Variables The regression variables are supplied by the Beast. Standard configuration is: - 1y and 30y zero rates for each currency. - Discount basis factor for each currency. - Fx rate for each currency pair. - Stochastic volatility factors. The actual zero rates used can be changed on the MFCs. The generated regression polynomial is only 1 st order but can be increased by the user on Beast level. 20

Note, however, that doing so can be criminal as the number of regression coefficients to be estimated will be squared. I.e. in this case (many) more pre simulations could be needed. Simulation: - Number of pre simulations.num PRE SIM = 256 - Number of simulations.num BATCH*.NUM SIM = 8*256 21

Compression Generally, the number of event dates and the amount of model data will increase linearly with the trade count and the length of the trades. For large portfolios we get to a situation where every date between here and maturity has to be simulated to and fixings have to be stored on. This is particularly a problem for the regressions because for these, bundles of paths need to be stored in the memory of the computer. However, nothing we compute here really needs daily resolution on the fixings, so it seems natural to try to standardise the dates that we simulate and the data that is being stored. 22

So the idea is to create super swaps where we distribute each payment to a standardised time and fixing grid, so that SWAP pay(1may2013, 1)...gets replaced by SWAP pay(1feb2013, 0.5) SWAP pay(1aug2013, 0.5) Further, if a portfolio consists of two swaps then we want to aggregate the pay statements so that SWAP1 pay(12aug2013, libor(),) SWAP2 pay(12aug2013, libor(),) 23

... gets replaced by PF pay(12aug2013, 2*libor(),) The idea was presented at Danske Kwant Fest (2012) by Alexander Antonov from NumeriX but I think the approach is wide spread. 24

Jive Compression Again, this task can be done without Otto intervention. First, we note that if a variable appears anywhere on the Right-Hand-Side in a Jive script, like VAR2 in VAR1 pay(12aug2014, VAR2) or VAR3 = 3*VAR2... then the payments of VAR2 cannot be compressed into payments on PF. 25

The visitor for analysing a Jive script for which variables can be compressed on is only 100 lines of code. 26

kjivecompressmachine, kjivecompressor, kjivecompresswriter The actual compression machinery is a bit more involved, about 2,000 lines of code. What it does is that it moves all dates inside fixings to be relative. For example 12may2013 SWAP pay(14aug2013, libor(12may2013, 14may2013, 14aug2013, ), )... is replaced by 1may2013 PF pay(fixdate(3m), 0.059783*libor(fixdate(), 2b, 3m), ) 1nov2013 PF pay(fixdate(3m), 0.940217*libor(fixdate(), 2b, 3m), ) 27

It is implemented as a special Jive evaluator that do +-*/ operations on map<string,double> rather than on double. 28

xva Calculation Summary Regressions are good but they have to be applied sensibly. Using the (near) optimality of the regressions largely simplify risk and marginal CVA calculations. Jive is the star of the show here. The SuperFly use of Jive for all model/product relation simplifies the CVA job greatly. By use of Jive we are able to strap on the xva calculations in a userconfigurable way. Jive also enables compression in a relatively painless way. 29

Compression is generally necessary even for 64 bit machinery.... and vice-versa: Some portfolios are so big that we need to run them on 64 bit machines even after compression. *LIVE* EXAMPLE. 30