Accelerating option risk analytics in R using GPUs

2014 
Broadly, a major prerequisite for analytics applications is robustness to modeling idiosyncrasies. As a result, there is a demand for comprehensive model exploration and validation in high level statistical programming environments such as R. Many financial applications require on-demand processing, which in turn requires fast modeling and calibration computations. In this paper we describe our work on speeding up the calibration of a Heston stochastic volatility model, 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. 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. The most computation intensive part of this computation is the ErrorFunction() which estimates the error between market observed and model option prices. We have implemented the ErrorFunction() using a MapReduce design pattern leading to efficient implementation on various architectures including GPUs. In this paper, we describe 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/C++. We observed a speed up of 230x for the GPU based implementation over the C/C++ 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/C++ GPU based calibration code.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    17
    References
    5
    Citations
    NaN
    KQI
    []