On https://www.quantopian.com/docs/api-reference/algorithm-api-reference at order_target_percent it says
order_target_value does not take into account any open orders. For
code will result in 20% of the portfolio being allocated to sid(0)
because the first call to order_target_percent will not have been
filled when the second order_target_percent call is made.
Shouldn't that be order_target_percent(sid(0), 0.1) ?