Skip to content

ENH: Add fixed commission option to _Broker (see #623) #662

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

Closed
wants to merge 3 commits into from
Closed

ENH: Add fixed commission option to _Broker (see #623) #662

wants to merge 3 commits into from

Conversation

mutt0-ds
Copy link

@mutt0-ds mutt0-ds commented Jun 15, 2022

Hello and thanks for this amazing library!
I added the 'use_fixed_commission' parameter to the class _Broker: if set to "True", in the function _adjusted_price the commission will be calculated as a flat fee instead of a percentage.

Fixes #623

At first I thought about using parsing the value from commission (e.g. if the value is '0.05' -> percentage, if '1$' -> remove the dollar sign and parse it as fixed fee), but I don't want to mess up with the types so I added another parameter in the _Broker instance.

What do you think? :)

@mutt0-ds
Copy link
Author

@kernc can you please let me know if I have to modify anything? Thank you!

@kernc kernc force-pushed the master branch 9 times, most recently from 60eff81 to 109c352 Compare November 28, 2022 22:33
@mutt0-ds mutt0-ds closed this by deleting the head repository Sep 2, 2024
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.

commission in dollar value
1 participant