Accelerating Quantitative Financial Computing with CUDA and GPUs

Similar documents
GPU-Accelerated Quant Finance: The Way Forward

Hanweck Associates, LLC High Performance Financial Analytics

SPEED UP OF NUMERIC CALCULATIONS USING A GRAPHICS PROCESSING UNIT (GPU)

PRICING AMERICAN OPTIONS WITH LEAST SQUARES MONTE CARLO ON GPUS. Massimiliano Fatica, NVIDIA Corporation

Hedging Strategy Simulation and Backtesting with DSLs, GPUs and the Cloud

Monte-Carlo Pricing under a Hybrid Local Volatility model

F1 Acceleration for Montecarlo: financial algorithms on FPGA

Pricing Early-exercise options

HPC IN THE POST 2008 CRISIS WORLD

HIGH PERFORMANCE COMPUTING IN THE LEAST SQUARES MONTE CARLO APPROACH. GILLES DESVILLES Consultant, Rationnel Maître de Conférences, CNAM

Financial Mathematics and Supercomputing

Ultimate Control. Maxeler RiskAnalytics

Stochastic Grid Bundling Method

Outline. GPU for Finance SciFinance SciFinance CUDA Risk Applications Testing. Conclusions. Monte Carlo PDE

Financial Risk Modeling on Low-power Accelerators: Experimental Performance Evaluation of TK1 with FPGA

Domokos Vermes. Min Zhao

Numerix Pricing with CUDA. Ghali BOUKFAOUI Numerix LLC

Many-core Accelerated LIBOR Swaption Portfolio Pricing

Analytics in 10 Micro-Seconds Using FPGAs. David B. Thomas Imperial College London

Accelerating Financial Computation

Outline. GPU for Finance SciFinance SciFinance CUDA Risk Applications Workstation Testing. Enterprise Testing Dell and NVIDIA solutions Conclusions

Seasonal Patterns in U.S. Equity Volatility

WHITE PAPER THINKING FORWARD ABOUT PRICING AND HEDGING VARIABLE ANNUITIES

Barrier Option. 2 of 33 3/13/2014

Efficient Reconfigurable Design for Pricing Asian Options

New GPU Pricing Library

Applications of Dataflow Computing to Finance. Florian Widmann

Multi-level Stochastic Valuations

History of Monte Carlo Method

Efficient Reconfigurable Design for Pricing Asian Options

Accelerated Option Pricing Multiple Scenarios

Machine Learning for Quantitative Finance

Algorithmic Differentiation of a GPU Accelerated Application

S4199 Effortless GPU Models for Finance

NtInsight for ALM. Feature List

NAG for HPC in Finance

Exotic Derivatives & Structured Products. Zénó Farkas (MSCI)

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

Implementing Models in Quantitative Finance: Methods and Cases

Advanced Equity Derivatives by Oliver Brockhaus

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

A new breed of Monte Carlo to meet FRTB computational challenges

ANALYSIS OF THE BINOMIAL METHOD

Computational Finance Binomial Trees Analysis

Computational Finance in CUDA. Options Pricing with Black-Scholes and Monte Carlo

arxiv: v1 [q-fin.cp] 17 Jan 2011

Algorithmic and High-Frequency Trading: Why Now and How?

2.1 Mathematical Basis: Risk-Neutral Pricing

GRAPHICAL ASIAN OPTIONS

Near Real-Time Risk Simulation of Complex Portfolios on Heterogeneous Computing Systems with OpenCL

Local Volatility FX Basket Option on CPU and GPU

Operational Risk Quantification System

Razor Risk Market Risk Overview

Efficient Random Number Generation and Application Using CUDA

NINTH EDITION FUNDAMENTALS OF. John C. Hüll

Quantitative Finance COURSE NUMBER: 22:839:510 COURSE TITLE: Numerical Analysis

Proxy Techniques for Estimating Variable Annuity Greeks. Presenter(s): Aubrey Clayton, Aaron Guimaraes

Introduction to WealthBench:

Model Risk Assessment

Collateralized Debt Obligation Pricing on the Cell/B.E. -- A preliminary Result

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

CFE: Level 1 Exam Sample Questions

Unparalleled Performance, Agility and Security for NSE

FINANCIAL DERIVATIVE. INVESTMENTS An Introduction to Structured Products. Richard D. Bateson. Imperial College Press. University College London, UK

Option Pricing with the SABR Model on the GPU

Managing the Newest Derivatives Risks

