Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Market order to sell short... but no shares?

How does IB/Quantopian handle such a scenario? I am guessing the order is immediately canceled, but it is possible IB keeps the order active until shares are found.

Thanks for the help!

4 responses

It depends, I think it's rejected if it's not shortable, but held if there are simply no shares to borrow. Quantopian will always fill it regardless (in simulation).

In my hedged basket algo I deleverage if one leg has failed to fill sufficiently to satisfy my hedge ratios to within some tolerance.

Thanks Simon, so it doesn't appear to you that IB holds the market order until shares are available, right?

They do do that, yes. You have to be prepared for short orders to be rejected or held indefinitely.