MatLogicaAADC Tracer — calculation report for validation review2026-12-06 15:27:32 UTC

European option

spot 100 · strike 105 · interest rate 5% · dividend yield 2% · volatility 20% · maturity (years) 1 · option type call

NPV = 6.9869

The trace identified 38 implementation constants and 29 decision points across 14 source files; repeated uses of the same line are listed once.

Documented formula → the code that ran

Black-Scholes-Merton: C = S·e^(-qT)·N(d1) − K·e^(-rT)·N(d2)
N(d1), N(d2) — the standard normal cumulative distribution functiona rational approximation to the error functionql/math/errorfunction.cpp
d1, d2 and the closed-form priceQuantLib's Black calculator (the same formula, written on the forward price)ql/pricingengines/blackcalculator.cpp
e^(-rT), e^(-qT) — interest-rate and dividend-yield discountinginterest-rate compounding to discount factorsql/interestrate.cpp

Implementation constants reached by this calculation (38)

Includes tolerances, cut-offs, numerical limits, the day-count convention, and thresholds for the sensitivities (Greeks) that this QuantLib engine calculates automatically with every price.
valuerolesource
8.697191480061655e-29tolerance for comparing with zero, (42 × machine epsilon)²ql/math/comparison.hpp:72
0.70710678118654761/√2, the scaling of z inside erfql/math/distributions/normaldistribution.cpp:35
0.5the ½ in Φ(z) = ½·(1 + erf(z/√2))ql/math/distributions/normaldistribution.cpp:35
1e-08normal-distribution left-tail threshold (switches to the asymptotic formula)ql/math/distributions/normaldistribution.cpp:36
0.39894228040143271/√(2π), the normal-density normalisationql/math/distributions/normaldistribution.hpp:270
2.0the 2 in 2σ² of the normal densityql/math/distributions/normaldistribution.hpp:272
-690.0exponent cut-off below which e^x is treated as zeroql/math/distributions/normaldistribution.hpp:279
0.84375error-function rational-approximation region switchql/math/errorfunction.cpp:209
3.7252902984e-09error-function small-argument cut-offql/math/errorfunction.cpp:210
10 valuescoefficients of the error-function rational approximation (QuantLib's erf, after Sun's fdlibm); its region switches are listed on their ownql/math/errorfunction.cpp:216–217
  -2.3763016656650163e-05one of the 10 values aboveql/math/errorfunction.cpp:216
  -0.005770270296489442one of the 10 values aboveql/math/errorfunction.cpp:216
  -0.02848174957559851one of the 10 values aboveql/math/errorfunction.cpp:216
  -0.3250421072470015one of the 10 values aboveql/math/errorfunction.cpp:216
  0.12837916709551256one of the 10 values aboveql/math/errorfunction.cpp:216
  -3.960228278775368e-06one of the 10 values aboveql/math/errorfunction.cpp:217
  0.00013249473800432164one of the 10 values aboveql/math/errorfunction.cpp:217
  0.005081306281875766one of the 10 values aboveql/math/errorfunction.cpp:217
  0.0650222499887673one of the 10 values aboveql/math/errorfunction.cpp:217
  0.39791722395915535one of the 10 values aboveql/math/errorfunction.cpp:217
2.220446049250313e-16zero-volatility threshold: selects the standard formula above machine epsilon and zero-volatility handling below itql/pricingengines/blackcalculator.cpp:77
0.5implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:86
2.220446049250313e-16zero-volatility threshold for delta (machine epsilon)ql/pricingengines/blackcalculator.cpp:208
2.220446049250313e-16zero-volatility threshold for forward delta (machine epsilon)ql/pricingengines/blackcalculator.cpp:251
2.220446049250313e-16near-zero price threshold in the elasticity calculation (machine epsilon)ql/pricingengines/blackcalculator.cpp:291
2.220446049250313e-16zero-volatility threshold for gamma (machine epsilon)ql/pricingengines/blackcalculator.cpp:320
2.0implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:334
2.0implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:335
0.5implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:369
2.220446049250313e-16zero-volatility threshold for vega (machine epsilon)ql/pricingengines/blackcalculator.cpp:377
0.5implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:383
0.5implementation constant reached by the calculationql/pricingengines/blackcalculator.cpp:384
2.220446049250313e-16zero-volatility threshold for rho (machine epsilon)ql/pricingengines/blackcalculator.cpp:396
2.220446049250313e-16zero-volatility threshold for dividend rho (machine epsilon)ql/pricingengines/blackcalculator.cpp:415
2.220446049250313e-16zero-volatility threshold for strike sensitivity (machine epsilon)ql/pricingengines/blackcalculator.cpp:433
365.0Actual/365 (Fixed) day-count denominatorql/pricingengines/blackcalculator.hpp:126
-1.7976931348623157e+308lowest representable number (no lower strike limit)ql/termstructures/volatility/equityfx/blackconstantvol.hpp:118
1.7976931348623157e+308highest representable number (no upper strike limit)ql/termstructures/volatility/equityfx/blackconstantvol.hpp:122
365.0Actual/365 (Fixed) day-count denominatorql/time/daycounters/actual365fixed.hpp:57

Input-dependent decision points reached (29)

Repricing with shifted inputs can make the code take the other path at these points. The margin is left minus right at the recorded inputs, closest to flipping first.
kindmarginwhat it decidessource
input-dependent branch (if)0.00427741a region switch inside the error-function approximationql/math/errorfunction.cpp:210
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:77
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:208
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:251
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:320
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:396
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:415
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:377
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:433
input-dependent branch (if)0.2ql/pricingengines/blackcalculator.cpp:72
input-dependent branch (if)0.502413the left-tail switch to the asymptotic expansion of the normal distributionql/math/distributions/normaldistribution.cpp:36
input-dependent branch (if)0.839473a region switch inside the error-function approximationql/math/errorfunction.cpp:209
input-dependent branch (if)0.951229ql/pricingengines/blackcalculator.cpp:74
input-dependent branch (if)6.98692ql/pricingengines/blackcalculator.cpp:291
input-dependent branch (if)100ql/pricingengines/vanilla/analyticeuropeanengine.cpp:69
input-dependent branch (if)100ql/pricingengines/blackcalculator.cpp:204
input-dependent branch (if)100ql/pricingengines/blackcalculator.cpp:316
input-dependent branch (if)103.045ql/pricingengines/blackcalculator.cpp:68
input-dependent branch (if)105ql/pricingengines/blackcalculator.cpp:66
input-dependent branch (if)guard: the strike is inside the volatility surface's range (or extrapolation is allowed)ql/termstructures/voltermstructure.cpp:42
input-dependent branch (if)guard: the quote has a valueql/quotes/simplequote.hpp:69
input-dependent branch (if)ql/interestrate.cpp:47
input-dependent branch (if)ql/math/comparison.hpp:65
input-dependent branch (if)ql/math/comparison.hpp:71
input-dependent branch (if)ql/math/comparison.hpp:72
input-dependent branch (if)ql/math/errorfunction.cpp:200
input-dependent branch (if)ql/math/distributions/normaldistribution.hpp:279
input-dependent branch (if)guard: a result was computedql/instrument.hpp:170
input-dependent branch (if)ql/instruments/oneassetoption.cpp:39

Validity of this record

The recorded run was replayed at 5 standard moves without re-running the pricing library. Where the recorded path survives, the replayed value is compared with a fresh QuantLib price. Where a decision would go the other way, the record withholds a value and names the decision; beyond that line the trade has to be recorded again.
moveresultreplayed valuefresh QuantLib pricedecision
spot +1%recorded path survives7.489124815987.48912481598 agrees to the last digit
spot −1%recorded path survives6.504262293166.50426229316 agrees to the last digit
volatility +1 pointrecorded path survives7.377937864197.37793786419 agrees to the last digit
interest rate +10 bprecorded path survives7.029255695867.02925569586 agrees to the last digit
dividend yield +1 pointrecorded path survives6.506618776976.50661877697 agrees to the last digit

Independent engine

The same trade priced on Analytic (closed form) and Finite-difference PDE and Binomial tree (Leisen-Reimer): 3 independent engines, 3 different code paths — agreeing to about 3 significant figures (spread 3.83e-03).

Provenance

engineaadc 2.25.2
traced pricing libraryaadc-quantlib-tracing 1.41.1 (QuantLib 1.41)
recorded operations569 entries, 519 attributed to a source line
source verification8 of 8 decision lines checked against the file the library was compiled from (content hash)
record file62 KB; it loads back into the engine and answers the same questions later

Suggested checks

Reprice on both sides of material decision points, then compare the results with an independent implementation or approved reference calculation.

The report contains selected details recorded while this trade was calculated. Validation judgement — tiering, materiality and sign-off — stays with your team.