-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: master
Are you sure you want to change the base?
Conversation
`commission=` is now applied twice as common with brokers. `spread=` takes the role `commission=` had previously.
4249ce3
to
cd5ae83
Compare
Looking forward to this one, it will enable this library to more accurately account for fees, especially with the commission tuple! |
@kernc when do you expect to merge this into the main branch and create a new release? |
def _commission_func(self, order_size, price): | ||
return self._commission_fixed + abs(order_size) * price * self._commission_relative |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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? |
commission=
is now applied twice as common with brokers.spread=
takes the rolecommission=
had previously.Fixes #149
Fixes #113
Closes #662
Closes #1006