FA-61509 / Options payoff and settlement / Member archive
Option strategy max gain, max loss and breakevens: the upside tail root has the wrong sign · case 04
Long call breakevens are reported below the strike.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression tail breakeven 1 | [510.0, null, [74.9]] | [510.0, null, [85.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 ↗