For the attached backtest, if I use
order_target_percent
instead of order
I get the error:
Something went wrong. Sorry for the inconvenience. Try using the built-in debugger to analyze your code. If you would like help, send us an email.
Cannot order CPSH on 2011-01-04 15:30:00+00:00 as there is no last price for the security. Try using data.can_trade to check whether an asset is delisted.
There was a runtime error on line 42.
However, I thought that if the security list is generated by pipeline, which it is in this case, this problem would not occur (since pipeline does not admit securities if they have no prior prices).