Quant Finance News

In this issue:

Finance capabilities of the NAG Library further extended with latest release

Many financial institutions choose the NAG Library as a core component of their models and data analysis applications in order to improve performance, reduce risks, reduce costs, support disparate hardware systems and standardise functionalities. The majority of the top 10 tier 1 banks in the world embed NAG Library routines when robust and high performing solutions in optimization, random number generation, interpolation, time series analysis (and more) are required. 

The latest release of the NAG Library (Mark 25) sees the inclusion of many new routines added in response to requests from major banks, specifically the LARS, LASSO, Forward Stagewise Regression routines and the Unscented Kalman Filter.

A collection of articles have been created to describe the new functionality areas in Mark 25. Click on them below to learn more.  

New NAG Library functionality Mark 25: 

Mixed Integer Nonlinear Programming
LARS / LASSO and Forward Stagewise Regression
Change Point Analysis
Further Additions to the Nearest Correlation Matrix Chapter
→ Interpolation and Approximation

When licenced, the NAG Library includes the following products: C Library, .NET Library, Library for Java, Library for Python, Library for SMP & Multicore, Xeon Phi Library, Fortran Library, Toolbox for MATLAB® and associated interfaces/languages.  

If you would like to know more about the NAG Library Mark 25 or check availability of a particular implementation, do get in touch

Adjoint Algorithmic Differentiation: What is it? And why use it?

NAG provides industrial-strength Adjoint Algorithmic Differentiation (AAD) technology to practitioners in quantitative finance.

Why AAD?

Suppose that running your C++ pricing routine on the available computer(s) takes 1 minute. You might be interested in sensitivities of the computed price with respect to a (potentially large, e.g, due to term structure) number n of uncertain parameters, e.g, market volatilities. Let n=180. Sequential finite difference approximation requires at least n+1 pricing calculations yielding a total run time of at least 3 hours. The quality of this approximation may turn out unsatisfactory due to truncation and catastrophic cancellation in finite precision floating-point arithmetic. Careful application of NAG's AAD software dco/c++ (derivative code by overloading in C++) can be expected to reduce the overall run time to less than 20 (often less than 10) minutes, while producing truncation-free gradient information with machine accuracy.

Adding a slider widget to implied volatility using the NAG Library for Python

In a recent NAG Blog post, Brian Spector describes the speed of calculating implied volatility using a variety of methods. He looks at the volatility curve/surface using Python's Scipy, the NAG Library for Python and the NAG C Library. Additionally, he adds a slider widget to the Python graphs from a previous blog on Implied Volatility to see the real-time effects of changing the interest and dividend rates. All the code used in Brian's post can be downloaded from the NAG website to produce the graphs, and a NAG licence is not needed for the case using scipy.optimize.fsolve.  

White Paper: Adjoint Algorithmic Differentiation Tool Support for Typical Numerical Patters in Computational Finance

The following is an Abstract from a recent White Paper by Professor Uwe Naumann of RWTH Aachen University, Germany, and Jacques du Toit of NAG, UK.


We demonstrate the flexibility and ease of use of C++ algorithmic differentiation (AD) tools based on overloading to numerical patterns (kernels) arising in computational finance. While adjoint methods and AD have been known in the finance literature for some time, there are few tools capable of handling and integrating with the C++ codes found in production. Adjoint methods are also known to be very powerful but to potentially have infeasible memory requirements. We present several techniques for dealing with this problem and demonstrate them on numerical kernels which occur frequently in finance. We build the discussion around our own AD tool dco/c++ which is designed to handle arbitrary C++ codes and to be highly flexible, however the techniques can be transferred to other AD solutions including in-house tools. An archive of the source code for the numerical kernels as well as all the AD solutions discussed can be downloaded from the NAG website. This includes documentation for the code and dco/c++. Trial licences for dco/c++ are available from NAG.

Swedish national income pension buffer fund uses NAG Library routines in portfolio analysis

The Fixed Income and FX team at Forsta AP-fonden has developed an in-house portfolio analysis system for managing the Fixed Income and the FX portfolios. 

Forsta AP-fonden is one of five buffer funds in the Swedish national income pension system. The capital reserves in the AP funds are used to cover the deficit when disbursements from the pension system exceed contributions to the system. Forsta AP-fonden has assets under management of SEK 253 billion (at 30 June 2014), approximately USD 40 billion, in a global portfolio consisting of equities, fixed income securities and alternative investments that include real estate, private equity funds and hedge funds.

