FAILURE MAP
← Case archive

FA-61508 / Options payoff and settlement / Member archive

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

Long call breakevens are reported below the strike.

Member previewVariant 3 · 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[7.75, null, [77.25]][7.75, null, [92.75]]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 ↗