Chebyshev Decomposition for Ultra-efficient Risk Calculations

Similar documents
Dynamic Initial Margin via Chebyshev Spectral Decomposition

2nd Order Sensis: PnL and Hedging

Parametric Option Pricing by Interpolation

Calculating VaR. There are several approaches for calculating the Value at Risk figure. The most popular are the

Modelling Counterparty Exposure and CVA An Integrated Approach

FINCAD s Flexible Valuation Adjustment Solution

Standardised Risk under Basel 3. Pardha Viswanadha, Product Management Calypso

Accelerated Option Pricing Multiple Scenarios

ORE Applied: Dynamic Initial Margin and MVA

A new breed of Monte Carlo to meet FRTB computational challenges

Challenges in Counterparty Credit Risk Modelling

Fast Convergence of Regress-later Series Estimators

Applications of Dataflow Computing to Finance. Florian Widmann

RISKMETRICS. Dr Philip Symes

Handbook of Financial Risk Management

arxiv: v3 [q-fin.cp] 20 Sep 2018

"Pricing Exotic Options using Strong Convergence Properties

Market Risk Analysis Volume I

Ultimate Control. Maxeler RiskAnalytics

M.S. in Quantitative Finance & Risk Analytics (QFRA) Fall 2017 & Spring 2018

Monte Carlo Methods for Uncertainty Quantification

MVA, KVA: modelling challenges

ELEMENTS OF MONTE CARLO SIMULATION

CVA. What Does it Achieve?

Introduction to Algorithmic Trading Strategies Lecture 8

Interpolation. 1 What is interpolation? 2 Why are we interested in this?

Monte Carlo Methods in Structuring and Derivatives Pricing

IEOR E4602: Quantitative Risk Management

Calculating Counterparty Exposures for CVA

The Pennsylvania State University. The Graduate School. Department of Industrial Engineering AMERICAN-ASIAN OPTION PRICING BASED ON MONTE CARLO

Lecture outline. Monte Carlo Methods for Uncertainty Quantification. Importance Sampling. Importance Sampling

Market Risk: FROM VALUE AT RISK TO STRESS TESTING. Agenda. Agenda (Cont.) Traditional Measures of Market Risk

Risk e-learning. Modules Overview.

Milliman STAR Solutions - NAVI

Algorithmic Differentiation of a GPU Accelerated Application

THE 7TH ANNUAL INITIAL MARGIN & XVA CONFERENCE 21ST - 23RD MARCH 2018

Calibration of Economic Scenario Generators. Meeting the Challenges of Change. Eric Yau Consultant, Barrie & Hibbert Asia

Bayesian Finance. Christa Cuchiero, Irene Klein, Josef Teichmann. Obergurgl 2017

Advances in Valuation Adjustments. Topquants Autumn 2015

Market Risk Analysis Volume IV. Value-at-Risk Models

Characterization of the Optimum

Monte Carlo Methods for Uncertainty Quantification

Preparing for the Fundamental Review of the Trading Book (FRTB)

Institute of Actuaries of India. Subject. ST6 Finance and Investment B. For 2018 Examinationspecialist Technical B. Syllabus

Interest Rate Bermudan Swaption Valuation and Risk

arxiv: v1 [q-fin.cp] 4 Oct 2017

Strategic Integration of xva, Margining and Regulatory Risk Platforms

Modelling Credit Spreads for Counterparty Risk: Mean-Reversion is not Needed

Monte Carlo Based Numerical Pricing of Multiple Strike-Reset Options

Extend the ideas of Kan and Zhou paper on Optimal Portfolio Construction under parameter uncertainty

Market interest-rate models

FINCAD XL and Analytics v10.1 Release Notes

Modern Derivatives. Pricing and Credit. Exposure Anatysis. Theory and Practice of CSA and XVA Pricing, Exposure Simulation and Backtest!

Statistical Models and Methods for Financial Markets

AD in Monte Carlo for finance

Machine Learning for Quantitative Finance

Strategies for Improving the Efficiency of Monte-Carlo Methods

