FA-61650 / Options payoff and settlement / Member archive
Exercise assignment allocation across short accounts: leftovers go to the smallest remainders · case 05
Accounts closest to deserving another contract are skipped.
Case contract
Inputs exercised contracts (<= total short), shorts [account, qty, open sequence] and method. fifo assigns in ascending open sequence, each up to its quantity. pro-rata gives floor(exercised*qty/total) and distributes the remaining contracts one each by largest fractional remainder, ties by lower open sequence. Return sorted [account, assigned] for accounts with assignments.
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 remainder ranking 1 | [["B2", 3], ["C3", 4], ["F6", 5]] | [["A1", 1], ["B2", 2], ["C3", 4], ["E5", 1], ["F6", 4]] | 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 ↗