title: Python backtest using percentage based commission
body: <p>I'm writing a script to backtest some strategies for a set of stocks using the bt framework for python. In the bt documentation (<a href="http://pmorissette.github.io/bt/bt.html#module-bt.backtest" rel="nofollow">backtest module</a>) it says: </p>
  
  <blockquote>
    <p>commission (fn(quantity)): The commission function to be used.</p>
  </blockquote>
  
  <p>So when I run my code </p>
  
  <pre><code>result = bt.Backtest(strategy, data, initial_capital= 100000.00, commissions=)
  </code></pre>
  
  <p>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?</p>