Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteratively cover one loss lot at a time #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Iteratively cover one loss lot at a time #12

wants to merge 4 commits into from

Conversation

mag1024
Copy link

@mag1024 mag1024 commented Apr 8, 2016

The old code was trying to batch-match all sales on a given day, with eligible buys.
This had several problems:

  1. The buys were selected to be eligible to cover the first loss only. Other losses on the same day may have had overlapping buy lots.
  2. The buys and loss arrays got out of sync and lots were split.

This is an alternative approach that repeatedly picks the (singular) earliest loss and finds lots to cover it.
The change is pretty invasive, so I don't necessarily expect you to merge as-is, but I do think it fixes some legitimate deep rooted issues, so I don't want it to get lost.

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