Accelerating Option Risk Analytics in R Using GPUs

7 Pages Posted: 26 Nov 2013 Last revised: 12 Feb 2014

See all articles by Matthew Francis Dixon

Matthew Francis Dixon

Illinois Institute of Technology

Sabbir Khan

Old Dominion University

Mohammed Zubair

Old Dominion University

Date Written: November 25, 2013

Abstract

In this paper we describe our work on speeding up the Heston stochastic volatility model calibration, a financial application, on GPUs. The Heston volatility model is used extensively across the capital markets to price and measure the market risk of exchange traded financial options. When fitted to sub-minute level market mid-price quotes, the model may require frequent calibration every few minutes. The R statistical software package is easy to use and is popular with quantitative analysts in the financial industry. However, a typical R based implementation of the Heston Model calibration on a CPU does not meet the performance requirements for sub-minute level trading, i.e. mid to high frequency trading. The calibration of a Heston model is performed over M option data points which remains fixed during the calibration computation. A typical organization of this computation involves calling an optimization routine with a pointer to ErrorFunction() which estimates the error between market observed and model option prices. We implemented the calibration computation in R and observed that the computation time is dominated by the calculation of the ErrorFunction().

This paper describes the implementation of a GPU optimized kernel for this computation that can be called by the R script performing the calibration process. For M=1024 we demonstrate a factor of 760x improvement in the overall calibration time over the R sequential implementation by off-loading ErrorFunction() on a system with an Intel Core i5 processor and NVIDIA Tesla K20c (Kepler architecture) consisting of 2496 cores. Note that not all the performance gain is due to the GPU – partly it is due to the reduction in the overhead of R for the Heston model calculation. For comparison we also implemented the calibration code using C. We observed a speed up of 230x for the GPU based implementation over the C version indicating that a factor of 3.4x improvement is due to avoiding the R overhead for the Heston Model Calculation. However, the overall calibration time using R based optimization routines combined with the GPU off-loaded ErrorFunction() is comparable to a C GPU based calibration code.

Keywords: Stochastic Volatility, Calibration, R, GPGPU computing

JEL Classification: C61, C63, G12, G13

Suggested Citation

Dixon, Matthew Francis and Khan, Sabbir and Zubair, Mohammed, Accelerating Option Risk Analytics in R Using GPUs (November 25, 2013). Available at SSRN: https://ssrn.com/abstract=2359695 or http://dx.doi.org/10.2139/ssrn.2359695

Matthew Francis Dixon (Contact Author)

Illinois Institute of Technology ( email )

Department of Math
W 32nd St., E1 room 208, 10 S Wabash Ave, Chicago,
Chicago, IL 60616
United States

Sabbir Khan

Old Dominion University ( email )

Norfolk, VA 23529-0222
United States

Mohammed Zubair

Old Dominion University ( email )

Norfolk, VA 23529-0222
United States

Register to save articles to
your library

Register

Paper statistics

Downloads
151
Abstract Views
1,227
rank
193,230
PlumX Metrics