Don’t Use Market Orders

Here’s another little short piece of advice that can save you some pain: Don’t use market orders.  Instead use a limit order across the bid-ask gap.  Under normal conditions you will get exactly the same result, but in abnormal circumstances you can avoid big trouble.

An example will help illustrate why.  Imagine you want to buy one contract of the ES futures contract to open a new position (you’re currently flat) and the top of the order book is as follows:

  • Offer: 325 contracts @ 1360.25
  • Bid: 512 contracts @ 1360.00

Note that the ES market has a 0.25 tick, so the bid and ask are only 1 tick apart, as you would expect with a heavily traded contract like ES.  Let’s say, looking at these prices, that you decide you’re willing to cross the gap and pay 1360.25 to buy.  In other words, you don’t want to sit around bidding 1360.00 waiting to see if you get a fill.  You want your ES now, guaranteed.  The obvious way to accomplish what you want to do here is to enter a market order – BUY ES MKT 1.  But there is another order that accomplishes nearly the same thing – BUY ES LIMIT 1 @ 1360.25.  Under normal circumstances, these two orders have the exact same effect – you end up buying one contract at 1360.25 immediately.  As you might guess, though, circumstances are not always “normal” and the results are not always the same.  Abnormal results can occur due to the combination of two factors: exchange latency and orders being removed from the book either due to execution or cancellation.

Let’s talk about exchange latency first.  Latency can be defined a couple of ways, but it’s easiest to understand as follows: your exchange latency is the time it takes data to transit the network round from the exchange to your computer, and then from your computer back to the exchange.  This latency is usually fractions of a second – milliseconds are the typical unit used.  A 500ms latency or half a second would not be uncommon.  Latency includes both the physical time to transit the network, and time for various computers involved (yours, the exchange, your broker, various routers) to process and make sense of the data.

Another way to think about latency is that it’s the fastest you could possibly enter an order in response to some change in market conditions.

500ms is not a lot of time.  It’s about the time it takes you to blink your eyes twice, fast.  But due to the near-instant nature of modern electronic exchanges, a lot can happen in that time.  For the purposes of this example, the thing you need to worry about is that the order you intended to execute against is no longer there.  In the example 325 contracts are offered at 1360.25.  You want to buy only one of them.  It’s reasonable to assume that offer is still on the books, and that if you send a market order you will execute against it.  But due to latency, it’s possible that someone has already bought all 325, and the best offer is now actually 1360.50.  You just don’t know it yet because the data to update your computer’s view of the order book hasn’t arrived yet.

If you enter the order BUY ES MKT 1, it’s entirely possible you will get filled at 1360.50, not 1360.25 like you thought.  OK, so what?  One tick of ES is worth only $12.50.  This is not exactly the end of the world.  And if one tick were all the market could move in one latency time, I wouldn’t have bothered writing this article.  But of course there’s nothing preventing it from moving much farther than that.  How far can it move?  Good question – during the flash crash, the entire order books of many smaller stocks were totally exhausted, leaving only an empty book or bottom fishing orders to buy at exchange minimum price ($0.01) or sell at exchange maximum (typically $9999.99).  Interestingly, many people entered market orders during the flash crash, and many of those orders actually executed at either exchange minimum or exchange maximum prices.  Wouldn’t it be fun to think you were paying $25.72 per share for some stock, unaware due to latency that your actual purchase price would be $9999.99 per share?

Clearly these transactions during the flash crash were outside of what’s called “orderly trading” – the exchange’s responsibility in essence to keep crap like this from happening.  The exchanges eventually broke or reversed the mis-priced trades.  But that’s not a particularly good way to resolve the problem – broken trades are very bad for traders too. Frequently it is initially unclear if a given trade is going to be broken or not, and as a result you don’t know what your position actually is while the exchange officials make up their minds.  Do you close your position in the market?  If you do, and the exchange subsequently breaks the initial trade, now you’re stuck with the opposite position.  This confusion can interact in horrible ways with your broker’s automated margin call system too if you’re trading on margin.  In an attempt to rectify these issues, US stock markets now have “circuit breakers” that limit such price moves in real time.  But we haven’t yet had a live fire test of how they work.  I certainly won’t be relying on them.

It’s much better never to put yourself in a situation like that.  Instead of entering market orders, enter a limit order that will execute immediately given what’s in the book.  If nothing has changed by the time your order arrives, you’ll get the result you expect.  If the market has moved rapidly away from your for some reason, your limit order will not execute and one latency time later you’ll see the new state of the order book.  At that point you can choose to cancel your order and possibly re-enter it at a new price.  If you follow this procedure, it guarantees you can never have your order executed at a suprising price you didn’t actually want.

The above advice is iron clad for entering new positions.  It’s a little less clear for exiting positions, especially those that have moved against you.  In that case you might decide that you still want to execute at any price – the worse it gets, the more you want to be out.  For this reason, conventional STOP orders convert to MKT orders when triggered, not to LIMIT orders.  There is an alternative order, STOP LIMIT, that converts to a LIMIT order instead.  But they offer questionable protection compared to a conventional STP order, since if the market moves massively through your trigger price the LIMIT order may be at a non-marketable price and you may still be stuck in your position.  Which of the two you should use to limit losses is a complex matter I may come back to.

In either case, you should never enter a straight MKT order.  It’s dangerous, and if you trade for a lifetime it will eventually bit you in the ass.  Stay safe, folks.

Leave a Reply

Your email address will not be published. Required fields are marked *