Fast Computation of the Economic Capital, the Value at Risk and the Greeks of a Loan Portfolio in the Gaussian Factor Model

Chebyshev interpolation for parametric option pricing

Economic Scenario Generator: Applications in Enterprise Risk Management. Ping Sun Executive Director, Financial Engineering Numerix LLC

Interest Rate Cancelable Swap Valuation and Risk

Practical example of an Economic Scenario Generator

HANDBOOK OF. Market Risk CHRISTIAN SZYLAR WILEY

Strategies For Managing CVA Exposures

Razor Risk Market Risk Overview

Standard Initial Margin Model (SIMM) How to validate a global regulatory risk model

Advanced Numerical Techniques for Financial Engineering

NUMERICAL AND SIMULATION TECHNIQUES IN FINANCE

2017 IAA EDUCATION SYLLABUS

A distributed Laplace transform algorithm for European options

IFRS 13 The Impact on Derivative Valuation, Hedge Accounting and Financial Reporting. 24 September 2013 Dan Gentzel & Peter Ahlin

Model Risk Assessment

FX Smile Modelling. 9 September September 9, 2008

CVA in Energy Trading

Synergies and challenges in the implementation of Basel IV regulations

Counterparty Credit Risk under Basel III

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

IEOR E4703: Monte-Carlo Simulation

Efficient Lifetime Portfolio Sensitivities: AAD Versus Longstaff-Schwartz Compression Chris Kenyon

Credit Risk in Derivatives Products

Advanced Concepts in Capturing Market Risk: A Supervisory Perspective

arxiv: v1 [q-fin.rm] 21 Dec 2018

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Smoking Adjoints: fast evaluation of Greeks in Monte Carlo calculations

Yao s Minimax Principle

Measuring and managing market risk June 2003

RAZOR RISK CAPITAL EFFICIENCY UNDER FRTB

Credit Risk in Derivatives Products

Term Par Swap Rate Term Par Swap Rate 2Y 2.70% 15Y 4.80% 5Y 3.60% 20Y 4.80% 10Y 4.60% 25Y 4.75%

Vanilla interest rate options

Financial Mathematics and Supercomputing

Avantage Reply FRTB Implementation: Stock Take in the Eurozone and the UK

HPC IN THE POST 2008 CRISIS WORLD

Curve fitting for calculating SCR under Solvency II

Alternative VaR Models

Bloomberg. Portfolio Value-at-Risk. Sridhar Gollamudi & Bryan Weber. September 22, Version 1.0

RunnING Risk on GPUs. Answering The Computational Challenges of a New Environment. Tim Wood Market Risk Management Trading - ING Bank

Financial Risk Management and Governance Other VaR methods. Prof. Hugues Pirotte

Valuation of Forward Starting CDOs

Transcription:

Chebyshev Decomposition for Ultra-efficient Risk Calculations 13 th Fixed Income Conference Florence, October 2017 The Underlying Methods behind MoCaX Intelligence by iruiz Technologies Copyright 2017 iruiz Technologies Ltd V1.4.0

Contents Chebyshev Techniques 101 Applications to Pricing Functions Applications to Risk Management 2

Who we are Everything we do is based on the believe that we can change the status quo of what can be done with a computer 3

Disclaimer iruiz Technologies Ltd company was founded as a niche technology company in 2014 with the aim of performing research and development on algorithmic solutions to the computational challenges that the financial industries are facing. Intellectual Property in Banks Intellectual Property (IP) protection in the financial services industry context is becoming increasingly common. For example, the US Patents and Trademark Office is currently receiving around 1,000 finance-related patent applications every year. As an example, the patent application of the well-known Standard Initial Margin Model (SIMM) by ISDA. IP The basis of the willingness to share this research is founded on the protection offered by the worldwide IP framework. The methods described in this presentation for risk calculations have their IP protected by a number of patents*. Scope of IP protection: The first part of this presentation explains mathematical theory. Mathematical theories cannot be patented, hence they are not the subject of the IP protection In the second part of this paper, we explain an application of the theory in the context of Risk Calculation Engines; it is this application that is the subject to the abovementioned IP protection The application is called MoCaX Intelligence Similarly to SIMM This method is available to any institution to implement subject to patent licensing* (*) Patents pending approval (**) Source: EnvisionIP 4

