For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

"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:, 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..


  • 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 ?

Log in to reply