XAD is the fastest automatic differentiation library for C++ and Python, built for production-scale systems. Proven in codebases of hundreds of thousands of lines, with 1,200+ tests and ~99% coverage.
| Repository | Description | Language |
|---|---|---|
| xad | Core AD library - forward & adjoint mode, JIT support, Eigen integration | C++ |
| xad-py | Python bindings for XAD | Python |
| QuantLibAAD | Full QuantLib integration - compute all Greeks at once, up to 3 orders of magnitude faster than bump-and-reval | C++ |
| QuantLib-Risks-Py | QuantLib risks from Python via XAD | Python |
| xad-codegen | High-performance native code generation backend for XAD - record-once/replay-many at maximum throughput (commercial) | C++ |
| ad-benchmarks | Reproducible quant-finance benchmarks comparing XAD against CppAD, Adept 2, autodiff, and finite differences | C++ |
XAD is the fastest open-source C++ AD library on four quant-finance workloads, benchmarked against CppAD, Adept 2, and autodiff. The optional JIT backend (xad-codegen) delivers a further 2x-5x speedup.
GCC 13.3, Intel Xeon Platinum 8488C, Ubuntu 24.04, -O3 -mavx2 -mfma, 10K MC paths. Full methodology and source: ad-benchmarks.
- Fastest AAD library for C++ - independently benchmarked
- Production-proven in large-scale quantitative finance systems
- Full QuantLib integration with 3 orders of magnitude speedup over bump-and-reval
- Eigen compatible - drops into existing C++ codebases with minimal changes
- 1,200+ tests, ~99% coverage
- Python bindings available via
pip install xad
If XAD is useful to you, please star the core repository — it helps others find it.