OXFORD UNIVERSITY  COMPUTING LABORATORY

"Smoking adjoints" LIBOR testcase

This webpage contains code and papers documenting the development of C/C++ code for the computation of Greeks from a Monte Carlo simulation of a LIBOR market model.

This was prompted by the interest in my RISK magazine article with Paul Glasserman on "Smoking adjoints: fast Monte Carlo Greeks". This explained how an adjoint approach could be use to evaluate Greeks (the sensitivity of the computed price to multiple input parameters) much more efficiently than with other approaches. For more details see this link.

Having convinced people that adjoint techniques are a good idea, the question that naturally comes next is: how do I develop an adjoint code? This is the question I aim to address in an invited paper I am presenting at the HERCMA conference in Athens in Sept.'07. That paper is available here along with various other notes and the full source code for the LIBOR testcase.

Automatic Differentiation software can be very helpful in simplifying or validating the development of an adjoint code. In previous research in CFD (Computational Fluid Dynamics), we used Tapenade, developed at INRIA, to generate the linear and adjoint versions of the key nonlinear "kernels" within the code -- the bits which would be very time-consuming and error-prone to write by hand. However, Tapenade currently only works with codes which are written in FORTRAN.

For the C/C++ Monte Carlo code for the LIBOR testcase we have instead used the FADBAD++ package, developed by Ole Stauning and Claus Bendtsen. This is very easy to use with a particularly clean and simple programming interface. In terms of execution efficiency, it is roughly 4 times slower than a hand-coded implementation for the forward-mode pathwise sensitivity calculation, and it is roughly 10-20x slower than hand-coded for the reverse-mode calculation. However, that loss in execution efficiency should be considered relative to the very large savings in the human effort of programming the hand-coded implementations. One viewpoint is that one uses FADBAD++ as a key tool in developing and checking the hand-coded implementations. Alternatively, the paper also explains how FADBAD++ can be used for the payoff evaluation while using hand-coded adjoints for the calculation of the path evolution. This represents a good tradeoff between execution efficiency and programming effort.

Downloads:

Random Image
Random Image
Random Image