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

The error in float calculations #1665

Open
okokkokok opened this issue Oct 13, 2023 · 0 comments
Open

The error in float calculations #1665

okokkokok opened this issue Oct 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@okokkokok
Copy link

In Position.py, the function sell_stock() will check np.isclose(self.position[stock_id]["amount"], trade_amount), but I found a bug that this check is False, and self.position[stock_id]["amount"] < -1e-5 is True. The reason of this problem may be the error in float calculations.

@okokkokok okokkokok added the bug Something isn't working label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant