Vectorisation in Quant Finance: Libor Swaption Portfolio Pricer (Monte-Carlo)

Benchmark Description

This application prices a portfolio of LIBOR swaptions on a LIBOR Market Model using a Monte-Carlo simulation. It also computes Greeks.

In each Monte-Carlo path, the LIBOR forward rates are generated randomly at all required maturities following the LIBOR Market Model, starting from the initial LIBOR rates. The swaption portfolio payoff is then computed and discounted to the pricing date. Averaging the per-path prices gives the final net present value of the portfolio.

The full algorithm is illustrated in the processing graph below:


More details can be found in Prof. Mike Giles’ notes [1].

This benchmark uses a portfolio of 15 swaptions with maturities between 4 and 40 years and 80 forward rates (and hence 80 delta Greeks).

[1] M. Giles, “Monte Carlo evaluation of sensitivities in computational finance,” HERCMA Conference, Athens, Sep. 2007.

  • Application Class: Pricer
  • Model: Libor Market Model
  • Instrument Type: Swaption Portfolio
  • Numerical Method: Monte-Carlo
  • Portfolio Size: 15 swaptions
  • Maturities: 4 to 40 years
  • Number of Forward Rates: 80
  • Number of Sensitivities: 80
  • Monte-Carlo Paths: 1,024K
  • Operating System: Red Hat Enterprise Linux 7.1 (64bit)
  • CPU: Intel Xeon E5-2666 v3 (Haswell)
  • RAM: 64GB RAM
  • Precision Mode: double
  • Cores: 10
  • Hyperthreading: disabled
  • Compiler: Intel Composer 16.0 (on GCC 4.8 standard library)
  • Multi-threading: disabled
The application is executed repeatedly, recording the wall-clock time for each run, until the estimated timing error is below a specified value. The full algorithm execution time from inputs to outputs is included in the measurement.

The vectorisation speedup for each approach is calculated by comparing the runtime of the vectorised code to a sequential version with vectorisation disabled in the compiler (-no-vec flag).

Vectorisation Approach Comparison

ApproachInstruction SetVectorisation LocationDescription
Auto-VectorisationHaswell (-xCORE-AVX2)autosame code as serial reference, auto-vectoriser enabled
Pragma SIMDHaswell (-xCORE-AVX2)outer loop (paths)SIMD pragma on outer loop, all functions inlined
Elemental FunctionsHaswell (-xCORE-AVX2)outer loop (paths)Path computation written as Cilk Plus elemental function, called from SIMD loop
Array NotationsHaswell (-xCORE-AVX2)outer loop (paths)Path data written as arrays, accessed via Cilk Plus array notations

Vectorisation Speedup*

*speedup of vectorised vs. a sequential non-vectorised version of the same code (higher is faster)

Whitepaper: A Guide to Choosing Vectorisation Approaches

Intel promotes various ways to manually vectorise user code for high performance gains – choosing the right approach for the given problem is an important and difficult task. This white paper gives application-specific guidelines to help choosing the best vectorisation approach for a given problem.

  • Intel Cilk Plus Array Notations
  • Intel Cilk Plus Pragma SIMD
  • Intel Cilk Plus Elemental Functions
  • Typical implementation workflow
  • Cost-benefit tradeoff
Ask A Question