Fundamentals of Futures and Options Markets

Martingale Methods in Financial Modelling

Numerix Economic Scenario Generator

Martingale Methods in Financial Modelling

Valuation of Forward Starting CDOs

Handbook of Financial Risk Management

Financial Instruments Valuation and the Role of Quantitative Analysis in a Consulting Firm

FUNDAMENTALS OF FUTURES AND OPTIONS MARKETS

Energy-Efficient FPGA Implementation for Binomial Option Pricing Using OpenCL

Monte Carlo Methods in Finance

Liangzi AUTO: A Parallel Automatic Investing System Based on GPUs for P2P Lending Platform. Gang CHEN a,*

Computational Finance. Computational Finance p. 1

by Kian Guan Lim Professor of Finance Head, Quantitative Finance Unit Singapore Management University

CUDA-enabled Optimisation of Technical Analysis Parameters

Black-Scholes option pricing. Victor Podlozhnyuk

Monte Carlo Option Pricing

Callable Swaps, Snowballs and Videogames

Automatic Generation and Optimisation of Reconfigurable Financial Monte-Carlo Simulations

MONTE-CARLO SIMULATION CALCULATION OF VAR (VALUE-AT-RISK) & CVAR (CONDITIONAL VALUE-AT-RISK)

Pricing and Trading CVA

Session 76 PD, Modeling Indexed Products. Moderator: Leonid Shteyman, FSA. Presenters: Trevor D. Huseman, FSA, MAAA Leonid Shteyman, FSA

Impact of negative rates on pricing models. Veronica Malafaia ING Bank - FI/FM Quants, Credit & Trading Risk Amsterdam, 18 th November 2015

Contents Critique 26. portfolio optimization 32

Numerical Evaluation of Multivariate Contingent Claims

Latest Developments: Interest Rate Modelling & Interest Rate Exotic & Hybrid Products

Accelerating Reconfigurable Financial Computing

TRΛNSPΛRΣNCY ΛNΛLYTICS

Challenges in Counterparty Credit Risk Modelling

Cross Asset CVA Application

Global Calibration. 1 Calibration Strategies. Claudio Albanese 1. August 18, 2009

Monte Carlo Methods in Structuring and Derivatives Pricing

ARM. A commodity risk management system.

Assessing Solvency by Brute Force is Computationally Tractable

INTRODUCTION TO THE ECONOMICS AND MATHEMATICS OF FINANCIAL MARKETS. Jakša Cvitanić and Fernando Zapatero

Transcription:

Accelerating Quantitative Financial Computing with CUDA and GPUs NVIDIA GPU Technology Conference San Jose, California Gerald A. Hanweck, Jr., PhD CEO, Hanweck Associates, LLC Hanweck Associates, LLC 30 Broad St., 42nd Floor New York, NY 10004 www.hanweckassoc.com Tel: +1 646-414-7274 1

Agenda 2 Why GPUs in Quant Finance? Overview of GPU Technology GPU Quant Finance Case Studies 1: Real-Time Option Analytics 2A: Stochastic Volatility Modeling 2B: Stochastic Volatilty + Jumps Modeling 3A: Large-Scale Interest-Rate Swaps Value-at-Risk (VaR) 3B: Large-Scale Monte Carlo VaR 3C: Large-Scale Parametric VaR 4: Pricing a Basket Barrier Option 5: Random Number Generation Concluding Remarks

Q: What Is the Biggest Problem Facing the Capital Markets Today? A: Intraday and Real-Time Risk Management Increasingly complex, global structured products Higher correlation risk and systemic risk Greater regulatory requirements Massive grid-computing infrastructure costs Exploding market-data message rates 3

GPU Acceleration in Quant Finance Random number generation Path generation Payoff function acceleration Statistical aggregation Investment Banks Hedge Funds Prop Trading Trees and lattices Matrix algebra Numerical integration Fourier transforms Asset Managers Insurance Companies Automated Market Making Equity derivatives Interest-rate derivatives Credit models Exotics and hybrids Pension Plans Mortgage Servicers Risk Managers 10x faster dollar-for-dollar than conventional CPU computing. 10x faster means: overnight over lunch over lunch get a cup of coffee get a cup of coffee don t blink! Better risk management. Reduce total cost of ownership and infrastructure cost explosion. 4

GPUs in Quant Finance Source: NVIDIA 5

