FAILURE MAP
← Case archive

FA-61510 / Options payoff and settlement / Member archive

Option strategy max gain, max loss and breakevens: the upside tail root has the wrong sign · case 05

Long call breakevens are reported below the strike.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Inputs legs [kind C/P/S, strike (purchase price for stock S), signed qty, premium] and a multiplier. Expiry value V(S) = multiplier * sum(q*(intrinsic - premium)) for options and q*(S - price) for stock, in exact fractions. Breakpoints are 0 and every strike. Tail slope = V(top+1)-V(top). Max gain is None if the slope > 0 else the max over breakpoints; max loss is None if slope < 0 else the min. Breakevens are zeros at breakpoints and linear-interpolated sign changes between them and in the tail. Return [gain, loss, breakevens] rounded to 4.

Why this case matters

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

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression tail breakeven 1[5.1, null, [79.9]][5.1, null, [90.1]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