XAD: the AAD library for C++ and Python.

Fast, easy automatic differentiation in C++ and Python: add XAD to the code you have and get every sensitivity for as little as 2 times the cost of one valuation with XAD's tape. With code generation, the whole run, every sensitivity included, is up to 3 times faster than one plain valuation of the original code. Commercially available since 2014, open source since 2022, presented at CppCon 2026.

Try it now: pip install xad for Python, or add it to a C++ build with CMake. Python quick start · C++ quick start · Using QuantLib? QuantLib with AAD

Even after making a valuation ten times faster, ten thousand sensitivities with bumping still cost a thousand original valuations. XAD changes the arithmetic: every sensitivity for as little as 2 times the cost of one valuation with XAD's tape. With code generation, the whole run, every sensitivity included, is up to 3 times faster than one plain valuation of the original code.

XAD is open source: the code and the tests are public, and the AAD benchmark results are published.

Editions

Start under the AGPL and test it on your own code. The AGPL is not suitable for enterprise settings: for use in your organisation, take a Commercial subscription for commercial terms, updates, support and the XAD validation pack, and Enterprise for code generation.

Open source

AGPL v3

To try it, for research and for open-source projects.

When AGPL fits

Commercial

Per seat or per site, annual

For production code, on commercial terms. All sensitivities for as little as 2 times the cost of one valuation with XAD's tape. Updates, support and the XAD validation pack included.

The validation pack

Enterprise

Per site, annual

Adds code generation: the whole run, every sensitivity included, up to 3 times faster than one plain valuation of the original code. The validation pack extends to code generation. A named support engineer, service levels and roadmap input.

ORE with AAD

Its own subscription

AAD across the whole Open Source Risk Engine book: XVA sensitivities 151× faster than bumping on a desk-grade netting set and up to 1,000× on multi-currency XVA, with the same prices. A private fork under its own annual subscription, with code generation for ORE.

ORE and QuantLib with AAD
How pricing works. No list prices, and no surprises: every quote is fixed and in writing before anything is signed. The speed-up estimate is free. XAD Commercial is priced per developer seat or per site, Enterprise per site, both annual with updates and support included. A build is a fixed price for a fixed scope. AAD training is priced per course. What a site is, support and continuity.

Using XAD, or anything built with it, inside your company?

XAD is open source under AGPL-3.0, to try it, for research and for open-source projects. The AGPL is not suitable for enterprise settings: for use in your organisation you need a separate commercial licence from us.

What the AGPL requires is set out in its licence terms.

An XAD subscription is that licence. It comes with IP indemnity, support, stable versions and the XAD validation pack, and with Enterprise, code generation. Not sure where you stand? Book a free, confidential licence check.

A summary, not legal advice: the licence text decides. Licensing in plain words.

Commercial and Enterprise include

  • A commercial licence in place of the AGPL, for use in your organisation
  • The XAD validation pack: edge-case, stress and performance-regression suites, reconciliation against QuantLib and real pricers, and a validation report for your model-risk team on request
  • IP indemnity
  • Clear terms for audit, procurement and redistribution
  • Direct access to the XAD maintainers
  • Controlled updates and version stability for regulated deployments
  • Where we built XAD into your code, its verification suite re-run on every release

When we AAD-enable your code, it continues under the same XAD subscription.

The XAD validation pack

XAD's unit tests are public and stay public, in the open-source repository. The XAD validation pack goes much further, and comes with every Commercial and Enterprise subscription:

  • Edge casesDegenerate inputs, discontinuities, deep nesting, checkpointing and external functions at their limits.
  • StressVery large tapes, long sessions, memory pressure and multi-threaded use.
  • Performance regressionTape and code-generation speed tracked release by release, so no release gets slower unnoticed.
  • ReconciliationSensitivities checked against QuantLib and real pricers, against bumping and against known answers.
  • Validation report, on requestWritten for your model-risk team, for reviews under SR 26-2 and PRA SS1/23: what was tested, the tolerances, the results and what changed since the last release.

Enterprise adds the code-generation suite. When we build XAD into your code, the verification suite on your own books checks your code; the validation pack checks XAD itself. Both run again on every release.

AAD benchmarks

XAD against other AAD tools, in the open.

A swaption portfolio (LMM), Heston Monte Carlo, CVA on a swap portfolio and SABR calibration, against CppAD, Adept and autodiff, with every gradient checked. XAD is the fastest on all four: 4.9× to 24× faster than the fastest of CppAD, Adept and autodiff with code generation, and 1.1× to 4.1× with XAD alone.

Comparing AAD tools? How to choose an AAD tool: five questions to ask of any of them, and how to measure speed on your own code.

CppCon 2026

Death by a Thousand Tape Entries

Low-overhead automatic differentiation for scientific and financial C++. Jörg Lotze, Aurora, Colorado, September 2026.

50–100×Overhead of a naive tape
≈4×On production finance code, after the techniques shown

A chunked arena allocator with cache-line alignment and branch-prediction hints reduces the recording hot path to a pointer bump and a store. Expression templates collapse a whole right-hand side into one tape push. Each technique was benchmarked separately.

"…gave the session with the clearest cost numbers at the conference."Ariel Silahian, CppCon 2026 for High-Frequency Trading: The Complete Report, HFT Advisory, September 2026

We use these details to reply to you and follow up on your enquiry. See our Privacy policy.

Track record

Commercially available since 2014.

2014QuantAD, the commercial predecessor of XAD, released.
2022Open-sourced as XAD 1.0, with QuantLib integration from the first release, the test suite and documentation.
2024Python bindings and QuantLib-Risks for Python on PyPI; higher-order derivatives, checkpointing and external-function support.
2026XAD 2.1 with the code-generation backend; XAD 2.2 (released 11 November 2026) with build options for memory and speed, and faster complex numbers; ORE with AAD as its own subscription; CppCon 2026 talk on low-overhead automatic differentiation.
Where XAD is used

Used well beyond finance.

  • FinanceSensitivities, XVA, SA-CVA, FRTB, SIMM and calibration.
  • EngineeringShape and design optimisation.
  • ScienceInverse problems, reconstruction, data assimilation and calibration.
  • Machine learningHybrid models in C++ and Python.

In the open-source community

Bank deployments are private. In public, XAD runs in established open-source projects, from optimal control to plant ecology.

Install with pip install xad from PyPI, or from Spack, where XAD is a built-in package.

Using XAD in an open-source project? Tell us in GitHub Discussions.

Test it on your own code. Build XAD into a pricer you know, run your own tests, and measure before you decide.

XAD subscription

Request a subscription quote

Commercial per seat or per site, Enterprise per site, both annual. Or let us build it in. A short, fixed-scope build of XAD into your pricers and risk engine, with tooling that speeds up the port and every sensitivity checked against your bumped numbers. The code is yours, and an XAD subscription keeps it current.

AAD enablement · AAD training

We use these details to reply to you and follow up on your enquiry. See our Privacy policy.