Differential Machine Learning

Differential machine learning (ML) is an extension of supervised learning, where ML models are trained on examples of not only inputs and labels but also differentials of labels to inputs.

This image has an empty alt attribute; its file name is image.png
Brian Huge and Antoine Savine, Risk, October 2020

Differential ML is applicable in situations where high quality first order derivatives wrt training inputs are available. In the context of financial Derivatives and risk management, pathwise differentials are efficiently computed with automatic adjoint differentiation (AAD). Differential machine learning, combined with AAD, provides extremely effective pricing and risk approximations. We can produce fast pricing analytics in models too complex for closed form solutions, extract the risk factors of complex transactions and trading books, and effectively compute risk management metrics like reports across a large number of scenarios, backtesting and simulation of hedge strategies, or regulations like XVACCRFRTB or SIMM-MVA.

companion GitHub repo

please refresh page if you can’t see the article

The article focuses on differential deep learning (DL), arguably the strongest application. Standard DL trains neural networks (NN) on punctual examples, whereas differential DL teaches them the shape of the target function, resulting in vastly improved performance, illustrated with a number of numerical examples, both idealized and real world. In the online appendices, we apply differential learning to other ML models, like classic regression or principal component analysis (PCA), with equally remarkable results. We also posted a TensorFlow implementation notebook.

Open In Colab

Automatic Differentiation Explained in 15min

video tutorial with application to machine learning and finance, in Toward Data Science

AAD and Machine Learning in Finance

Part 1, Wilmott, November 2019

please refresh page if you can’t see the article

Part 2, Wilmott, January 2020

please refresh page if you can’t see the article

Part 3, Wilmott, March 2020

please refresh page if you can’t see the article

Machine Learning in Finance

These two articles with code running simplistic Jupyter-TensorFlow (1.x) models demonstrate how vanilla neural nets (deeply) learn pricing of European calls and high dimensional basket options – the notebooks also compare neural nets with conventional polynomial regression models (a la LSM) and offer a quick, simple introduction to the implementation of simple deep learning models in TensorFlow.

Notebook 1: European call in Black and Scholes

Notebook 2: Basket option in Bachelier

The notebooks run directly on Google colab, in the cloud and on GPU, no installation required.

The lecture slides and material are all found here:


AAD and Parallel Simulations

Scripting for financial derivatives

Selected Articles

Financial cash-flow scripting: beyond valuation

Modern Computational Finance: AAD and Parallel Simulations (preview)

From model to market risks: The implicit function theorem (IFT), demystified

Theory of Volatility

LSM Reloaded: Differentiate xVA on your iPad mini


Deep Analytics

A brief history of scripting

Modern Computational Finance: AAD and Parallel Simulations (story)

Two questions to test your quant skills

Introduction to Interest Rate Models

Sobol sequences explained

Exporting C++ to Excel: a quick and painless tutorial

Slides on SlideShare

A brief history of discounting

Practical implementation of AAD

Fuzzy logic and financial risk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s