Empirical Analysis of Limit Order Books

Share on Facebook0Tweet about this on Twitter0Share on LinkedIn0Share on Google+0
Empirical Analysis of Limit Order Books

By Gaurav Raizada

What is an Order book?

With the growing popularity of Algorithmic and High Frequency Trading, study of order books has grown manifolds. “Order book” is essentially an electronic list of all Buy and Sell orders, arranged as per price time priority. This means that a person having higher price on the buy side or lower price on the sell side will get priority over others to execute the trade. If the prices quoted are the same, whoever places the order earlier in time will get the priority.

Order books are extremely dynamic in nature, and update in real time intraday. All order-driven markets use order precedence rule and trade pricing rule. A limit order is an order to buy or sell a given quantity of stock at a specified limit price or better. A market order, however, is an order to immediately buy or sell the stocks at the best available price.

What does an Order book looks like?

Below is an example of a simple order book. Orders on the bid (ask) side represent orders to buy (sell). The best bid is at 82.75 (highest bid price) and the best ask is 82.90 (lowest ask price). The difference between the two is the bid ask spread.

order book

Approaches to Order Book Modeling

A limit order book represents the remaining orders standing at various price limits post the execution and cancellation. Although the limit order offers a better price than a market order, there is no guarantee that it will be filled. The probability of filling a limit order is referred to as the Execution Probability. Major exchanges in the world including Tokyo, Hong Kong and Australian Stock Exchanges operate under the limit order driven system.

The dynamics of a limit order book can essentially be modeled as a double sided queuing system with consumption of orders when the matching criterion is met. It can also be modeled as a continuous double auction, however the time duration between auctions is asynchronous. Insights from queuing theory may then be used for the computation of order execution times, optimal trade execution, short term prediction of price moves and study of price dynamics in markets.

A first approach is to model order arrivals and cancellations in terms of Poisson processes. The limit order book is a Markovian queuing system, for which many quantities may be computed analytically. A second approach is to use asymptotic methods with approximations for the dynamics of buy/sell queues and arriving at an analytically tractable description of Order Book dynamics.

The initial paper that deals with order book observations are Bouchaud et al. (2002) where all order arrivals at all prices along with their time of arrival and all orders that were cancelled are studied. The data used was Paris Bourse for stocks France Telecom, Vivendi and Total and concluded that the statistics of incoming limit order prices, follows a power-law around the current price with a diverging mean and the shape of the average order book.

Challet and Stinchcombe (2001), study the Order Flow rates, instantaneous price impact, lifetime of limit orders of four stocks on ISLAND ECN. Their work also provides information on order sizes and the frequency of the order sizes as well as arrival rates. It also deals with autocorrelation of the order flow rates, which deals with the LOB features of “volumes beget volumes”.

Maslov and Mills (2001) use the top levels data (L2) NASDAQ traded stocks to model the distribution of the order books profiles. It was reported that the size distribution of marketable orders (transaction sizes) has power law tails with an exponent 2.4. The distribution of limit order sizes was found to be consistent with a power law with an exponent close to 2. A large imbalance in the number of limit orders placed at bid and ask sides of the book was shown to lead to a short term deterministic price change, which is in accord with the law of supply and demand.

Gu et al., 2008 studied 23 stocks traded on the Shenzhen Stock Exchange using all orders. The averaged LOB shape has a maximum away from the same best price for both buy and sell LOBs. The LOB shape function has nice exponential form in the right tail. The buy LOB is found to be abnormally thicker for the price levels close to the same best although there are much more sell orders on the book.

1. Empirical Observations (Historical)

1.1. Data

The tick by tick data for the Currency Futures traded in National Stock Exchange was stored using the API provided by the Exchange. The USDINR Currency Futures October Expiry data was timestamped to milliseconds along with order characterstics.

Timestamp, OrderType, OrderSide, Last Traded Price (LTP), Last Traded Quantity (LTQ), Total Traded Quantity (TTQ) New Price, New Size, Old Price, Old Size.

time order

The first row indicates a New Order on the Sell Side with a Price of 62.80 for 100 lots of USDINR Futures. In this case, a sell order will be added to the Limit Order Book at the above mentioned price. The second row indicates a New Order on the Buy side with Price of 62.50 for 1 lot of USDINR Futures. In this case, a buy order will be added to the Limit Order Book at the above mentioned price. The third row indicates a Trade having taken place at a price of 62.7450 for 1 lot of USDINR Futures. In this case, 1 lot of the Limit Order at price of 62.7450 will be removed from the Order Book to maintain the correct state and the Total Traded Quantity will be updated. The fourth and fifth rows indicate a cancel order, whereby Limit Orders at the prices mentioned will be removed from Order Book to maintain the correct state. The sixth and seventh rows indicate the Modify Orders on the Buy and Sell Side.

1.2. Order Size

Bouchaud et al. (2002) and Maslov and Mills (2001) have reported incoming order sizes to be power-law distributed with exponent 1 +/- 0.3. Challet and Stinchcombe have reported strong clustering around round numbers on the order sizes. In NSE, USDINR currency futures for the nearest expiry are found to have 67% orders less than size of 10 lots. An attempt to fit power law distribution will be made and also a comparison with the previous studies can be done.

distribution of order size

Fig 1- Cumulative Distribution for Order Sizes (Red) and Frequency Distribution of the Orders Sizes (Blue)

1.3. Relative Price

New Orders placed into LOB can be analysed on the relative price from the best bid and ask at the time when the order was placed. The distribution of orders on the basis of relative prices has been reported to be following a Power-Law behaviour. (Bouchaud et al., 2002; Gu et al., 2008b; Maskawa, 2007; Mike and Farmer, 2008; Potters and Bouchaud, 2003; Zovko and Farmer, 2002). Similar power law exponents have been reported for LSE and Shenzen Stock Exchange.
In the current case, it is observed that most orders arrive at best bid and ask. Close to 99% of all new orders placed in the exchange are within 2 ticks of the best bid and ask. This could be due to Order to Trade Ratio regulations on Indian Exchanges. These rates of arrival of orders close to the best bid and ask has not previously been reported and needs to be investigated for other stocks. The symmetric nature of the distribution is different from that reported by Gu et al. for Shenzen Stock Exchange.

price distribution

Fig 2 – The Relative Price Distribution in terms of Ticks from Best Bid and Best Ask.

2. Empirical Observations

The Empirical Observation observed on the National Stock Exchange data for Currency Futures varies from the reported Literature. The new order relative distributions are symmetric as against the asymmetric distribution reported by Gu et al. The Order sizes reported have similar characteristics as Challet and Stinchcombe with significant clustering around round lots. The Relative Price Distribution is also highly symmetric but the depth is highly clustered around the best bid/ask. This clustering of the Orders around the Best Bid/Ask for markets with High Volumes is also a new feature.

3. Appendix

Bouchaud, J.P., Mezard, M. and Potters, M., Statistical properties of stock order books: empirical results and models. Quantitative Finance, 2002

Bouchaud, J.P. and Potters, M., Theory of Financial Risk and Derivative Pricing: From Statistical Physics to Risk Management 2003, Cambridge University Press

Challet, D. and Stinchcombe, R., Analyzing and modeling 1 + 1d markets. Physica A, 2001

Clauset, A., Shalizi, C.R. and Newman, M.E.J., Power-law distributions in empirical data. SIAM Review, 2009

Cont, R. and de Larrard, A., Price dynamics in a Markovian limit order market. arXiv:1104.4596, 2011

Farmer, J.D. and Lillo, F., On the origin of power-law tails in price uctuations. Quantitative Finance, 2004

Gould, M.D., Porter, M.A., Williams, S., McDonald, M. Fenn, D.J. and Howison, S.D., Statistical properties of for eign exchange limit order books. 2013

Gu, G.F., Chen, W. and Zhou, W.X., Empirical regularities of order placement in the Chinese stock market. Physica A, 2008

Gu, G.F., Chen, W. and Zhou, W.X., Empirical shape function of limit-order books in the Chinese stock market. Physica A, 2008

Share on Facebook0Tweet about this on Twitter0Share on LinkedIn0Share on Google+0

Leave a Reply

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