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 function | a rational approximation to the error function | ql/math/errorfunction.cpp |
| d1, d2 and the closed-form price | QuantLib's Black calculator (the same formula, written on the forward price) | ql/pricingengines/blackcalculator.cpp |
| e^(-rT), e^(-qT) — interest-rate and dividend-yield discounting | interest-rate compounding to discount factors | ql/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.
| value | role | source |
| 8.697191480061655e-29 | tolerance for comparing with zero, (42 × machine epsilon)² | ql/math/comparison.hpp:72 |
| 0.7071067811865476 | 1/√2, the scaling of z inside erf | ql/math/distributions/normaldistribution.cpp:35 |
| 0.5 | the ½ in Φ(z) = ½·(1 + erf(z/√2)) | ql/math/distributions/normaldistribution.cpp:35 |
| 1e-08 | normal-distribution left-tail threshold (switches to the asymptotic formula) | ql/math/distributions/normaldistribution.cpp:36 |
| 0.3989422804014327 | 1/√(2π), the normal-density normalisation | ql/math/distributions/normaldistribution.hpp:270 |
| 2.0 | the 2 in 2σ² of the normal density | ql/math/distributions/normaldistribution.hpp:272 |
| -690.0 | exponent cut-off below which e^x is treated as zero | ql/math/distributions/normaldistribution.hpp:279 |
| 0.84375 | error-function rational-approximation region switch | ql/math/errorfunction.cpp:209 |
| 3.7252902984e-09 | error-function small-argument cut-off | ql/math/errorfunction.cpp:210 |
| 10 values | coefficients of the error-function rational approximation (QuantLib's erf, after Sun's fdlibm); its region switches are listed on their own | ql/math/errorfunction.cpp:216–217 |
| -2.3763016656650163e-05 | one of the 10 values above | ql/math/errorfunction.cpp:216 |
| -0.005770270296489442 | one of the 10 values above | ql/math/errorfunction.cpp:216 |
| -0.02848174957559851 | one of the 10 values above | ql/math/errorfunction.cpp:216 |
| -0.3250421072470015 | one of the 10 values above | ql/math/errorfunction.cpp:216 |
| 0.12837916709551256 | one of the 10 values above | ql/math/errorfunction.cpp:216 |
| -3.960228278775368e-06 | one of the 10 values above | ql/math/errorfunction.cpp:217 |
| 0.00013249473800432164 | one of the 10 values above | ql/math/errorfunction.cpp:217 |
| 0.005081306281875766 | one of the 10 values above | ql/math/errorfunction.cpp:217 |
| 0.0650222499887673 | one of the 10 values above | ql/math/errorfunction.cpp:217 |
| 0.39791722395915535 | one of the 10 values above | ql/math/errorfunction.cpp:217 |
| 2.220446049250313e-16 | zero-volatility threshold: selects the standard formula above machine epsilon and zero-volatility handling below it | ql/pricingengines/blackcalculator.cpp:77 |
| 0.5 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:86 |
| 2.220446049250313e-16 | zero-volatility threshold for delta (machine epsilon) | ql/pricingengines/blackcalculator.cpp:208 |
| 2.220446049250313e-16 | zero-volatility threshold for forward delta (machine epsilon) | ql/pricingengines/blackcalculator.cpp:251 |
| 2.220446049250313e-16 | near-zero price threshold in the elasticity calculation (machine epsilon) | ql/pricingengines/blackcalculator.cpp:291 |
| 2.220446049250313e-16 | zero-volatility threshold for gamma (machine epsilon) | ql/pricingengines/blackcalculator.cpp:320 |
| 2.0 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:334 |
| 2.0 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:335 |
| 0.5 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:369 |
| 2.220446049250313e-16 | zero-volatility threshold for vega (machine epsilon) | ql/pricingengines/blackcalculator.cpp:377 |
| 0.5 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:383 |
| 0.5 | implementation constant reached by the calculation | ql/pricingengines/blackcalculator.cpp:384 |
| 2.220446049250313e-16 | zero-volatility threshold for rho (machine epsilon) | ql/pricingengines/blackcalculator.cpp:396 |
| 2.220446049250313e-16 | zero-volatility threshold for dividend rho (machine epsilon) | ql/pricingengines/blackcalculator.cpp:415 |
| 2.220446049250313e-16 | zero-volatility threshold for strike sensitivity (machine epsilon) | ql/pricingengines/blackcalculator.cpp:433 |
| 365.0 | Actual/365 (Fixed) day-count denominator | ql/pricingengines/blackcalculator.hpp:126 |
| -1.7976931348623157e+308 | lowest representable number (no lower strike limit) | ql/termstructures/volatility/equityfx/blackconstantvol.hpp:118 |
| 1.7976931348623157e+308 | highest representable number (no upper strike limit) | ql/termstructures/volatility/equityfx/blackconstantvol.hpp:122 |
| 365.0 | Actual/365 (Fixed) day-count denominator | ql/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.
| kind | margin | what it decides | source |
| input-dependent branch (if) | 0.00427741 | a region switch inside the error-function approximation | ql/math/errorfunction.cpp:210 |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:77 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:208 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:251 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:320 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:396 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:415 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:377 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:433 | |
| input-dependent branch (if) | 0.2 | ql/pricingengines/blackcalculator.cpp:72 | |
| input-dependent branch (if) | 0.502413 | the left-tail switch to the asymptotic expansion of the normal distribution | ql/math/distributions/normaldistribution.cpp:36 |
| input-dependent branch (if) | 0.839473 | a region switch inside the error-function approximation | ql/math/errorfunction.cpp:209 |
| input-dependent branch (if) | 0.951229 | ql/pricingengines/blackcalculator.cpp:74 | |
| input-dependent branch (if) | 6.98692 | ql/pricingengines/blackcalculator.cpp:291 | |
| input-dependent branch (if) | 100 | ql/pricingengines/vanilla/analyticeuropeanengine.cpp:69 | |
| input-dependent branch (if) | 100 | ql/pricingengines/blackcalculator.cpp:204 | |
| input-dependent branch (if) | 100 | ql/pricingengines/blackcalculator.cpp:316 | |
| input-dependent branch (if) | 103.045 | ql/pricingengines/blackcalculator.cpp:68 | |
| input-dependent branch (if) | 105 | ql/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 value | ql/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 computed | ql/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.
| move | result | replayed value | fresh QuantLib price | decision |
| spot +1% | recorded path survives | 7.48912481598 | 7.48912481598 agrees to the last digit | |
| spot −1% | recorded path survives | 6.50426229316 | 6.50426229316 agrees to the last digit | |
| volatility +1 point | recorded path survives | 7.37793786419 | 7.37793786419 agrees to the last digit | |
| interest rate +10 bp | recorded path survives | 7.02925569586 | 7.02925569586 agrees to the last digit | |
| dividend yield +1 point | recorded path survives | 6.50661877697 | 6.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
| engine | aadc 2.25.2 |
| traced pricing library | aadc-quantlib-tracing 1.41.1 (QuantLib 1.41) |
| recorded operations | 569 entries, 519 attributed to a source line |
| source verification | 8 of 8 decision lines checked against the file the library was compiled from (content hash) |
| record file | 62 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.
