Sensitivities in Quantitative 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. Different Open-Source AD frameworks are used to compute the sensitivities and the performance is compared to forward finite differences, i.e., bumping. For reference, a manually implemented adjoint code is also added to the comparison. The number of forward rates is varied between 20 and 200, and hence 20-200 delta Greeks are computed.

[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
  • Monte-Carlo Paths: 128K
  • Number of Forward Rates: 20-200
  • Sensitivities: first order (delta)
  • Number of Sensitivities: 20-200
  • Operating System: Red Hat Enterprise Linux 7.1 (64bit)
  • CPU: Intel Xeon E5-2666 v3 (Haswell)
  • RAM: 64GB RAM
  • Compiler: GCC 4.8
  • Precision Mode: double
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 measured. The performance of the AD frameworks is compared to a forward finite differences version (“bumping”). Further, the memory used for the AD version of the algorithm is measured and compared to the bumping version.

AAD Tools Comparison

LicenseApache or ESCLEPL or GPLEPL or GPL
Forward Mode
Adjoint Mode
Max. Order1arbitraryarbitrary
External Functions
Commercial Support
Active Developers1 (Academia)3 (Academia)1 (Academia)
Latest Stable ReleaseQ2/2015 (1.1)
Q4/2017 (2.0)

Speedup vs. Bumping1

(click on the legend to select the data series to display)

Memory vs. Bumping1,2

(click on the legend to select the data series to display)

1the bumping version uses forward finite differences
2the memory of the AAD version is divided by the memory of the bumping version

Request the Source Code