Algorithms for Information of CME Orders

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:

  1. Identification of the current prices of the passive side, which is opposite to an aggressive order, direct or implied prices.
  2. 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.
  3. 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:

  1. FIFO (First In First Out)
  2. Pro Rata
  3. FIFO with Lead Market Maker (LMM)
  4. Split FIFO and Pro Rata
  5. Threshold Pro Rata
  6. Threshold Pro Rata with LMM
  7. 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

E-mini S&P 500 futures

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

AUD/USD calendar spread futures

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).

Pro Rata ratio
  1. 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.
  2. 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.
  3. 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.
  4. The minimum allocated size for AUD/USD is two. That is why, sero is allocated from the LKZ order.
  5. 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.
  6. 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!


The algorithms for order matching, which were discussed in the previous article, are applied in the flagship contract markets of the CME Group. Of course, not all markets trade as actively. Therefore, to ensure liquidity, the exchange usually attracts market makers. In some cases, it offers market makers special liquidity provisioning incentive programs. One of the most common means of incentivizing market makers is providing preferential treatment in the order queue.

LMM (Leading Market Maker Program) is a special set of conditions provided by the CME Group to authorized market makers who have taken on the obligation to provide liquidity for a specific trading instrument. These market makers receive a certain percentage allocation of incoming orders. This percentage is determined in the agreement between the LMM company and the exchange.

Let’s consider an example with the Eurodollar Futures Pack Butterfly. When orders are matched in this market, the FIFO algorithm with LMM (FIFO with LMM) is used.

Imagine that an aggressive Buy Limit order for 30 contracts has entered the system. Now let’s analyze the algorithm’s logic at the level of 1.25. The total size of limit orders placed at this level is 50 contracts.

ФИФО с МЛМ

So, as we can see, at this price level, there are two limit orders placed in the order book, which together constitute a size of 50 contracts. The order ABC entered the system first, but the order LKZ was identified by the system as an LMM order with a 40% allocation. 40 percent of the aggressive order’s 30 contracts equals 12. Therefore, 12 contracts will receive priority according to the LMM conditions. Once the LMM condition is satisfied, allocation proceeds according to the FIFO algorithm. The remaining 18 contracts will be allocated with ABC.

Split FIFO and Pro Rata Algorithm

The Split FIFO & Pro Rata algorithm is hybrid in structure, as it combines FIFO and Pro Rata mechanisms. Allocation of a portion of the incoming order, X%, occurs using the FIFO algorithm, while the remaining portion, Y%, is allocated using the Pro Rata algorithm.

During the first stage, the FIFO algorithm assigns a specific relative portion of the incoming order for subsequent allocation with time-ordered limit orders.

In the second stage, the Pro Rata algorithm assigns a specific relative portion of the order for allocation with size and time-ordered limit orders, using the Pro Rata formula.

An additional stage for some products involves distributing any unallocated volume remaining after Pro Rata allocation among the limit orders, with one lot per limit order (referred to as 1 lot leveling). The allocation priority for the remaining volume is determined by both the volume size and the time the limit order was placed in the order book. FIFO algorithm is applied to any remaining quantity.

Let’s consider the December futures contract for corn (ZCZ6). When matching the incoming order with passive orders on this contract, a hybrid Split FIFO & Pro Rata method is used, where 40% of the incoming volume is executed using the FIFO algorithm and 60% using the Pro Rata algorithm.

Now, let’s delve into what happens at this level when an aggressive buyer enters the market and decides to purchase 7 contracts of our trading instrument at a price of 411’4 (Best Ask).

Split_FIFO_Pro_Rata_1-3

As we can see, at the best price level of 411’4, there are 5 participants (see the figure below).

During the first stage, FIFO is applied to 40% of the aggressive order size. 40% of 7 equals 3. This portion of the order size is allocated with the first limit order in the queue, identified as ABC. Therefore, after the first stage of the algorithm, the size of order ABC will become 97 (100-3).

Split_FIFO_Pro_Rata_2

During the second stage, the remaining 60% of the aggressive order, which is 4 contracts, will be executed using the Pro Rata algorithm. Orders in the order book are executed based on their size and the time they were placed in the order book (recall the logic of the Pro Rata algorithm, as described in the first part of our article series). Essentially, we determine the percentage of each limit order’s size relative to the total size of all orders at the price level of 411’4.

The total size of all orders at the best price level after the first stage of allocation is: 97 + 30 + 80 + 30 + 60 = 297 contracts. Now, let’s calculate the Pro Rata coefficients:

Split_FIFO_Pro_Rata_3-938x1030

So, the remaining size of our aggressive order, which is 4 contracts (7 – 3), is distributed among the limit orders at the level of 411’4 based on the previously calculated percentage allocations. The percentages found are rounded to the nearest whole number, and then allocation takes place. If the allocated size is less than 1, it is rounded down to 0. It is precisely for this reason that the limit orders XYZ, ZZZ, and OPP are not allocated as a result of the Pro Rata algorithm.Split_FIFO_Pro_Rata_4-1

Any remaining quantity of the aggressive order is executed according to the principle of 1-lot leveling. In our case, after the Pro Rata algorithm, only 2 contracts remain. The execution order of limit orders is determined by their size and the time they were placed in the order book. The limit orders that participated in the Pro Rata allocation (ABC and KLM) do not participate in this stage.

So, there are 3 remaining orders: XYZ for 30 contracts, ZZZ for 30 contracts, and OPP for 60 contracts. OPP is the largest order in terms of size. XYZ and ZZZ are orders of equal size, but XYZ was placed first in the order book. Therefore, the OPP and XYZ limit orders will each be executed for one lot.

Split_FIFO_Pro_Rata_6-1


 

Loading