I'm writing a script to backtest some strategies for a set of stocks using the bt framework for python. In the bt documentation (backtest module) it says:
commission (fn(quantity)): The commission function to be used.
So when I run my code
result = bt.Backtest(strategy, data, initial_capital= 100000.00, commissions=)
I want to pass a function that returns a percentage based commission e.g. 0.5 % of the transaction. Since I don't know the size of the transactions, is this even possible? How would it otherwise be solved, using a set commission?