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

ENH: Add Backtest(spread=), change Backtest(commission=) #839

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kernc
Copy link
Owner

@kernc kernc commented Dec 13, 2022

commission= is now applied twice as common with brokers. spread= takes the role commission= had previously.

Fixes #149
Fixes #113
Closes #662
Closes #1006

`commission=` is now applied twice as common with brokers.
`spread=` takes the role `commission=` had previously.
@casper-hansen
Copy link

Looking forward to this one, it will enable this library to more accurately account for fees, especially with the commission tuple!

@casper-hansen
Copy link

@kernc when do you expect to merge this into the main branch and create a new release?

Comment on lines +734 to +735
def _commission_func(self, order_size, price):
return self._commission_fixed + abs(order_size) * price * self._commission_relative
Copy link
Owner Author

@kernc kernc Feb 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cover all sorts of commission cases?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base case is solved I would say.

Nice to have:
In cryptocurrency exchanges, your commissions tend to be reduced over a rolling 30-day period if you create enough volume.

It would be handy if you could create a scaling commission feature based on the transaction volume. It would also be handy if it can be split into maker/taker.

image

@nohype
Copy link

nohype commented Dec 15, 2023

Hi! First thanks @kernc thanks for building this project. I've been using it for a short while and it's awesome at what it does so far.

Is there any prognosis as to when this would be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants