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

Broker rounds down fractional share trades, losing them from the system #209

Open
sbenthall opened this issue Apr 14, 2023 · 0 comments
Open

Comments

@sbenthall
Copy link
Owner

Mainly to @alanlujan91 :
With the current implementation, this has some weird consequences.

image

It looks like we've been allowing trade in fractional shares on the SHARKFin side (because that makes things so much easier) and have only rounded things off to integers when the broker trade()s orders to the market.

https://github.com/sbenthall/SHARKFin/blob/master/sharkfin/broker.py#L70-L72

This means that with a tiny income (see #208 ) , we still see the consumer households slowly accumulate fractional shares, which add up to whole shares in aggregate. But no 'buy' orders are being sent, because the fractional shares are being rounded down to 0 each day in the Broker's calculation.

While probably not a big deal, it is very visible in the plots of the 'real economy' when there is zero starting wealth, since that's the only activity. This may be trivialized by #205 , but is also technically a bug. Filing for later.

@sbenthall sbenthall added this to the v0.4.3 FIRE SHARK bonus milestone Apr 14, 2023
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

1 participant