FA-61660 / Options payoff and settlement / Member archive
Exercise assignment allocation across short accounts: fifo assigns whole positions past the exercised count · case 05
More contracts are assigned than were exercised.
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 fifo allocation cap 1 | [["B2", 5], ["C3", 3], ["D4", 5], ["E5", 2]] | [["B2", 2], ["C3", 3], ["D4", 5], ["E5", 2]] | 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 ↗