Back Testing of HFT Strategies with Xcelerit and GPUs

July 26th, 2013

Algorithmic trading has become ever more popular in recent years – accounting for approximately half of all European and American stock trades placed in 2012. The trading strategies need to be back-tested regularly using historical market data for calibration and to check the expected return and risk. This is a computationally demanding process that can take hours to complete. However, back-testing the strategies frequently intra-day can significantly increase the profits for the trading institution.

A basic trading strategy has been implemented that depends on several trading indicators. The strategy depends on several parameters, calibrated using a sweep over the parameter space and computing the Sharpe ratio using real-world historical price data (90,000 minute-by-minute price points). The parameter combination that maximises the Sharpe ratio is considered optimal. The parameter space searched comprises 4 million combinations. Below is an overview of the results on multi-core CPU and GPU resources, achieved with minor changes of the original sequential code using the Xcelerit API:

  • Original (sequential): 6,513s
  • Xcelerit CPU (12 cores): 552s (11.8x)
  • Xcelerit GPU: 71.8s (91x)

CPU: Dual Intel Xeon E5-2667
GPU: Nvidia Tesla K20X

More information is available at http://www.xcelerit.com/back-testing-hft-strategies