FAILURE MAP
← Case archive

FA-61561 / Options payoff and settlement / Open access

European option value with continuous dividend yield: maturity uses a 360-day year · case 01

Time value is overstated for every maturity.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

T is days/360.

VERIFIED REPAIR

Use calendar days over 365.

Unsuccessful approach: Adding one day to include expiry overstates T.

Case contract

Inputs kind, spot S, strike K, rate r, dividend yield q, volatility sigma and calendar days to expiry. T = days/365. At days == 0 return intrinsic value. Otherwise d1 = (ln(S/K) + (r - q + sigma^2/2)T)/(sigma sqrt T), d2 = d1 - sigma sqrt T, call = S e^{-qT} N(d1) - K e^{-rT} N(d2), put = K e^{-rT} N(-d2) - S e^{-qT} N(-d1). Round to 6.

Why this case matters

Option expiry, exercise and settlement engines move cash and shares; a wrong branch misstates obligations.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, S, K, r, q, sigma, days):
    def N(x):
        return 0.5 * (1 + math.erf(x / math.sqrt(2)))
    T = days / 360
    if days == 0:
        return round(max(S - K, 0.0) if kind == 'C' else max(K - S, 0.0), 6)
    d1 = (math.log(S / K) + (r - q + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt(T))
    d2 = d1 - sigma * math.sqrt(T)
    if kind == 'C':
        v = S * math.exp(-q * T) * N(d1) - K * math.exp(-r * T) * N(d2)
    else:
        v = K * math.exp(-r * T) * N(-d2) - S * math.exp(-q * T) * N(-d1)
    return round(v, 6)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression year fraction basis 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.35, 7], 9.929732], ['regression year fraction basis 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.1, 730], 20.054633], ['partial repair probe 1', ['C', 90.0, 100.0, 0.05, 0.015, 0.35, 1], 0.0], ['partial repair probe 2', ['C', 110.0, 100.0, 0.0, 0.0, 0.35, 1], 10.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 100.0, 95.0, 0.02, 0.0, 0.35, 0], 0.0], ['normal control 2', ['P', 90.0, 95.0, 0.0, 0.015, 0.2, 0], 5.0]], [['regression year fraction basis 1', ['P', 90.0, 105.0, 0.05, 0.0, 0.2, 7], 14.899363], ['regression year fraction basis 2', ['P', 90.0, 95.0, 0.0, 0.03, 0.35, 7], 5.342895], ['partial repair probe 1', ['C', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 90.0, 105.0, 0.02, 0.0, 0.1, 30], 0.0], ['normal control 2', ['P', 110.0, 100.0, 0.0, 0.0, 0.2, 0], 0.0]], [['regression year fraction basis 1', ['P', 110.0, 105.0, 0.02, 0.0, 0.2, 91], 2.06459], ['regression year fraction basis 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 365], 8.005014], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.03, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 90.0, 100.0, 0.0, 0.03, 0.1, 0], 10.0], ['normal control 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 0], 0.0]], [['regression year fraction basis 1', ['P', 90.0, 95.0, 0.05, 0.03, 0.1, 730], 5.435985], ['regression year fraction basis 2', ['P', 100.0, 95.0, 0.05, 0.03, 0.35, 730], 13.789355], ['partial repair probe 1', ['C', 90.0, 100.0, 0.0, 0.0, 0.35, 1], 0.0], ['partial repair probe 2', ['P', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 5.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 110.0, 105.0, 0.0, 0.0, 0.1, 0], 5.0], ['normal control 2', ['P', 110.0, 95.0, 0.05, 0.015, 0.1, 0], 0.0]], [['regression year fraction basis 1', ['C', 90.0, 95.0, 0.05, 0.0, 0.1, 730], 7.238649], ['regression year fraction basis 2', ['C', 90.0, 100.0, 0.02, 0.0, 0.35, 30], 0.742384], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['C', 90.0, 95.0, 0.05, 0.015, 0.2, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 110.0, 95.0, 0.0, 0.015, 0.1, 30], 0.0], ['normal control 2', ['C', 90.0, 95.0, 0.0, 0.03, 0.1, 1], 0.0]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression year fraction basis 19.9296889.929732Failed
regression year fraction basis 220.18324420.054633Failed
partial repair probe 10.00.0Passed
partial repair probe 210.010.0Passed
boundary control 110.010.0Passed
boundary control 210.010.0Passed
normal control 10.00.0Passed
normal control 25.05.0Passed

SHA-256 / e2b10ab92f94c85a7959cf031384b414a045d820ac72b8180290a22b1dcde8ea

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, S, K, r, q, sigma, days):
    def N(x):
        return 0.5 * (1 + math.erf(x / math.sqrt(2)))
    T = (days + 1) / 365
    if days == 0:
        return round(max(S - K, 0.0) if kind == 'C' else max(K - S, 0.0), 6)
    d1 = (math.log(S / K) + (r - q + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt(T))
    d2 = d1 - sigma * math.sqrt(T)
    if kind == 'C':
        v = S * math.exp(-q * T) * N(d1) - K * math.exp(-r * T) * N(d2)
    else:
        v = K * math.exp(-r * T) * N(-d2) - S * math.exp(-q * T) * N(-d1)
    return round(v, 6)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression year fraction basis 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.35, 7], 9.929732], ['regression year fraction basis 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.1, 730], 20.054633], ['partial repair probe 1', ['C', 90.0, 100.0, 0.05, 0.015, 0.35, 1], 0.0], ['partial repair probe 2', ['C', 110.0, 100.0, 0.0, 0.0, 0.35, 1], 10.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 100.0, 95.0, 0.02, 0.0, 0.35, 0], 0.0], ['normal control 2', ['P', 90.0, 95.0, 0.0, 0.015, 0.2, 0], 5.0]], [['regression year fraction basis 1', ['P', 90.0, 105.0, 0.05, 0.0, 0.2, 7], 14.899363], ['regression year fraction basis 2', ['P', 90.0, 95.0, 0.0, 0.03, 0.35, 7], 5.342895], ['partial repair probe 1', ['C', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 90.0, 105.0, 0.02, 0.0, 0.1, 30], 0.0], ['normal control 2', ['P', 110.0, 100.0, 0.0, 0.0, 0.2, 0], 0.0]], [['regression year fraction basis 1', ['P', 110.0, 105.0, 0.02, 0.0, 0.2, 91], 2.06459], ['regression year fraction basis 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 365], 8.005014], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.03, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 90.0, 100.0, 0.0, 0.03, 0.1, 0], 10.0], ['normal control 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 0], 0.0]], [['regression year fraction basis 1', ['P', 90.0, 95.0, 0.05, 0.03, 0.1, 730], 5.435985], ['regression year fraction basis 2', ['P', 100.0, 95.0, 0.05, 0.03, 0.35, 730], 13.789355], ['partial repair probe 1', ['C', 90.0, 100.0, 0.0, 0.0, 0.35, 1], 0.0], ['partial repair probe 2', ['P', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 5.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 110.0, 105.0, 0.0, 0.0, 0.1, 0], 5.0], ['normal control 2', ['P', 110.0, 95.0, 0.05, 0.015, 0.1, 0], 0.0]], [['regression year fraction basis 1', ['C', 90.0, 95.0, 0.05, 0.0, 0.1, 730], 7.238649], ['regression year fraction basis 2', ['C', 90.0, 100.0, 0.02, 0.0, 0.35, 30], 0.742384], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['C', 90.0, 95.0, 0.05, 0.015, 0.2, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 110.0, 95.0, 0.0, 0.015, 0.1, 30], 0.0], ['normal control 2', ['C', 90.0, 95.0, 0.0, 0.03, 0.1, 1], 0.0]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression year fraction basis 19.9308329.929732Failed
regression year fraction basis 220.0673320.054633Failed
partial repair probe 11.3e-050.0Failed
partial repair probe 210.00007710.0Failed
boundary control 110.010.0Passed
boundary control 210.010.0Passed
normal control 10.00.0Passed
normal control 25.05.0Passed

SHA-256 / 1bbd17acee87c299a68b216cef8c13c3df95f68bd1aca2c7e970c5b48af6b717

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, S, K, r, q, sigma, days):
    def N(x):
        return 0.5 * (1 + math.erf(x / math.sqrt(2)))
    T = days / 365
    if days == 0:
        return round(max(S - K, 0.0) if kind == 'C' else max(K - S, 0.0), 6)
    d1 = (math.log(S / K) + (r - q + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt(T))
    d2 = d1 - sigma * math.sqrt(T)
    if kind == 'C':
        v = S * math.exp(-q * T) * N(d1) - K * math.exp(-r * T) * N(d2)
    else:
        v = K * math.exp(-r * T) * N(-d2) - S * math.exp(-q * T) * N(-d1)
    return round(v, 6)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression year fraction basis 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.35, 7], 9.929732], ['regression year fraction basis 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.1, 730], 20.054633], ['partial repair probe 1', ['C', 90.0, 100.0, 0.05, 0.015, 0.35, 1], 0.0], ['partial repair probe 2', ['C', 110.0, 100.0, 0.0, 0.0, 0.35, 1], 10.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 100.0, 95.0, 0.02, 0.0, 0.35, 0], 0.0], ['normal control 2', ['P', 90.0, 95.0, 0.0, 0.015, 0.2, 0], 5.0]], [['regression year fraction basis 1', ['P', 90.0, 105.0, 0.05, 0.0, 0.2, 7], 14.899363], ['regression year fraction basis 2', ['P', 90.0, 95.0, 0.0, 0.03, 0.35, 7], 5.342895], ['partial repair probe 1', ['C', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 90.0, 105.0, 0.02, 0.0, 0.1, 30], 0.0], ['normal control 2', ['P', 110.0, 100.0, 0.0, 0.0, 0.2, 0], 0.0]], [['regression year fraction basis 1', ['P', 110.0, 105.0, 0.02, 0.0, 0.2, 91], 2.06459], ['regression year fraction basis 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 365], 8.005014], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.03, 0.2, 1], 0.0], ['partial repair probe 2', ['P', 110.0, 100.0, 0.02, 0.0, 0.35, 1], 0.0], ['boundary control 1', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 90.0, 100.0, 0.0, 0.03, 0.1, 0], 10.0], ['normal control 2', ['P', 110.0, 100.0, 0.05, 0.0, 0.35, 0], 0.0]], [['regression year fraction basis 1', ['P', 90.0, 95.0, 0.05, 0.03, 0.1, 730], 5.435985], ['regression year fraction basis 2', ['P', 100.0, 95.0, 0.05, 0.03, 0.35, 730], 13.789355], ['partial repair probe 1', ['C', 90.0, 100.0, 0.0, 0.0, 0.35, 1], 0.0], ['partial repair probe 2', ['P', 100.0, 105.0, 0.0, 0.0, 0.2, 1], 5.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['C', 110.0, 105.0, 0.0, 0.0, 0.1, 0], 5.0], ['normal control 2', ['P', 110.0, 95.0, 0.05, 0.015, 0.1, 0], 0.0]], [['regression year fraction basis 1', ['C', 90.0, 95.0, 0.05, 0.0, 0.1, 730], 7.238649], ['regression year fraction basis 2', ['C', 90.0, 100.0, 0.02, 0.0, 0.35, 30], 0.742384], ['partial repair probe 1', ['C', 100.0, 105.0, 0.05, 0.0, 0.2, 1], 0.0], ['partial repair probe 2', ['C', 90.0, 95.0, 0.05, 0.015, 0.2, 1], 0.0], ['boundary control 1', ['P', 90.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['boundary control 2', ['C', 110.0, 100.0, 0.05, 0.0, 0.2, 0], 10.0], ['normal control 1', ['P', 110.0, 95.0, 0.0, 0.015, 0.1, 30], 0.0], ['normal control 2', ['C', 90.0, 95.0, 0.0, 0.03, 0.1, 1], 0.0]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression year fraction basis 19.9297329.929732Passed
regression year fraction basis 220.05463320.054633Passed
partial repair probe 10.00.0Passed
partial repair probe 210.010.0Passed
boundary control 110.010.0Passed
boundary control 210.010.0Passed
normal control 10.00.0Passed
normal control 25.05.0Passed

SHA-256 / 033b0fd603e39849ee2e7de220aa1e88946f6bee5842753fb49bf178c5fd9fa2

Verification & scope

A deterministic toy contract stated explicitly in the contract field; no claim of conformance to any exchange or clearing rulebook. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:46:56.398436+00:00.

Case digest / a5e6b5f8c4cf5ebed789c0f4cbe507bcb2df2952b0658a436aacdc474ac6dc2d