#2794·QuantLib

Zero-stddev asset ITM probabilities are wrong in Black/Bachelier helpers and cap/floor deltas

Author: kadyrbekovhamit-cyberCreated Sep 14, 2026Updated Sep 15, 2026
Labelsin progress

At stdDev == 0, two asset-ITM probability helpers return incorrect deterministic values. I reproduced this in released QuantLib 1.43 and in complete C++ translation units from current master ca953b7ebdb400f2839d86f18eeb0d4a2a4a30a4.

For a call with forward 120 and strike 100, strict ITM probability is 1:

python
import QuantLib as ql
print(ql.__version__)  # 1.43
print(ql.blackFormulaAssetItmProbability(ql.Option.Call, 100., 120., 0.))
# 0.0; expected 1.0
print(ql.bachelierBlackFormulaAssetItmProbability(ql.Option.Call, 100., 120., 0.))
# 20.0; expected 1.0

The Black zero-standard-deviation comparison is reversed (< instead of >). The Bachelier branch returns max(sign*(F-K), 0) instead of the strict positivity indicator. The proposed patch preserves the existing strict-ITM value 0 at the strike and leaves positive-standard-deviation formulas unchanged.

This also affects optionletsDelta in the Black and Bachelier cap/floor engines at zero volatility. In a released full-instrument Black cap example (two future EURIBOR coupons, 5% flat forwarding curve, 3% discounting, strike 4%), the reported normalized deltas are [0, 0]; normalized price bumps give [1, 1]. Tested prices themselves remain correct. These are normalized coefficients, not cash DV01.

Validation of the candidate:

  • 660 helper inputs: 90 baseline mismatches, 0 after correction, 90 after restoring the original source.
  • 16 direct native cap/floor engine cases: 6 incorrect deltas, 0 after correction, 6 on mutation replay. Tested engine prices unchanged.
  • All 12 focused upstream BlackFormula cases pass after correction (10 existing + 2 new regressions, 72 assertions). The full-library test suite was not run.
  • Released full Cap/Floor instruments: 12 incorrect deltas among 32 optionlet observations, including positive-volatility controls.

Report, patch and frozen evidence archive includes source pins, exact inputs, independent references, raw outputs, build commands and regression tests. The ZIP contains candidate.patch.

I reviewed PR674, relevant current/closed issues and file history; no exact prior report was found in that bounded review. These are synthetic public-code experiments, with no production-loss or deployment claim.

Xamit Kadirbekov / GERO Research. AI-assisted research and preparation; numerical results come from the archived executable runs.