Possible execution issues

While the main execution issue with market orders is that they guarantee the execution itself but do not guarantee the execution price, the main issue with limit orders is exactly the opposite: a limit order guarantees the execution price (just by its definition) but does not guarantee the execution as such.

Indeed, let’s carefully consider both cases: if we send a limit order to be executed at a better price (that is, a lower than the current price for a buy limit and a higher than the current price for a sell limit) to an exchange, and if we send such an order to a broker or an ECN.

If we work with an exchange, limit orders go straight into the order app (well, actually not really straight: first they pass the broker’s risk management systems that check whether you have sufficient margin to send such an order, but it doesn’t matter in the current context). However, we should remember that the order app is, in reality, two-dimensional (see Figure 3.2 in Lesson 3FX Market Overview from Developer’s Standpoint, in the Exchange and order app section) and that our order will always be put at the end of the current order queue at the same price level. So, when the market price touches the order level, that is, someone actually traded at the order price, there is no guarantee that the size of that trade was sufficient to match all orders from the same price level – including ours.

Note

One of the most common mistakes during the research and development phase of an algo trading project is assuming that all limit orders are executed, even if their prices were touched by a single tick. This erroneous assumption often leads to the creation of various Holy Grails of trading that work only on paper.

If we trade with an FX broker or an ECN, then most likely, our limit order won’t go into any order app and no one will see it except for that same broker – until the market price reaches the order level. At this moment, the limit order is transformed into a market order and actually sent to the market. With this approach, we may suffer from the same disease as when trading with market orders – potentially, it could be executed at a price that is worse than the limit order price, which sounds exactly the opposite of the very definition of a limit order.

There are several workarounds for this issue, and most of these workarounds are implemented by execution venues. Most of them check the liquidity in the order app before actually sending the market order: if the order size exceeds the liquidity at the best bid/ask, then the order is executed only partially, up to the actual available amount. This way, the traditional behavior of a classical exchange order app is imitated.

Sounds disappointing?

Well, in fact, some (not all, unfortunately) execution venues allow for somewhat greater control over the order execution. Checking the liquidity in the order app prior to sending an order is a good practice, but with some trading technology providers, we can also use special conditions, or specifiers, to control the order’s time in force.


by

Tags:

Comments

Leave a Reply

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