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.
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 packEnterprise
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 AADUsing 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.
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.
Death by a Thousand Tape Entries
Low-overhead automatic differentiation for scientific and financial C++. Jörg Lotze, Aurora, Colorado, September 2026.
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
Commercially available since 2014.
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.
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.