How to define a commission scheme for Cryptos?
I'm trying to trade cryptos using backtrader, but the commission scheme is quite different.
If the commission fee is 0.2%, which means if I buy 1btc, what I really get is 0.998btc. How can I define such commission scheme in backtrader?
To Crypto or not to Crypto, that is the question. It's a simple mathematical operation.
size of asset a * commission in terms of a = size of asset b * 0.998
You already know the
size of asset bwhich is
1and the price it has in
size of asset a(your fiat currency), which means you can work out what the actual commission in fiat currency is.
Obviously you do that for each operation by creating a custom sizer. Docs - User Defined Commissions