Financial Mathematics and High-Performance Computing

In a long-running project for a major European bank we have designed and implemented software for front office and risk control in the area of structured equity and foreign-exchange derivatives.

A core area of our work was the efficient calculation of theoretical prices and sensitivities for complex derivatives. Another area was the support for semi-automated trading by providing approximated derivative prices in near-real time.

Implementation languages were C++, Java, and Lisp/Scheme.

Monte-Carlo Simulations

While closed-form solutions existed for certain derivatives, in many cases price and sensitivity calculations had to be based on Monte-Carlo simulations.

To reduce the high computational effort required by Monte-Carlo simulations optimizations on the mathematical, algorithmic, and technical level have been introduced, streamlining all aspects of the calculations:

  • Generation of random and quasi-random numbers. Conversion into non-uniform distributions. Creation of correlated random numbers and stochastic processes.
  • Spot simulations based on several market models (Black-Scholes, local-volatility, stochastic-volatility/Heston) with various refinements.
  • Intelligent reuse of calculated values for multiple similar computations, in particular
    • simulation of shifted markets (for the calculation of sensitivities) reusing intermediate results already computed for the unshifted market and
    • evaluation of multiple derivatives based on a single market simulation.
  • Fine-tuning of inner loops, including the analysis of generated assembly-language code.

High-Performance Computing

Besides the optimizations indicated above it was nevertheless necessary to parallelize the calculations in a high-performance computing cluster with thousands of parallel threads.

To achieve this we have rewritten and adapted the business logic code. We have also defined and implemented communication protocols and contributed to the task-distribution code.