Python is the dominant language for prototyping quantitative models. NumPy and SciPy make it easy to express complex mathematics. But when those prototypes need to run in production (pricing thousands of trades, computing Greeks across hundreds of risk factors) Python’s interpreted overhead becomes a bottleneck.
The AADC Approach
AADC bridges the gap between Python prototyping and C++ production performance. The workflow is straightforward: replace float inputs with aadc.idouble active types, run the existing Python code once to record the computation graph, and let AADC’s JIT compiler produce a native AVX-optimized kernel. Subsequent evaluations execute the compiled kernel directly, bypassing the Python interpreter entirely.
AADC does not translate Python to C++. It records the mathematical operations (additions, multiplications, exponentials, comparisons) that the Python code performs, discards the Python overhead (object creation, reference counting, dynamic dispatch), and compiles only the mathematics into machine code.
What This Means in Practice
A Monte Carlo pricer written in pure Python/NumPy can achieve C++ performance without rewriting a single line of the pricing logic. The same Python codebase serves both prototyping and production. Model changes are made in Python and immediately available at compiled speed.
For teams that maintain parallel Python and C++ implementations of the same model (a common and expensive pattern in quantitative finance), AADC eliminates the need for the C++ version entirely. One Python codebase, production performance, automatic adjoint Greeks.
Published by MatLogica. Implemented using AADC, a commercial adjoint AD compiler (matlogica.com).