What you need to know about CME Order Matching Algorithms
Dear friends! In this article, we will consider a very interesting subject. Perhaps, many of you wondered how order matching is carried out in the CME electronic heart – the Globex trading system. Today we will look into the ‘sancta sanctorum’ of this electronic monster.
In this article:
- Basic concepts and principles of order matching.
- FIFO (First In, First Out) algorithm.
- Pro Rata algorithm.
Basic concepts and principles of order matching
The procedure of buy and sell order matching in the context of the electronic trading environment significantly differs from the parallel process of exchange trading through direct contact of the seller and buyer (Open Outcry). The procedure of order matching could take place with the use of many different methodologies or algorithms.
In fact, the CME Group has several algorithms for the CME Globex trading platform adapted for specific requirements of different markets. It is important to note here that the order matching algorithms constantly develop and you need to constantly ‘keep your finger on the pulse’, monitoring the exchange innovations. It is mandatory to get acquainted with the rules and provisions offered by the exchange for complete understanding of the current mechanism of order matching.
The Globex system has several types of the order matching algorithms. These algorithms realize functionality of order management and guarantee us (the market participants) the best possible execution at the fairest price.
We recommend you to read the Market mechanics: what a novice should know about order matching article before, in order to better understand the exchange technologies discussed in the present article.
The algorithm of order matching is a technology of distribution used for matching an aggressive order with one or several passive orders.
Order matching is carried out in three stages:
- Identification of the current prices of the passive side, which is opposite to an aggressive order, direct or implied prices.
- Identification of a number of contracts/lots in the form of passive orders at the level of the best price on the basis of the Globex rules.
- Allocation of a number of contracts/lots at the level of the best price for executing a trade with the use of the market algorithm.
CME uses the following algorithms:
- FIFO (First In First Out)
- Pro Rata
- FIFO with Lead Market Maker (LMM)
- Split FIFO and Pro Rata
- Threshold Pro Rata
- Threshold Pro Rata with LMM
- Allocation
Today, we will consider FIFO and Pro Rata algorithms in detail.
So, how are aggressive orders matched with the passive ones, which have been previously posted in the order book? For they were accepted at different times from different trade participants. The answer to this question depends on specific features of the market under consideration. Every exchange has its own order matching algorithms. The logic of every algorithm takes into account specific needs and depends on the conditions of the market, for which it was developed.
For the majority of markets, exchanges use a simple and intuitively clear order matching algorithm, which is known as ‘First In, First Out’ (FIFO). For example, the E-mini S&P 500 futures are traded in accordance with the ‘pure’ FIFO methodology. However, it is far from being a universal algorithm. A modified Pro Rata algorithm is used in trading the EUR/USD futures contract. In other markets, especially the developing ones, the Lead Market Maker (LMM) algorithm could be used in an effort to promote the liquidity increase.
FIFO
FIFO or the algorithm of strict priority of price and time is the simplest and intuitively clear mechanism of allocation of trades. The price and time are the only criteria, by which the algorithm matches orders. The FIFO logic is simple. The limit order, which is posted in the order book earlier than others, takes the highest priority among other orders, which are at the same price level, in the process of matching with the incoming aggressive orders. This matching algorithm is the default algorithm for CME if another mechanism hasn’t been identified.
The FIFO algorithm is used for order matching in the market of such instruments as S&P futures, cacao futures, Brent Oil futures and others.
Let’s consider an example, which is published on the CME Group web-site.
Imagine that a Buy Limit aggressive order for 100 contracts was posted in the system at the price of 2,041.25. Limit orders are posted in the order book at the price level of 2,041.25 in the general volume of 150 contracts.
The orders are executed (in the market with the realized FIFO algorithm) in accordance with the principle of the priority of the time of their posting, in other words on the basis of the order of their submission to the electronic system. In order to understand the algorithm operation well, let’s see how and in what order the order matching would take place at the price level of 2,041.25.
Limit orders are posted in the picture in the order of submission. In our example, the order with the ABC identifier ‘came first’ and, consequently, it will be executed first. After that, the XYZ order will be executed. Moreover, the ABC and XYZ orders will be ‘absorbed’ in full. The KLM limit order will be executed partially in the amount of 25 contracts by means of the residual 25 contracts of the aggressive order. 5 KLM contracts will stay in the order book until the next trades.
Note.
Limit orders lose their priority and go to the end of the queue in the event of a change of the size, price or account number.
Pro Rata
The direct Pro Rata algorithm matches the incoming aggressive order with limit orders, located at one price level in proportion to the sizes of these limit orders.
The modified Pro Rata version (the FX Calendar algorithm of the Globex platform) is used in the CME Group. It executes orders in strict adherence to the price, at which they were posted, their sizes and times of posting. The number of contracts/lots of the incoming order-aggressor is distributed in proportion to the sizes of the passive limit orders. The received values are rounded to the nearest whole number. If the allocated size is less than two, it is rounded to zero.
The Pro Rata (proportional) percentage of the limit order is calculated as the quotient of dividing its size by the general size of all limit orders at a certain price level. The FIFO algorithm will be applied to the rest of the parts which emerge in the result of rounding allocated sizes.
And now we move from the ‘dry’ theory to real examples. The Pro Rata algorithm is used in the market of such futures as E-mini JPY/USD, NZD/USD, AUD/USD and others. Let’s consider the Pro Rata algorithm operation through the example of the AUD/USD calendar spread futures (6AZ7).
- So, an aggressive order for buying 100 lots was posted in the system. Let’s visualize what would happen with limit orders of the general size of 255 lots at the Best Ask price level.
- In order to calculate the Pro Rata ratios, the size of each limit order is divided into the general size of all orders, which are located at the level, in our case, 255.
- Further on, the Pro Rata ratios are multiplied by the volume of the received order of 100. The results of calculation are rounded to the nearest whole number.
- The minimum allocated size for AUD/USD is two. That is why, sero is allocated from the LKZ order.
- Allocation in the Pro Rata algorithm takes place in the order from the bigger size to the smaller one. In our example, 58 lots from MOV are allocated first and then 39 lots from ABC.
- So, in the result, the Pro Rata algorithm allocated 97 lots. The rest of the volume in 3 lots, which emerged due to rounding, is allocated in accordance with the FIFO algorithm. Since the order with ABC identifier was posted first, the residual volume in three lots will be allocated namely with this order.
So, in fact, the FX Calendar algorithm works in two stages:
- Pro Rata with minimum allocation;
- FIFO for any residual number.
Check our blog for new publications. We will consider a couple of more order CME matching algorithms in our following article. Best of luck!