General Topics
Markets
Technical Topics
Brokerage Firms
Community Lounge
Site Support

# Details of the CME price matching algorithm?

Discussion in 'Trading' started by archer001, Oct 25, 2006.

1. ### archer001

Does anyone knows the detail of CME price matching algorithm? I mean the algorithm to organize the order book, how last price is choosed, which order is to be excuted, how price changes, etc.

2. ### nazzdack

The most important aspect has to do with establishing an opening that maximizes trading volume based on the interaction of new and open orders. After that, it's a no-brainer for the rest of the session.

3. ### archer001

Actullay I want some question for the details, such like:

a) there is always a last price, equals to either ask price or bid price. how it is calculated? For market buy or sell order, is this last price used for both of them?

b) in what kind of situation does the price move? Suppose a ask/bid price or 99.75/100, and 100 limit order at each side, and 100 market buying order, 100 market selling order. Then, if no new limit order and market order flows in, will the ask/size become zero, and the price remain the same?

Thanks!

4. ### ddunbarGuest

As a starting point, Globex order matching book is FIFO (first in, First out).

Meaning, it matches limit orders by time, price, quantity. In that order.

For market orders, it will supercede the limit orders. But it will match a buy to the ask (sell to the bid) @ the time order enters the system. If it can't fill the entire order, it will set the remainder to a limit order @ the price mrkt order was filled @, stamp the time, and put it in the cue.

Also, if you have a limit order in and you change it, it receives a new time stamp and loses its prior. Meaning, you go to the back of the line.

I know, you're looking for a way to exploit the matching algorithm. That's tough but probably not impossible. I thought of a few ways but in practice didn't pan out.

Here's a link to CME's Globex overview. It's in PDF format. It's a good read. ---> http://www.cme.com/files/GLOBEX brochure final.pdf

5. ### archer001

dear ddunbar, I've already read that brochure But the details is not enough, my two supposed scenario does not solved.

Yes, I think you understand me, but how to describe this exploiting --- I just think understanding the micro-structure of the market will help a better trading for sure. e.g. If the price raise ten pts. in a strait line, then what the real meaning of it?

I've been searching this for days, but no clues at all :-(

6. ### rdg

Oh, what the hell... I'll take a crack at this. Heh
The last price isn't 'calculated,' it's a statement of fact. It's exactly the price at which the last trade took place. Bids and offers can move without any trades taking place, so the last price can be well outside the spread.

The last price isn't used for market orders. A market buy is an order to the exchange to buy at the lowest possible price that can be executed immediately. In general, it will go off at the ask. Also note that GLOBEX doesn't support native market orders; they are simulated by a broker.
When the buy order went off, there were no more willing sellers at 100, so the offer would increase to the next price at which there were willing sellers. After the sell order went off, the bid dropped to the next level at which there were willing buyers. The last price will stay 99.75 until another trade takes place.

I suggest you spend some time watching the order book and time and sales and you will get a feel for it in a hurry.

7. ### ddunbarGuest

Yep.

Globex natively supports Market with limit and market with protection. --->http://www.cme.com/trading/get/abt/enterorder987.html

That's really how it works. And there are some players who "fake" bids and offers. Meaning, they'll place a large limit order into the cue to make it appear as if there's an imbalance. Then they cancel the order seconds later before it reaches a point in the cue that might allow it to get executed. And with CME's excessive messages rule, they can do this 5 times per execution before possibly being fined.

For instance, say the current b/o & size on ES is 1350.00(500)/1350.25(800). Players may post a bid limit to buy @ 1349.75 with a size of 500 in an attempt to hold the market where it is for a few moments in order to be able to buy @ 1350.00. And they may also post a offer limit to sell @ 1350.50 with a size of 500. Making sure the market pretty much stays where it is for a moment. Little tricks like that. There's much more to it than that but as a starting point for conversation this should do.

9. ### jim c

" Also, if you have a limit order in and you change it, it receives a new time stamp and loses its prior. Meaning, you go to the back of the line. " ddunbar...the order only goes to back of the line if you ADD contracts to it or change the price. However if you are working to buy 50 and you shave 2 so that you are now working to buy 48 only, your order will not lose its place in line. You probably know this but the way it is worded might make the op think ALL modifications move your order to the back of the line. hope this helps. jim

hehe. Yes. It is all about the little tricks.

If you see the bid quantity flash 50-2500-50-2500-50, someone is trying to spook the market with fake size.

If you see 50 bid, and a ton of selling going into it and the market isnt moving, there is a maximum show order lurking there, just showing small size so people think its safe to sell into it.

Much of what you see in the order book is an illusion. However, it does offer some clues at certain times...reading it is very much an art form.

-T

#10     Oct 26, 2006
ET IS FREE BECAUSE OF THE FINANCIAL SUPPORT FROM THESE COMPANIES: