"Translating" from quantopian to backtrader
-
Hey guys, I'm trying to "translate" an algorithm from quantopian to backtrader, however, I get vastly different results.
I think this has something to do with some of these:
set_slippage(slippage.VolumeShareSlippage(volume_limit=0.3, price_impact=0.1))
set_commission(commission.PerShare(cost=0.0115, min_trade_cost=1.0))I've tried using the following functions in bt to account for them:
cerebro.broker.setcommission(commission=0.0115)
cerebro.broker.set_slippage_perc(perc=0.3, slip_out=False)However, I still get totally different outcome on the algorithm. Does backtrader have VolumeShareSlippage and commission.PerShare ? Am I using the BT functions correctly on this?
Let me know..
Regards,
C -
So I just tested quantopian's "PerShare" stocks commission model and comparing to BTs model - well.. for the same amount of shares BT shows 40k $ commissions, Q shows 211.0 $ commissions.
So, again.. does BT have a PerShare commissions model where we can set the minimum amount - 1$, and 0.0115$ per share ?