Hanweck Associates Volera GPU-Accelerated Product Line Real-time, low-latency datafeed of options implied volatilities and greeks covering global markets, powered by Hanweck Associates Volera GPU-accelerated engine. VoleraFEED powers: ISE Implied Volatility & Greeks Feed TM Premium Hosted Database TM Hosted historical and real-time tick-level database service of equity and options prices and analytics, with 300+ TB of data stored in an enterprise-scale cloud. Dataand-Analytics-as-a-Service paradigm. In partnership with Options Analytics High-performance, real-time, largeportfolio pre/post-trade risk and portfolio margining, powered by Hanweck Associates Volera GPU-accelerated engine. TM Options Volatility Service TM Historical, end-of-day options analytics database covering more than 6,000 U.S. companies over the past 12 years. In partnership with 6

NVIDIA GPU Performance Source: NVIDIA 7

NVIDIA GPU Architecture Instruction Cache Scheduler Scheduler Dispatch Dispatch 2,688 CUDA cores* 3.95 Tflops single-precision 1.31 Tflops double-precision 6 GB ECC DRAM 250 GB/sec DRAM bandwidth 64 KB of RAM for shared memory and L1 cache (configurable) DRAM I/F Giga Thread HOST I/F DRAM I/F Streaming Multiprocessors (SMs) L2 Streaming Multiprocessors (SMs) DRAM I/F DRAM I/F DRAM I/F DRAM I/F Register File Load/Store Units x 16 Special Func Units x 4 Source: NVIDIA Interconnect Network * Tesla K20X series GPU 64K Configurable Cache/Shared Mem Uniform Cache 8

Case Study #1: Real-Time Options Analytics Real-time, low-latency implied volatilities and Greeks (binomial tree) Hanweck Associates VoleraFEED Real-Time Options Analytics Engine real-time, low-latency implied volatilities and Greeks U.S. OPRA universe: 530,000 options on 3,800 stocks 2012: 4.6 million msg/sec peak 2014: 15.1 million msg/sec peak* 128-step CRR binomial tree discrete dividends (escrowed) discount and borrow curves bid/ask/mid implieds & mid Greeks OPRA messages per second 16,000,000 14,000,000 12,000,000 10,000,000 8,000,000 6,000,000 4,000,000 2,000,000 2014 projected Average Chain Calculation 20 milliseconds** 0 2005-04 2005-10 2006-04 2006-10 2007-04 2007-10 2008-04 2008-10 2009-04 2009-10 2010-04 2010-10 2011-04 2011-10 2012-04 2012-10 2013-04 2013-10 * OPRA Jan 2014 projection ** 4 NVIDIA Kepler K10s 9

Case Study #2A: Stochastic Volatility Modeling Price options under the Heston* stochastic volatility model: European-style call and put options Solution involves numerical integration of complex-valued integrands for each distinct strike and expiry Simpson s rule with dynamic integration ranges Hardware: NVIDIA C2070 GPU vs. Intel Xeon E5640 (2.67 GHz) Option Pricing under Stochastic Volatility: 2,000 option pricings per second (70x faster than a single CPU core) * Heston, Steven L. A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bond and Currency Options, The Review of Financial Studies, 6(2), 1993, pp. 327-343. 10

Case Study #2B: Stochastic Volatility+Jumps Modeling Price options under the Bates* stochastic volatility+jumps model European-style call and put options Solution involves FFT integration of the characteristic function for each expiry across range of strikes** NVIDIA C2090 GPU, cufft 4.0 Volatility Surface SPX 11/9/2012 Option Pricing under Stochastic Volatility + Jumps: 1,200 expiry pricings per second (double precision, 2^15 nodes) 11 * Bates, David S. Jumps and Stochastic Volatility: Exchange Rate Processes Implicit in Deutsche Mark Options, The Review of Financial Studies, 9(1), 1996, pp. 69-107. ** Carr, Peter et al. Option Valuation Using the Fast Fourier Transform, Journal of Computational Finance, 2(4), 1999, pp. 61-73.

Case Study #3A: Large-Scale Interest-Rate Swaps Risk Calculate Value-at-Risk (VaR) for a large-scale portfolio of interestrates swaps (IRS): 30,000 distinct IRS positions. 1,300 Monte Carlo paths representing yield-curve shocks. Full cash-flow and day-count revaluation in each path. Calculation of VaR and expected shortfall. Hardware: 1 NVIDIA C2090 GPU w/ 8-core Xeon host server. Large-Scale, IRS VaR: 10 seconds (vs. 45 minutes on a CPU-based compute grid) 12

Case Study #3B: Large-Scale Monte Carlo Risk System for real-time risk monitoring of large portfolios of listed options: 350,000 distinct options representing the listed universe. 10,000 Monte Carlo paths generated from factor shocks (2,500 factors) on 3,500 underlying stocks and indices. Hundreds of large portfolios. Full binomial-tree revaluation of each option in each path. Calculation of VaR and expected shortfall under multiple correlation scenarios. Hardware: 24 NVIDIA C2050 GPUs w/ 8-core Xeon host servers. Large-Scale, Full-Revaluation Monte Carlo VaR: < 1 minute (hundreds of times faster than a single CPU core) 13

Case Study #3C: Large-Scale Parametric VaR System developed for a large investment bank to evaluate parametric factor VaR on millions of private client portfolios, with aggregation across accounts, advisors, offices and regions: 1.25 million portfolios 2,000 factors covering 400,000 global assets Hardware: 12 NVIDIA C2050 GPUs w/ 8-core Xeon host server Large-Scale Parametric Factor VaR: 2 minutes (hundreds of times faster than a single CPU core) 14

Case Study #4: Basket Barrier-Option (Monte Carlo) Valuing a basket barrier-option Monte Carlo simulation of a multi-factor, local-volatility model for pricing lookback structures: CPU 1 Time GPU 2 Time 4 underlying assets (sec) (sec) 100,000 MC paths 750 steps per path Stage 1: RNG 20.2 0.139 Stage 2: Path Gen 23.5 0.181 Stage 3: Payoffs 8.5 0.223 Stage 4: Stats 9.3 0.061 Total 61.9 0.604 Performance Gain Realistic dollar-for-dollar 3 performance gain: 12x faster 1. One core of Intel Xeon L5640 @ 2.26GHz 2. One NVIDIA Fermi C2070 GPU 3. Performance adjusted for: core/gpu density, amortized hardware costs, power/cooling costs, etc. 102x faster 15

Case Study #5: Random Number Generation Implementation of a GPU-parallel Monte Carlo simulation and random-number generator for a major investment bank: Monte Carlo simulation of a multi-factor, local-volatility model for pricing lookback structures Implementation of an efficient GPU-parallel random-number generator* Hardware: 1 NVIDIA C2070 GPU w/ 8-core Xeon host server GPU-Parallel Monte Carlo: 2.5 billion normal random numbers per second (200x faster than a single CPU core) * L Ecuyer, Pierre; Richard Simard; E. Jack Chen and W. David Kelton, An Object-Oriented Random-Number Package with Many Long Streams and Substreams, Working Paper, December 2000. 16

Random-Number Generation Large base of existing GPU code and resources: NVIDIA s curand RNG library http://developer.nvidia.com/curand L Ecuyer (MRG32k3a), MTGP Mersenne Twister, XORWOW PRNG and Sobol QRNG NVIDIA s CUDA SDK sample code: Niederreiter, Sobol QRNGs, Mersenne Twister Monte Carlo examples GPU Gems 3 and GPU Computing Gems (Emerald Edition) GPU Gems 3 is available online: http://developer.nvidia.com/object/gpu-gems-3.html Tausworth, Sobol and L Ecuyer (MRG32k3a) Monte Carlo examples (GPU Gems 3) 17

Concluding Remarks Real-time and intra-day risk management is a major problem facing the financial industry today... but it is pushing conventional computing to its limits. GPUs are the way forward. Major financial institutions are using them for quant finance. Performance gains of more than 10x dollar for dollar are achievable in practice in many common use cases, which is generally sufficient to offset the costs of new development. GPU programming in general and CUDA in particular push developers to parallelize their code. Parallelizing quant finance is critical if quant finance software is to take advantage of the advances in many-core hardware. 18

This presentation has been prepared for the exclusive use of the direct recipient. No part of this presentation may be copied or redistributed without the express written consent of the author. Opinions and estimates constitute the author s judgment as of the date of this material and are subject to change without notice. Information has been obtained from sources believed to be reliable, but the author does not warrant its completeness or accuracy. Past performance is not indicative of future results. Securities, financial instruments or strategies mentioned herein may not be suitable for all investors. The recipient of this report must make its own independent decisions regarding any strategies, securities or financial instruments discussed. This material is not intended as an offer or solicitation for the purchase or sale of any financial instrument. Copyright 2013 Hanweck Associates, LLC. All rights reserved. Additional information is available upon request. 19