Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [limit-order-book]

The prioritized list of resting orders held by the exchange. Each limit order represents an obligation to buy or sell. The most common type of order book is prioritized first by price and them by time. Another variation is the price/size book, where larger size results in higher priority.

36
votes
6answers
18k views

What is an efficient data structure to model order book?

What is an efficient data structure to model order book of prices and quantities to ensure: constant look up iteration in order of prices retrieving best bid and ask in constant time fast quantity ...
31
votes
9answers
13k views

What tools exist for order book analysis and visualization?

What tools exist for order book analysis and visualization? In particular, if one wanted to examine a limit order book and understand how it changes throughout the day where would you turn for ...
23
votes
3answers
8k views

How are limit orders selected from the order book?

I'm sure there is a simple answer to this but I haven't had any luck with searches. I'm just wondering when someone places a market order which order(s) from the limit order book are selected to fill ...
23
votes
5answers
7k views

Implementing data-structures in a Limit order book

I'm working on implementing a 'LOB' and I'm being very careful about choosing my data-structures so as to maximize performance. Using F# as an example, I need to consider a List versus Array for ...
18
votes
1answer
980 views

What techniques are used for testing order book implementations?

I am finishing the implementation of a limit order book for modeling NASDAQ. The order book works off of the ITCH feed. My question is what techniques are typically used for testing order books. I am ...
17
votes
3answers
8k views

Control for bid/ask bounce in high-frequency trade data?

The bid-ask bounce is the bouncing of trade prices between the bid and ask sides of the market. It introduces a systematic bias to the data which can cause serious problems in analysis. What methods ...
16
votes
3answers
3k views

Order submission strategies of a rational market maker?

Consider a market maker that has decided to try to make a round-trip trade in stock A in order to capture the bid-ask spread. Assume furthermore that he has no current inventory in the stock A. To ...
14
votes
3answers
780 views

What is the most effective way of determining & measuring the level of HFT activity in a stock in (close to) real time?

On a security by security basis, I want to be able to quantify the level of HFT activity (and later institutional & retail activity). Is it higher than it normally is? How much so? What would you ...
12
votes
2answers
1k views

Order Book Dynamics

I have been following this paper: Price dynamics in a Markovian limit order market, by Rama Cont and Adrien De Larrard The model is especially pertinent as I only have access to L1 data. The model ...
11
votes
1answer
1k views

A generic limit order book: What are the most important queries it should be able to answer?

Assume a class LimitOrderBook which represents a limit order book in a trading system. To be able to represent the limit order book a data handler reads a feed ...
9
votes
3answers
2k views

Limit order book size

I am trying to write a highly optimised limit order book and I wondered what sort of size I can expect for: Range of limit prices Number of orders at each limit price I am developing custom hardware ...
8
votes
2answers
2k views

Non-SQL methods for high-frequency accounting?

Does anyone know of any prior art for non-SQL data structures for high-frequency accounting, whether client, broker, or exchange-side? I'm thinking specifically of the problem of booking individual ...
8
votes
1answer
598 views

How does one calibrate lambda in a Avellaneda-Stoikov market making problem?

In market making models derived originally from Avellaneda-Stoikov, there is a function lambda that represents the arrival rate of orders. In its prodigy, there are different representations of lambda,...
8
votes
1answer
859 views

How do you calibrate a poisson arrival rate process?

Many papers in the microstructure literature assume an order arrival rate of the form $\lambda^a(\delta) = \lambda^b(\delta) = Ae^{-k\delta}$ That is, an order that's placed $\delta$ away from the ...
8
votes
0answers
292 views

Market Maker portfolio management

I am interested in articles/strategies related to portfolio and inventory management for market makers and to management of order cancellation, updates of order, etc. Most of the strategies from ...
7
votes
1answer
1k views

Why would a trader quickly flicker an order immediately preceding a tick away?

The Setup Assume the inside market is $15.15 \times 15.16$ and there is a very large bid order imbalance. For example, 30,000 shares bid across 100+ orders, 200 shares offered across 1 order; however,...
7
votes
1answer
2k views

What exactly is an ISO order?

I have been looking this up and I feel like I keep running into different definitions. My understanding is that an ISO order is one which will get filled with the displayed quantity in a particular ...
7
votes
1answer
384 views

How do I convert order book data into OHCL( Open,High,Low,close) format?

The image represents the order book data with columns having following attributes: a0: Best ASK price (i.e. the lowest posted price at which someone is willing to sell an asset) b0: Best BID price (...
6
votes
6answers
3k views

FIX- what exactly do repeating groups represent?

I am trying to find out what is the purpose of "repeating groups" in FIX and what exactly do they represent? Are they all related to the same order and if so, why do you need repeated tags? If they ...
6
votes
5answers
2k views

Estimate probability of limit order execution over a large time frame

I have a negligible amount of money (\$5000) that I would like to invest in a stock. I would like to buy the stock at some point in the next year, and get the lowest possible price. I would like to ...
6
votes
1answer
5k views

open-source implementation of orderbook from FAST?

I'm looking for c/c++ implementation of OrderBook. I need implementation to reconstruct market data from FAST. I don't need to do "matching" because it already did by exchange, I only need to "...
6
votes
1answer
3k views

how do we estimate position of our order in order book?

how would you estimate your order in the exchange order book? The order of order events and acks is not deterministic or guaranteed. How could you write an algo to estimate accurately your position in ...
5
votes
4answers
934 views

Deep bid ask orders

Why do I often see some very deep limit buys and limit sells in a limit book? For instance the bid-ask may be \$39.00-39.01 but I see some bids at \$20 or even \$10 and some ask at \$60 or even \$500. ...
5
votes
1answer
205 views

Limit order book cancellations

Is there any practical and academic interest in predicting which orders in a limit order book will be canceled? From a policy point of view are people interested in detecting potential spoofing ...
5
votes
2answers
292 views

What are “Autoquotes”?

I'm reading a 2008 JoFMarkets paper by Shkilko et al. with title "Locked and crossed markets on NASDAQ and the NYSE" in which the authors investigate the determinants of locked and crossed markets. ...
5
votes
0answers
324 views

What is the proportion of aggressive orders vs passive orders executed by different types of traders?

It's clear that each aggressive order (or market order or limit crossing BBO) is matched against the same volume of resting limit order(s). I'm interested in statistics per different types of ...
4
votes
2answers
204 views

Limit order book - does it get wiped over night?

Let's say we have a look at the NASDAQ's limit order book. We do have a bid side and ask side levels. Does the limit order book get wiped over night? Meaning everything which is not executed is ...
4
votes
2answers
724 views

What are flickering orders?

I am reading a paper for my bachelor thesis, Queuing Uncertainty in Limit Order Market by Bart Zhou Yueshen who is the new AP at INSEAD. In the abstract, the author said: "Flickering orders manifest ...
4
votes
1answer
411 views

What is a good source to learn the different nuances of electronic orders and their nature?

Today I was speaking with someone involved in high frequency trading. They were mentioning hidden orders, queue positions (which can be lost in the orderbook based on certain order modifications), ...
4
votes
2answers
2k views

Order Execution Algorithms

To execute large orders under minimum price impact or to hide a market view, trading systems sometimes utilize special order execution algorithms or order types. One example is an iceberg order, ...
4
votes
3answers
492 views

What is the correct / expected behavior for a market order sent to an empty book?

Should it stick around until liquidity shows up? (GTC) Should it cancel any size for which there is no liquidity? (IOC) Is there such a thing as Market GTC or Market Orders must always be IOC?
4
votes
2answers
394 views

What does ABBO (Away best bid and offer) refer to?

I know what the NBBO is but I've seen mention of ABBO and I'm not sure what it means?
4
votes
4answers
343 views

Modelling HFT data

In the context of Market making, how important is recent trades? In general, would i be able to get away with just modelling the Limit Order Book (LOB) and the evolution of the LOB in order to ...
4
votes
1answer
542 views

Model reference price of Limit order book

first of all, the description of this Stackexchange forum says its for professionals or academics. I'm doing a lot of self studying and with that I was able to understand some white papers but still I'...
4
votes
3answers
437 views

Executions deep in the Limit Order Book?

I have some Level III (message level) data for equities and I have found several cases in which I register the execution of a Limit Order at a price "worse" than the best bid or ask. For example, ...
4
votes
0answers
505 views

Mid-Point calculation with execution probability

Referring Cao, Hansch, and Wang (2004) "The Informational Content of an Open Limit Order Book" $$ \mbox{WP}^{n_1 - n_2} = \frac{\sum_{j=n_1}^{n_2} (Q_j^d P_j^d + Q_j^s P_j^s)}{(Q_j^d + Q_j^s)} $$ ...
3
votes
4answers
758 views

Trader's identity in a limit book

In a limit book like NASDAQ ITCH, can liquidity suppliers know the demand-side identity of a trader prior or after a trade? Knowing this will help me with my theoretical model that I am trying to ...
3
votes
3answers
433 views

Latency and Delays across Exchanges

I have recently come across this paper by Battalio et al. "Can Brokers Have it all? On the Relation between Make Take Fees & Limit Order Execution Quality" and realized how little I know about the ...
3
votes
1answer
261 views

Limit and Market Order for training a ML model

Goal : Using deep learning to build a ML model which would predict the right places where a stock price will increase, decrease or stay stable. For the current question, assume the labels are well ...
3
votes
1answer
753 views

Does DOM trading using broker data make any sense?

Can I use DOM information from Interactive Brokers? Does it make sense? I assume that it makes sense to apply some volume based algorithms only then when you know this order book, that you can get ...
2
votes
3answers
544 views

What are the unfair order execution/routing advantages HFT firms apparently have?

I originally thought that you have an orderbook per stock and orders would be filled on the time at which they arrive. Arrive first and you get the best price and the qty in the orderbook is reduced ...
2
votes
2answers
88 views

Does all (or any) exchange eats the positive difference between a buy order and a ask order?

Say Alice asks for 100 for 5 stocks, Rob asks 101 for 5 stocks. Bob really wants to buy the stocks, so he bids $101 for 10 stocks. Does Bob actually pays 100 * 5 + 101 * 5 + fee, or 101 * 10 + fee? ...
2
votes
2answers
483 views

Locked or Crossed Markets

I don't understand why Rule 610 from Reg NMS was introduced: what was the problem with locked markets? I have read that one of the issues is that it forced a market maker (say, from Nasdaq) who ...
2
votes
1answer
938 views

Real-time limit order book data of desired depth

Is it possible to get real-time NASDAQ limit order book data feed somewhere? I would need a stream of the limit order book data, preferably something similar to: Along with the respective events ...
2
votes
1answer
716 views

How is the Order priority of an Iceberg order decided?

Typically, markets guarantee a FIFO order of priority of execution for various orders at the same price. I want to know does this hold true for Iceberg orders? for eg Order1 = Buy 100 Quantities @ 2 ...
2
votes
1answer
392 views

Order book Limit Order book

I am trying to make a Limit Order book from an ITCH file using r. what is the basic difference between orderbook and limit orderbook? R has a package for orderbook I think
2
votes
1answer
117 views

Limits analysis

I have a few time series of models to analyse in terms of how far/close they are to their underlying limit. The limit is a simple value on the y-axis (always positive), and the series can act ...
2
votes
0answers
144 views

How to identify buy walls and sell walls from a limit orderbook?

I am trying to get notified of buy walls and sell walls from a limit orderbook and I had a couple of ideas and would appreciate some insight into these Take the mean quantity and anything above the ...
2
votes
1answer
84 views

How do orders outside of the market clearing level affect price?

Let's say a trader is trading in a LOB and he places an order deep in the book. How close can he be to the touch until he has temporary or even permanent price impact? This assumes he cancels after T ...
2
votes
0answers
94 views

What are good papers on order book dynamics?

I want to simulate a limit order book. For this I want a statistical model to model arrival of orders in the exchange. I would be thankful if anyone can point me in direction of relevant literature.