Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
"WARN Your order for X number of shares of XYZ failed to fill by the end of day and was canceled" ??

I just wanted to see the theoretical performance of my algorithm, so I set every other technicalities to zeros, such slippage and commission fees ....etc

and with a starting hypothetical capital of 10K, dealing with 22 world famous corps' stocks, but even then sometimes, I get the error message

such as "WARN Your order for X number of shares of XYZ failed to fill by the end of day and was canceled" like the one shown here

https://imgur.com/a/5fS3ApT

This time, it seems to happen with FORD but is there a way to circumvent this?

1 response

Make sure you are using the 'FixedSlippage' slippage model. This will completely fill orders in the first non-zero volume bar. As long as there is a non-zero volume bar after the order was placed, and before market close, the orders will always fill. Something like this:

set_slippage(FixedSlippage(spread=0))

In the case of FORD, even though it is a big company, back in 2008 it was very thinly traded (remember the auto industry meltdown). On 2008-1-24 it only traded 22,345 shares and that was over only about 30 trades during the day. The last trade was at 3:19 or 41 minutes before market close. If an order was placed after 3:19 then it would never fill on Quantopian.

Hope that helps.