Part of #106 (Wheeler phase 2). Rides in with IBKR Flex import (depends on the api/ibkr-flex.js ticket). Per #83, manual ASSIGNED-with-date is the v1 story; this automates detection.
Goal
Detect early assignment of short options from the Flex activity feed and set the correct outcome/date automatically, instead of the user marking ASSIGNED by hand.
Scope
- From imported Flex activity, identify assignment events (option position closed via assignment / resulting stock leg) and map them to the local OPEN option lot.
- Set outcome to ASSIGNED with the actual assignment date (may be before expiry — early assignment).
- Reconcile with the lot engine so the resulting equity lot / cost basis is correct.
- Tests covering an early-assignment Flex fixture end-to-end.
Done when
- A Flex import containing an early assignment flips the matching OPEN lot to ASSIGNED with the real date, no manual entry.
npm test green.
Part of #106 (Wheeler phase 2). Rides in with IBKR Flex import (depends on the
api/ibkr-flex.jsticket). Per #83, manual ASSIGNED-with-date is the v1 story; this automates detection.Goal
Detect early assignment of short options from the Flex activity feed and set the correct outcome/date automatically, instead of the user marking ASSIGNED by hand.
Scope
Done when
npm testgreen.