What does AADC Tracer record?
It records operations, comparisons and inputs in a supported numerical calculation, with source file, line and function references. You can inspect the dependencies and constants on the recorded execution path.
A library upgrade, a model change, a price you cannot explain. AADC Tracer records the calculation and links its inputs, constants and executed branches to the source code. Follow the result back to the lines that produced it.
Run a prepared QuantLib example in the browser and inspect the source locations behind its result. For your own model, start with a question: an unexpected price, a change after an upgrade, or an assumption a reviewer needs to check. The recorded run gives you evidence to investigate that question.
A swaption calculation uses a search interval, numerical cut-offs and day-count conventions. The trace below shows where some of those choices enter the calculation. This QuantLib 1.41 run recorded 150 constant sites and 59 branch sites across 40 source files. The snippet calls these frozen-branch sites: branch decisions fixed for this recorded run. A recorded constant or branch is something to inspect; its presence alone does not establish a defect.
NPV 16912.75857915684
150 constant sites, 59 frozen-branch sites, 40 source files
jamshidianswaptionengine.cpp:102 minStrike = -10
jamshidianswaptionengine.cpp:103 maxStrike = 10
vasicek.cpp:51 B = 1.4901e-08 (x264)
errorfunction.cpp:209 0.84375 (x10)
actual365fixed.hpp:57 / 365.0
59 frozen-branch sites, e.g. brent.hpp:106, brent.hpp:110 ...
QuantLib 1.41, measured 22 October 2026 on the public packages: pip install "aadc==2.25.2" "aadc-quantlib-tracing==1.41.4" (Python 3.11, Linux x86-64). The swaption from the video is swaption.py (25 lines, ordinary QuantLib calls); swaption_trace.py records it and prints the price and the two counts above. Use the same approach for supported QuantLib calculations of your own.
The price comes with the record of how the library computed it, and the record answers questions without re-running the library.
Tracing requires a library built with the AADC compiler. QuantLib 1.41 is available ready to use on Linux x86-64 and macOS (Apple silicon) with Python 3.10 to 3.14. With that build installed, set AADC_TRACE=1 when you run the pricing program. For an in-house library, we first check the code and build requirements with you.
Follow recorded operations to their source file, line and function. Inspect the inputs and intermediate values used on that execution path.
Find tolerances, cut-offs, day-count denominators and solver brackets, with their values and source locations.
See how close a recorded comparison was to choosing the other branch. Further runs with different inputs let you examine other paths within the agreed test range.
An AI agent can use the trace to help investigate the calculation and draft a report. A reviewer can follow its source references, inspect the recorded values and check the explanation.
Four commands reproduce the figures above on the public package. The Community Edition is free for non-commercial and academic use. Contact us about a commercial evaluation.
python3 -m venv tracer && . tracer/bin/activate
pip install "aadc==2.25.2" "aadc-quantlib-tracing==1.41.4"
curl -O https://matlogica.com/downloads/swaption.py -O https://matlogica.com/downloads/swaption_trace.py
python swaption_trace.py # prints 16912.75857915684, then 150, then 59
aadc-mcp is a local MCP server that runs inside your own Python environment. Your coding agent can trace an unmodified QuantLib or Python pricer and ask the record where a price came from, which decisions were closest to going the other way, and what the price is at new inputs: exact when every recorded decision holds, withheld with the decision named when one does not. Every number in an answer is the engine's own output.
python3 -m venv aadc-env && . aadc-env/bin/activate
pip install "aadc-mcp[quantlib]"
aadc-mcp --check
AADC runs here as Community Edition: free for non-commercial and academic use; commercial use, including evaluation inside a company, needs a licence from MatLogica.
Tracer records calculations in supported C++ and Python code. Your model stays in its existing library; the library is built with the AADC compiler to enable tracing.
For an assessment, we agree the model, inputs and question to investigate before work starts. The report gives your developers and reviewers a common record to examine.
Validation has to establish what pricing code actually does. Tracer records the calculation as it runs and turns it into evidence a validator can check line by line.
| Validation task | Reading the source | With Tracer |
|---|---|---|
| Establish the formula implemented | Inferred from code and documentation | Read from the operations that ran, each tied to file and line |
| List inputs and hard-coded constants | Manual trace across files | Enumerated automatically, with values and source lines |
| Verify model dependencies | Taken from the model inventory and documentation | Confirmed from what the calculation actually used |
| Find market-dependent branches | Search for conditionals; easy to miss inside utilities | Every decision listed, with the inputs that switch it |
| Test scenarios and compute Greeks | Reprice and bump each scenario | Replay with exact AAD Greeks |
| See where the work concentrates | Separate profiling | Operation counts per function and line |
| Keep model documentation current | Written once; drifts as the code changes | Drafted from each recorded run, so it describes the build that ran; a reviewer signs it off |
| Use an AI assistant in the review | The assistant reads source and infers what the code probably does | The assistant reads what the code did; every claim cites a file and line the validator can check |
errorfunction.cpp:225 chooses the sign of erf in the region 0.84375 ≤ |x| < 1.25; every Φ in the price is evaluated through this function.normaldistribution.cpp:36 replaces the error-function result with an asymptotic series once the cumulative normal falls to 10−8 or below, which deep out-of-the-money terms can reach.The evidence is verifiable (each claim cites a file and line), reproducible (recordings are kept) and complete within the tested scope, in line with the expectations of PRA SS1/23, Fed SR 26-2 and the ECB Guide to internal models.
Read the case study: QuantLib barrier option, five engines (PDF) ↓
The case study records the model and inputs, maps dependencies and branches, and presents numerical checks alongside the findings. Source references let a reviewer investigate each finding. It describes the runs and scenarios examined; model approval remains with your team.
Read the barrier-option case study (PDF) ↓
Developers can follow an unexpected result through the recorded calculation to its source.
Compare the evidence from selected runs before and after a change to the model or its libraries.
Give validators the recorded inputs, source references and numerical checks behind a finding.
Tell us which model or library you use, what changed and the result you need to understand. We will check compatibility and agree the scope of an assessment with you. Commercial use requires a licence.
It records operations, comparisons and inputs in a supported numerical calculation, with source file, line and function references. You can inspect the dependencies and constants on the recorded execution path.
A library built with the AADC compiler. The aadc-quantlib-tracing package includes QuantLib 1.41 ready to trace on Linux x86-64 and macOS (Apple silicon) with Python 3.10 to 3.14. An in-house library needs a compatibility and build check. Setting AADC_TRACE=1 on an ordinary QuantLib installation does not add tracing.
Yes. Record selected calculations in each supported build using the same inputs, then compare their results and execution evidence. The assessment covers the versions and scenarios you test.
A run records the path taken for its inputs. Exploring other paths requires further runs. Keep the tested input ranges and any unexplored paths with the findings.
Yes. An agent can inspect the recorded calculation and help draft findings with source references. A reviewer checks those findings against the evidence and decides what they mean for the model.
Tests check selected behaviours and a debugger lets you inspect execution. Tracer adds a source-linked record of the numerical calculation that you can query and retain with the investigation.
The record can support documentation of the calculation that ran. Keep the build version and inputs with that document, and update the evidence when the model or tested scenarios change.
We agree a model, a question and a set of inputs with you. The resulting report brings together the recorded evidence, the checks performed and the findings for your team to review. The case study shows this evidence for a barrier option.
Yes. The case study records QuantLib's down-and-out barrier call under five engines and lists every input and market-dependent decision, with findings graded by severity. It is illustrative: the validation decision stays with the validator.
The Community Edition is free for non-commercial and academic use. Contact MatLogica for a commercial evaluation, a model assessment, commercial licensing or full-performance academic licensing.
MatLogica Ltd, London, the company behind the AADC compiler.