The fixed Income and FX team has used the NAG Library since 2005 for optimizations and interpolations and the system is highly dependent on the speed and accuracy of its algorithms. For example, advanced yield curve modelling within the system uses a number of functions; these yield curves are essential for the management of the Fixed Income portfolio. In addition to this application, the NAG Library is used for optimizing fixed duration indices, another tool that the management of the Fixed Income portfolio relies on. 

When asked about the NAG Library, Katarina Pashcal, Portfolio Manager, Fixed Income and FX at Forsta AP-fonden, states: "As long time users of NAG, both as developers and as end users, we are very satisfied with the performance of the Library and we are happy to recommend NAG to others."

Cutting edge research unveiled at Global Derivatives, Amsterdam

AAD on Accelerators: New C++11 dco/c++ type takes the "handwritten" out of "handwritten adjoint"

It has long been known that the "AD vs GPU" debate is somewhat misguided: AD is a mathematical technique, while GPUs (and accelerators in general) are pieces of silicone, and it's perfectly feasible to combine them to achieve truly compelling AD performance. The key to achieving this is handwritten adjoint kernels running on the accelerator, since currently no AD tools support GPUs. 

However our recent research is changing that. Using C++11 features, the team produced a meta-program AD compiler which, at compile time, can instantiate a "handwritten" adjoint for blocks of straight line code (code with no control flow). This functionality was embedded in a new dco/c++ type which works with all the major C++11 compliant compilers on Linux and Windows, including nvcc 7.0, meaning it can be used in CUDA. The type was tested on a simple finance code (Euler stepping of a single spline-based local volatility sample path) and shown to be as efficient as a hand-written adjoint. 

The key benefits of the new type are: (a) It handles the tedious, error-prone differentiation and adjoint propagation of blocks of straight-line code; (b) changes to these blocks are straightforward since adjoints are always in sync; (c) users only focus on the overall data flow reversal and dco/c++'s tape can be used for this (if appropriate).

This new research will be on display at the Global Derivatives conference, Amsterdam in May 2015. 

C++ and Python Training Course Material

We are delighted to make available the course material and training recordings from NAG's C++ and Python Training Courses held in New York, Chicago and London last year. 

Click here to watch the recordings and look at the training material.

Key finance events 2015

NAG will be at the following exhibitions and conferences over the next few months.

  • Global Derivatives Trading and Risk Management 2015
    18-22 May 2015, Amsterdam
    Visit http://www.icbi-derivatives.com/FKN2428NAGEM and use VIP Code: FKN2428NAGEM to receive a 25% discount for your pass to this event.
  • 77th EAGE Conference and Exhibition 2015
    1-4 June 2015, Madrid
  • Risk & Investment Conference
    3-5 June 2015, Newport
  • The Trading Show - Chicago 2015
    3-4 June 2015, Chicago
  • 2nd IMA Conference on Mathematics in Finance
    18-19 June 2015, Manchester
  • NAFEMS World Congress 2015
    21-24 June 2015, San Diego
  • ISC High Performance Computing
    13-15 July 2015, Frankfurt
  • SYMMYS Advanced Risk and Portfolio Management Bootcamp by Attilio Meucci
    13-18 July 2015, New York
    To register with the discounted supporter rate go to http://www.symmys.com/arpm-bootcamp/registration then see 1) "Registration Type", select "Supporter"; 2) go to "Specify", select "Other"; 3) go to "Specify", type "NAG", or contact us at arpm.bootcamp@symmys.com

Best of the blog

> Gaussian Mixture Model
> Testing Matrix Function Algorithms Using Identities
> C++ Wrappers for the NAG Library
> How do I know I am getting the right answer?
> Advanced Analytics on Apache Spark

In other news

NAG Provide HPC Support to KAUST Petascale Supercomputer Project

Trusted HPC expertise and experience from NAG was a key component of a large supercomputer project announced by King Abdullah University of Science and Technology (KAUST) in Saudi Arabia. KAUST benefitted from NAG during the procurement and planning processes of the project, and will continue to do so in the commissioning and acceptance phases. 

NAG to recognise the achievements of great students through awards 

NAG's roots are firmly placed in education and the fostering of mathematical and computer science students all over the world. To recognise the achievements of great work, NAG has various "Student Awards". The most recent award was presented to Warwick Business School Student, Christoph Auth for his paper "Continuous Wavelet Transform and Wavelet Coherence - Implementation and Application to the Diversification Analysis of Hedge Fund Returns".