The article discusses the importance of an order book, and how trade orders are matched during Continous Trading Session (CTS) and Closing Auction Session (CAS), and the algorithm generally adopted by exchanges for determining the Indicative Equilibrium Price (IEP).
What is an order book?
An order book refers to a list of outstanding buy and sell orders for a financial instrument. An order to buy is called a "bid" while an order to sell is called an "ask". The list presents the number of shares being bid on or offered at each price point. These lists help improve market transparency to
- provide market depth information (also called 'Level 2 data')
- identify the market participants behind the buy and sell orders (some exchanges keep it anonymous)
Market Practice
In most of the trading systems, order books are usually presented as follows.
1. Top of the Book
The order book is separated into bid-book and ask-book, where bid orders are sorted in descending of price while ask orders are sorted ascendingly. The highest bid and the lowest ask are referred to "the top of the book". The difference between the highest bid and the lowest ask is called the "bid–ask spread".
2. Order Ledger
The order book is listed in a sorted price ledger, which can be ascending or descending. The longer the price ledger is, the more liquidity an instrument provides. It is also called "market depth".
3. Cummulative Order Book
For each of the bid and ask book, order size accumulates from the top of the book. In visual presentation, the cummulative area provides insights about market supply and demand. For example, if the area of the cummulative bid book is much larger than that of the ask book, it implies more demand in current market.
Order Types
Most exchanges/brokers support at least these 2 order types:
- Market Order:
- A market order will buy or sell a security immediately when market is open.
- This type of order guarantees that the order will be executed, but does not guarantee the execution price.
- A market order generally will execute at or near the current bid (for a sell order) or ask (for a buy order) price.
- Limit Order:
- A limit order allow matching only at the specified price.
- The sell order input price cannot be made at a price below the best bid price, whereas the buy order input price cannot be made at a price above the best ask price.
- Any outstanding limit order will be put in the price queue of the input price.
- An order book is mainly contructed by Limit Orders
Order Matching in Continuous Trading Session (CTS)
Suppose the original order book of a particular stock is:
Price | Volume | Price | Volume |
---|---|---|---|
Bid | Ask | ||
$30 | 100,000 | $30.05 | 80,000 |
$29.95 | 90,000 | $30.1 | 70,000 |
$29.9 | 80,000 | $30.15 | 160,000 |
$29.85 | 60,000 | $30.2 | 50,000 |
$29.8 | 180,000 | $30.25 | 60,000 |
$29.75 | 34,000 | $30.3 | 50,000 |
$29.7 | 100,000 | $30.35 | 40,000 |
$29.65 | 150,000 | $30.4 | 45,000 |
$29.6 | 18,000 | $30.45 | 25,000 |
$29.55 | 36,000 | $30.5 | 70,000 |
$29.5 | 200,000 | $30.55 | 80,000 |
$29.45 | 150,000 | $30.6 | 55,000 |
$29.4 | 50,000 | $30.65 | 50,000 |
$29.35 | 20,000 | $30.7 | 25,000 |
A trader submit a limit order to buy 500,000 shares at $30.50. Then, the executed trades would be:
- 80,000@ 30.05
- 70,000@ 30.10
- 160,000@ 30.15
- 50,000@ 30.20
- 60,000@ 30.25
- 50,000@ 30.30
- 30,000@ 30.35
Also, the order book after execution becomes:
Price | Volume | Price | Volume |
---|---|---|---|
Bid | Ask | ||
$30 | 100,000 | $30.35 | 10,000 |
$29.95 | 90,000 | $30.4 | 45,000 |
$29.9 | 80,000 | $30.45 | 25,000 |
$29.85 | 60,000 | $30.5 | 70,000 |
$29.8 | 180,000 | $30.55 | 80,000 |
$29.75 | 34,000 | $30.6 | 55,000 |
$29.7 | 100,000 | $30.65 | 50,000 |
$29.65 | 150,000 | $30.7 | 25,000 |
$29.6 | 18,000 | $30.75 | 20,000 |
$29.55 | 36,000 | $30.8 | 70,000 |
$29.5 | 200,000 | $30.85 | 20,000 |
$29.45 | 150,000 | $30.9 | 10,000 |
$29.4 | 50,000 | $30.95 | 70,000 |
$29.35 | 20,000 | $31 | 15,000 |
Order Matching in Pre-opening Session and Closing Auction Session (CAS)
Before market opens (or right after market closes), traders can start input orders during the order input period. An Indicative Equilibrium Price (IEP) refers to the reference price for potential order matching during such periods. IEP does not necessarily exists if there is no cross book. If IEP exists, it is determined following these criterias:
- maximum of tradeable quantity
- minimum of normal order imbalance
- depending on order imbalance direction
- cloest to the last nominal price at the end of the continuous trading session
i. Maximum of Tradeable Quantity
Orders can be inputed during the Order Input Period. The order book closes at the commencement of Order Matching Period and traders will not able to input, modify or cancel any order. Suppose the order book at the commencement of order matching period shows:
Trader | Input Time | Quantity | Price | Price | Quantity | Input Time | Trader |
---|---|---|---|---|---|---|---|
Bid | Ask | ||||||
I | 16:09 | 2000 | At-auction | At-auction | 1000 | 16:08 | H |
A | 16:06 | 200 | 24.05 | 23.95 | 400 | 16:07 | D |
B | 16:05 | 1000 | 24 | 24 | 600 | 16:06 | E |
C | 16:01 | 400 | 23.95 | 24.05 | 400 | 16:03 | F |
24.05 | 400 | 16:05 | G |
The highest bid price of the buy at-auction limit orders is equal to or higher than the lowest ask price of the sell at-auction limit orders (i.e. the order book is crossed). IEP shall be one of the bid prices or ask prices at which the aggregate size of the trades is maximised.
Price | Aggregate Bid Quantity | Aggregate Ask Quantity | Tradeable Quantity |
---|---|---|---|
24.05 | 2200 | 2800 | 2200 |
24 | 3200 | 2000 | 2000 |
23.95 | 3600 | 1400 | 1400 |
Therefore, $24.05 is taken as final IEP and the following trades are concluded.
Trader on Bid Side | Trade Quantity | Trader on Ask Side |
---|---|---|
I | 1,000@$24.05 | H |
I | 400@$24.05 | D |
I | 600@$24.05 | E |
A | 200@$24.05 | F |
ii. Minimum of Normal Order Imbalance
Suppose the order book at the commencement of order matching period shows:
Trader | Input Time | Quantity | Price | Price | Quantity | Input Time | Trader |
---|---|---|---|---|---|---|---|
Bid | Ask | ||||||
A | 16:07 | 5000 | 3.22 | At-auction | 20000 | 16:09 | E |
B | 16:04 | 5000 | 3.21 | 3.19 | 5000 | 16:06 | F |
C | 16:02 | 15000 | 3.2 | 3.2 | 5000 | 16:04 | G |
D | 16:02 | 10000 | 3.19 | 3.21 | 5000 | 16:05 | H |
00:00 | 3.22 | 10000 | 16:01 | I |
Price | Aggregate Bid Quantity | Aggregate Ask Quantity | Tradeable Quantity | Normal Order Imbalance |
---|---|---|---|---|
3.22 | 5000 | 45000 | 5000 | 40000 |
3.21 | 10000 | 35000 | 10000 | 25000 |
3.2 | 25000 | 30000 | 25000 | 5000 |
3.19 | 35000 | 25000 | 25000 | 10000 |
This example has more than one price with the maximum tradeable quantity. The second criteria applied. Hence, $3.20 is taken as the IEP as it offers the maximum tradeable quantity and minimum order imbalance.
iii. Order Imbalance Direction
Suppose the order book at the commencement of order matching period shows:
Trader | Input Time | Quantity | Price | Price | Quantity | Input Time | Trader |
---|---|---|---|---|---|---|---|
Bid | Ask | ||||||
A | 16:01 | 5000 | At-auction | At-auction | 50000 | 16:07 | F |
B | 16:02 | 15000 | 3.21 | 3.17 | 55000 | 16:06 | G |
C | 16:03 | 15000 | 3.2 | 3.19 | 35000 | 16:05 | H |
D | 16:03 | 20000 | 3.19 | 3.2 | 50000 | 16:03 | I |
E | 16:03 | 10000 | 3.18 | 3.22 | 35000 | 16:01 | J |
Price | Aggregate Bid Quantity | Aggregate Ask Quantity | Tradeable Quantity | Normal Order Imbalance |
---|---|---|---|---|
3.21 | 20000 | 190000 | 20000 | 170000 |
3.2 | 35000 | 190000 | 35000 | 155000 |
3.19 | 55000 | 140000 | 55000 | 85000 |
3.18 | 65000 | 105000 | 65000 | 40000 |
3.17 | 65000 | 105000 | 65000 | 40000 |
In this example, as there is more than one price which generates the maximum tradeable quantity and minimum order imbalance, the third criterion applied which looks at the direction of normal order imbalance at such prices. Since the normal order imbalance at both $3.18 and $3.17 is on the ask side, it means that there is a greater supply than demand. Hence, the algorithm will choose the lower price (ie $3.17) as the IEP.
iv. Closest to the last nominal price at the end of the CTS
Suppose the order book at the commencement of order matching period shows:
Trader | Input Time | Quantity | Price | Price | Quantity | Input Time | Trader |
---|---|---|---|---|---|---|---|
Bid | Ask | ||||||
A | 16:09 | 5000 | At-auction | At-auction | 15000 | 16:03 | G |
B | 16:07 | 5000 | 3.22 | 3.17 | 20000 | 16:06 | H |
C | 16:07 | 15000 | 3.21 | 3.18 | 5000 | 16:05 | I |
D | 16:03 | 10000 | 3.2 | 3.19 | 5000 | 16:01 | J |
E | 16:01 | 5000 | 3.19 | 3.2 | 10000 | 16:01 | K |
F | 16:02 | 5000 | 3.18 | 3.21 | 5000 | 16:04 | L |
Price | Aggregate Bid Quantity | Aggregate Ask Quantity | Tradeable Quantity | Normal Order Imbalance |
---|---|---|---|---|
3.22 | 10000 | 60000 | 10000 | 50000 |
3.21 | 25000 | 60000 | 25000 | 35000 |
3.2 | 35000 | 55000 | 35000 | 20000 |
3.19 | 40000 | 45000 | 40000 | 5000 |
3.18 | 45000 | 40000 | 40000 | 5000 |
3.17 | 45000 | 35000 | 35000 | 10000 |
In this example, there is still no conclusion following the criteria (i) to (iii). Hence, the algorithm continues to choose the price which is the closest to the last nominal price at the end of the continuous trading session.
$3.19 will be selected as the IEP if the last nominal price is equal to or higher than $3.19. On the other hand, if the last nominal price is less than or equal to $3.18, IEP will be $3.18.
Conclusion
After reading this article, you should have more understanding about how order matching works in exchanges. Analyzing the micro structures and changes in order book might provides useful insights about the short term trend. These trading strategies will be discussed in the coming posts!