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

Support for fractional shares #29

Open
nicdumz opened this issue Aug 3, 2023 · 1 comment
Open

Support for fractional shares #29

nicdumz opened this issue Aug 3, 2023 · 1 comment

Comments

@nicdumz
Copy link

nicdumz commented Aug 3, 2023

I see that asset_share.shares is an int64. While this generally makes sense intuitively, this means that it becomes hard to use budgetwarrior for share vesting schemes.

In my case, my employer awards me for instance 20 shares of restricted stock, but after withholding taxes, my broker credits me 18.84 shares. So technically if I wanted to automatically track share awards, I would want to to log the acquisition of 18.84 shares, heh.

(And 40 becomes.... 37.681 ? for fascinating rounding reasons I suppose)

For curiosity, I wondered if there's an industry standard on what makes sense, but alas I'm not sure there is anything out there. Fascinating :-)

@wichtounet
Copy link
Owner

Indeed, I have never traded in fractional shares myself, so never saw the need for it on the tracker. But that's a very fair point.

It should be fairly straightforward to implement with two decimal places since I already have code for that, but looking at your link and your example, I think we will need more decimal places.

Once I finish the current refactorings I have started, I will try to add this support 👍

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

No branches or pull requests

2 participants