Paper This presentation is a summary of the paper Chebyshev Methods for Ultra-efficient Risk Calculations Available at mocaxintelligence.com/research 5

Independent Validation The same methods has been independently described, applied and tested to risk calculations by the Technical University of Munich 6

Chebyshev techniques in Risk Calculations 1. Polynomial interpolations have an undeserved bad reputation It all depends how you use them 2. Chebyshev methods offer outstanding techniques to replicate pricing functions Full-reval precision Ultra-low CPU load Generic implementation 3. This creates enormous benefits in Risk Calculations 7

Chebyshev techniques 101 8

Polynomial Interpolation has a pretty bad reputation The following quotes, that can be found in the Numerical Analysis textbooks, are misleading Polynomial interpolants rarely converge to an general continuous function. Polynomial interpolation is a bad idea (1989) By their very nature, polynomials of a very high degree do not constitute reasonable models for a real-life phenomena! (2004) The oscillatory nature of high-degree polynomials, and the property that a fluctuation over a small proportion of the interval can induce large fluctuations over the entire range, restricts their use (2005) These untrue type of assertions have misled us for many years 9

These ideas have been encouraged by a few misleading results Example Runge s phenomena A famous example was given by Runge in 1901. He showed that equidistant interpolation not only diverges for the function 1 1 + 25x 2 but it diverges exponentially. A result by Faber in 1914 for the class of continuous functions there is no polynomial interpolation scheme that will ensure convergence Source of graph and comments: Wikipedia 10

However Lipschitz continuous As soon as we restrict the functional space to Lipschitz continuous functions, we can have guaranteed convergence of polynomial interpolations Analytic functions As soon as we restrict ourselves to analytic functions, polynomial interpolations can be exponentially convergent, as we will see next, if the interpolation scheme is the right one. Continuous Functions Lipschitz Continuous Functions Analytical Functions Taylor Expansions Trigonometric Logarithmic Exponential Derivative Pricers In practical risk calculation, pricing functions are either analytic, or piecewise analytic in known segments (that is why we use Taylorbased Greeks) Derivative Pricers 11

Intuition of the Chebyshev framework If we know nothing of a function and want to create a generic interpolator, what makes sense as an interpolation geometry in R? Equidistant points Concentrate the points where curvature is high What if we Extend the function in the complex C plane Get equidistant points in the unitary circle Go back to the real line R I +i 7 equidistant points in the unitary circle in C Their projection in R -1 +1 R 12

Given a function f, let s consider these mathematical objects Chebyshev Expansion projection of f onto the space generated by the Chebyshev basis functions Chebyshev Polynomials T 0 x = 1; T 1 x = x T j+1 = 2xT j T j 1 f x = k=0 a k T k x a k = 2 1 π න f x T k x 1 1 x dx 2 Truncated Chebyshev Expansion projection of f onto the space generated by first n Chebyshev polynomials f n x = k=0 Chebyshev Interpolant interpolant polynomial of f on Chebyshev points p n x = n n k=0 a k T k x c k T k x x j = cos j Τ Chebyshev Points π n, 0 j n. 13

Theorem 1. Convergence of Chebyshev Series Let f be a Lipschitz continuous function on [ 1, 1]. Then it has a unique representation as a Chebyshev series, which is absolutely and uniformly convergent. Proof: J. Mason, D. Handscomb. Chebyshev Polynomials. CRC, 2003. That is given ε > 0 there is a natural number N so that if n > N, f f n ε 14

Theorem 2. Chebyshev Interpolant Let f be a continuous function on [-1,1] Let {x 0,..., x n } be the first n+1 Chebyshev points on [-1,1] Let {v 0,..., v n } be the values of f on {x 0,..., x n } p n x = By applying the Fast Fourier Transform on {v 0,..., v n }, one can obtain an expression for the Chebyshev Interpolant to f in O(nlogn) operations. Moreover, if f is Lipschitz continuous, then the Chebyshev Interpolant converges to f at the same rate as the Chebyshev series. n k=0 c k T k x Proof: N. Ahmed and P. S. Fisher, Study of algorithmic properties of Chebyshev coefficients, Int. J. Computer Math. 2 (1970), 307 317. 15

Theorem 3. Convergence rate + Extension to any dimension Let f be an analytic function on a compact domain in R D. Suppose it has a bounded analytic continuation to a Bernstein ellipse in C D. Then the Chebyshev interpolant of degree n converges exponentially to the function f as n tends to infinity. That is f p n o(ρ n ) Proof: S. Bernstein (1912c), Sur l Ordre de la Meilleure Approximation des Fonctions Continues par des Polynomes de Degré Donné, Mém. Acad. Roy. Belg., 1912 M. Gaß, K. Glau, M. Mahlstedt, M. Mair. Chebyshev Interpolation for Parametric Option Pricing. Preprint. https://arxiv.org/abs/1505.04648 Equation in 1-D. f(x) M. ρ: Bernstein ellipse foci 16

Example: Runge Function Runge function and its interpolator, with 15 points, via 1. Interpolator, Equidistant points (blue line) 2. Interpolator, moving the Equidistant points towards Chebyshev points (orange line) 3. Interpolator, moving the Equidistant points towards Chebyshev points (yellow line) 4. Interpolator, moving the Equidistant points towards Chebyshev points (maroon line) 5. Interpolator, Chebyshev points (green line) 6. Actual Runge function (under the green line) We can appreciate how the interpolating function converges towards the Runge function as we move the interpolating Equidistant points towards the Chebyshev points 17

Theorem 4. Control of error Let f be Lipschitz continuous on [-1,1], let f n be its truncated Chebyshev series, let p n be its Chebyshev interpolant and let a k and c k be the Chebyshev coefficients of f n and p n, respectively. Then c 0 = a 0 + a 2n + a 4n +, c k = a k + (a k+2n + a k+4n + ) + (a k+2n + a k+4n + ) c n = a n + a 3n + a 5n +, We can control the error of the approximation without knowing anything about the function, apart from the fact that it is Lipschitz continuous Proof: C.W. Clenshaw and A.R. Curtis, A method for numerical integration on an automatic computer, Numer. Math. 2 (1960), 197-205. 18

Illustrative example Machine Precision 19

Summary so far 1. Polynomial interpolation has an unfair bad reputation 2. If we interpolate on Chebyshev points, we obtain exponential convergence and we can control the (very small) error 3. This can be extended to any dimension What if we apply this to the Pricing Function in a Risk Calculation? We should be able to Replicate the pricing function with very few points With very high accuracy Super-efficient evaluation Controlling the error 20

Applying Chebyshev to Pricing Functions 21

Context Generic Risk Calculation Engine The bottleneck of the risk calculation: 80-99% of total computational time Input Collection MC preparation Standard approach Original Pricer 1 Scenario Generation Pricing Special Modelling Collateral, WWR Risk Metrics VaR, ESF, XVAs, PFE 1 2 Fast approach Ultra-accurate Chebyshev The trick is to use the right interpolation scheme Output Incorporation Build mocax objects Evaluate original pricer Evaluate mocax objects 22

What makes this approach work? In this approach Evaluating the Interpolator is ultra-fast So, the trick is to Call the pricing function as little as possible in the Building phase, while ensuring very high accuracy in the interpolation scheme 23

Example of convergence in an Option Linear Interpolation Chebyshev Interpolation Machine Precision Interpolation Technique Grid Size Precision Improvement Linear 256 (16x16) 10-1 n/a Chebyshev 256 (16x16) 10-7 Perfect pricing Chebyshev 25 (5x5) 10-1 10% of original CPU effort 24

What if we apply it to exotic pricing functions? Pricer Pricing Method QuantLib Run Time (ms) MoCaX* Build Time** (ms) MoCaX* Run Time (ms) MoCaX* Accuracy MoCaX* Run Speed Multiplier IRS Analytic 0.214 2.675 0.000103 10-15 2,088 European Option Analytic 0.013 0.209 0.000127 10-6 110 American Option Monte Carlo 23.103 247.117 0.000096 10-6 239,668 Bermudan Swaption Tree 318.99 3642.12 0.000127 10-5 2,511,737 Barrier Option Analytic 0.024 0.3 0.000125 10-4 192 Barrier Option Monte Carlo 601.919 6590.522 0.000103 10-3 5,843,883 Minimum Build CPU effort Ultra-low CPU evaluation effort Ultra-high accuracy*** Enormous CPU consumption improvement (*) By MoCaX it is meant our implementation of the described Chebyshev methods (**) 1D case, i7 processor, mono-core compute (***) The low accuracy of the Barrier Option via MC is due to lack of precision in the original pricer 25

Chebyshev Splines and, if needed, we can do Chebyshev Splines One single Chebyshev Interpolant One single Chebyshev Interpolant No. Points 12 No. Points 60 Precision 10-4 Precision 10-4 Splines of Chebyshev Interpolants No. Points 16 Precision 10-4 26

Risk Management Applications 27

CVA, FVA and IMM of exotics MoCaX enables the computation of Exposure profiles of exotics very efficiently Example: Bermudan Swaptions MoCaX can compute the same EPE and PFE profiles with 0.8% of the CPU effort (10,000 scenarios) Pricing Method MC scens Building step effort Evaluation effort Total effort CPU Gain Full-reval 1,000 n/a 10h:54m 10h:54m n/a Full-reval 10,000 n/a 4d:12h:58m 4d:12h:58m n/a Full-reval 100,000 n/a 45d:10h:05m 45d:10h:05m n/a MoCaX 1,000 0h:53m 70 msec 0h:53m:00s 8% MoCaX 10,000 0h:53m 700 msec 0h:53m:01s 0.8% MoCaX 100,000 0h:53m 7,000 msec 0h:53m:07s 0.08% (*) Full-reval effort for 10,000 and 100,000 scenarios extrapolated from a 1,000 scenarios run 28

XVA sensitivities Most of the CPU effort with this technique is in the Building Phase Once the Interpolating Object is built, we can reuse it as often as needed Each evaluation in the MC takes a few nano-seconds Pricing Method MC scens Building step effort Evaluation effort Total effort CPU Gain Full-reval 1,000 n/a 10h:54m 10h:54m n/a Full-reval 10,000 n/a 4d:12h:58m 4d:12h:58m n/a Full-reval 100,000 n/a 45d:10h:05m 45d:10h:05m n/a MoCaX 1,000 0h:53m 70 msec 0h:53m:00s 8% MoCaX 10,000 0h:53m 700 msec 0h:53m:01s 0.8% MoCaX 100,000 0h:53m 7,000 msec 0h:53m:07s 0.08% 0.0002% CPU effort We can compute sensitivities of exotics via Bump-and-reval very easily 29

Initial Margin simulation Once we have built the Interpolating Object, computing its derivatives is trivial P x = n k=0 c k T k x P x = the same coefficients n k=0 c k T k x Delta Vega Gamma Vanna Chebyshev-based Greek surfaces for an option 30

Initial Margin simulation Example Portfolio of 50 IR swaps 5 Bermudan swaptions 50 Equity exotic options 10,000 scenarios 70 time steps 50,000,000 sensitivities simulated Ultra-fast Low CPU consumption Intra-day computations Sensitivities qperfect accuracy Backtesting passed No regression error Easy to implement No AAD complications (*) RFE 2-factor models, i7 processor, mono-core compute 31

Dimensionality of the State Space Starting from a Risk Factor model Risk Factor Scenarios (State Space) Market Scenarios Output g R 2 R 200 P R 2-factor H&W short rates 1-factor H&W short rate + StochVol factor Yield curves Spread curves Vol surfaces Price Sensitivities R 2 State Space technique used in regression-based pricing f = P g R 32

Credit to Dimensionality Reduction of State Space Starting from Market Scenarios (e.g. complex XVA/IMM, FRTB) Risk Factors Scenarios (State Space) R 20 = R 3 +R+ + R PCA decomposition with orthogonal sliding Neural Network driving variable R 3 +R+ + R g Market Scenarios R 200 Yield curves Spread curves Vol surfaces f = P g P Output R Built with ~ 80 to 300 calls to original pricer Price Sensitivities R 33

Machine Learning Optimising MVA With Chebyshev risk calculations are so fast that we can use a complex risk computation as the Objective Function in a Machine Learning algorithm E.g. MVA optimisation Once MVA can be calculated correctly and efficiently, the next natural step is to seek strategies to minimise it We consider a strategy similar to the one proposed in the work of A. Kondratyev and G. Giorgidze ([KG]) Optimised portfolio Cpty A Existing portfolio Swap 1 Swap 2 Cpty B Swap i Swap N Swap payer Swap receiver Cpty C Cpty D What are the notional, maturity and counterparties of 2 offsetting swaps that would minimise our MVA when added to the portfolio? 34

IMA-FRTB Correlation between FO pricer and MoCaX pricer The problem IMA-FRTB requires several thousand revaluations daily and we need to pass the P&L Attribution Test (PLAT) Technologies: Full-reval, extremely expensive Greeks, do not pass PLAT for non-linear products Solution: Dimensionality Reduction* + MoCaX IMA-FRTB capital charge (full calculation) Tested portfolio: Swaps, Swaptions and Bermudan Swaptions 841 Risk factors as inputs Ultra-accurate pricing with 1-5 % of CPU load Important hardware cost reduction Passing P&L Attribution tests Industrialised implementation (*) Dimensionality Reduction via PCA + Orthogonal Sliding. Study to be published soon. 35

Pricer Cloning MoCaX enables creating a replica of a pricing function (e.g. Front Office) in a Risk System 36

PPC: portfolio pricing compression Further acceleration can be created as a result of the properties of Chebyshev series and interpolants The Chebyshev coefficients are additive Trade 1 Trade 2 P 1 x = P 2 x = n k=0 n k=0 c k 1 T k x c k 2 T k x n P 1+2+ +5000 x = k=0 Portfolio c k 1 + c k 2 + + c k 5000 T k x Trade 5,000 P 5000 x = n k=0 c k 5000 T k x If we have a portfolio of 5,000 trades on the same underlying This property enables a 5,000 times multiplier in evaluation effort 37

AAD Adjoint Algorithmic Differentiation is an excellent methodology Key problem Implementation is far from trivial We need to build the Adjoint version of each pricer High implementation cost, High maintenance cost, High project risk Alternative We can build the Adjoint of its Chebyshev version P x = Much easier to implement, all pricers share the same Adjoint code We have not tested it yet n k=0 c k T k x P x = Interested to collaborate with us? Let us know! n k=0 c k T k x 38

Quick way to play with Chebyshev techniques chebfun.org Chebfun Matlab package Chebyshev-based function approximation software Developed by Prof. Trefethen group, Oxford University 39

Ways we can help 1. Consulting Work with you to help assess where and how you can benefit from Chebyshev techniques 2. Proof-of-Concept Implement a proof of concept in a specific application, using our MoCaX DLL 3. Share of knowledge We share all our know-how for you to build the DLL 40

Conclusions 1. We can change the status quo of what can be done with a computer 2. Chebyshev techniques enable the replication of pricing functions so they can be streamlined for ultra-fast computing 3. Benefits are endless P x = n k=0 c k T k x 41

Would you like to know more? Ignacio Ruiz Founder & CEO Emilio Viudez Head of Client Solutions iruiz Technologies Fulham Green 81-83 Fulham High St London SW6 3JA MoCaXintelligence.com i.ruiz@iruiztechnologies.com e.viudez@iruiztechnologies.com m.zeron@iruiztechnologies.com (+44) 203 542 1525 42