Skip to content

Count CLOSED (buy-to-close) as a settled position - #141

Merged
heyitsStylez merged 1 commit into
mainfrom
fix/closed-settled-count
Sep 5, 2026
Merged

Count CLOSED (buy-to-close) as a settled position#141
heyitsStylez merged 1 commit into
mainfrom
fix/closed-settled-count

Conversation

@heyitsStylez

Copy link
Copy Markdown
Owner

Problem

Wheeler's Premium Economics showed "0 positions settled" despite closed-early (buy-to-close) positions in Position History. calcPremiumStats only treated EXPIRED/ASSIGNED/CALLED as settled, so CLOSED rows fell through — excluded from the settled count and from Return Rate.

Fix

  • Count CLOSED as a settled outcome (premium kept, no assignment/call-away) — added to settled and to the Return Rate numerator.
  • Fix the Total Premium tooltip: it claimed "gross of buy-to-close costs" but the value is net (premium − closeCost). Tooltip now says net.
  • Reword the Return Rate tooltip to include closed-early positions.
  • Regression test for CLOSED counting as settled.

Build + 191 tests green.

calcPremiumStats only treated EXPIRED/ASSIGNED/CALLED as settled, so
buy-to-close positions showed '0 positions settled' and were excluded
from Return Rate. Count CLOSED as settled (premium kept, no assignment)
and fix the Total Premium tooltip which wrongly claimed 'gross' when the
value is net of buy-to-close costs.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
gowheeler Ready Ready Preview Sep 5, 2026 12:22am UTC
hyperwheel Ready Ready Preview Sep 5, 2026 12:22am UTC

@heyitsStylez
heyitsStylez merged commit 58f911d into main Sep 5, 2026
5 checks passed
@heyitsStylez
heyitsStylez deleted the fix/closed-settled-count branch September 5, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant