Skip to content

Wheeler phase 2: automated early-assignment detection from Flex #112

Description

@heyitsStylez

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions