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

Test for splits #541

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Test for splits #541

wants to merge 2 commits into from

Conversation

sygi
Copy link

@sygi sygi commented Jul 2, 2024

(Failing, do not merge) test showing wrong handling for stock splits.

@KapJI
Copy link
Owner

KapJI commented Jul 2, 2024

Can you fix this issue?

@sygi
Copy link
Author

sygi commented Jul 2, 2024

I'm afraid I might need some support with this. In my mind, splits are basically an accounting trick: what was considered 2 stock yesterday is 10 units today, but there is no other effect. I tried to implement this above by changing the past acquisitions/disposals to operate in post-split space, but this leads to issues about pre-split reporting (if you sold one of the two units before split, it's 1 unit, not 5). This has been used in mssb.py so far.

One alternative I see is to enhance the HmrcTransactionData to keep an information about being ignored for matching purposes but then we'd need to remember about the conversion whenever we cross the line.

WDYT?

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.

None yet

2 participants