Combined tolerance
|actual - expected| <= atol + rtol |expected|Absolute tolerance protects behavior near zero; relative tolerance scales with result magnitude.
Architecture & Systems
Tolerances must reflect trade scale, numerical method, and noise sources, balancing stability against necessary change.
A tolerance must separate harmless numerical noise from meaningful pricing change.
Absolute tolerances are suitable for small-magnitude quantities, while relative tolerances scale with the size of the value.
A common rule is |new − old| ≤ abs_tol + rel_tol·|old|, with parameters tailored to product type and currency.
How large must a numerical difference be before it signals changed behavior rather than expected computation noise?
Deterministic methods such as PDE, lattice, or closed-form pricers justify tight tolerances dominated by floating-point limits.
Monte Carlo tolerances should be related to estimated standard errors so tests do not fail on expected sampling variation alone.
actualexpectedatolrtol|actual - expected| <= atol + rtol |expected|Absolute tolerance protects behavior near zero; relative tolerance scales with result magnitude.
Expected value is 1,000, actual value is 1,000.08, atol is 0.01, and rtol is 0.0001.
ResultThe result passes the combined tolerance while retaining a clear numerical bound.
Follow the strongest prerequisites, applications, extensions, and contrasts.
Regression tests need tolerances that distinguish acceptable numerical drift from real defects.
Used byValidation Toolbox for PricersA validation toolbox needs explicit tolerance policy so numerical differences are interpreted consistently.
SupportsFinite-Difference Checks for GreeksFinite-difference checks need explicit tolerances because discretisation and floating-point effects prevent exact equality.
Regression tests need tolerances that distinguish acceptable numerical drift from real defects.
Explore concept →