# Tag Info

### What is an efficient data structure to model order book?

The specifics depend on if you're implementing for equities (order-based) or futures (level-based). I recommend https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-...
Accepted

### Red Black Trees for Limit Order Book

Why do people suggest using red black trees/balanced binary trees for the levels in a limit order book? Because people are unoriginal and keep referencing the same blog post. Why are they ...
• 1,616

### What is an efficient data structure to model order book?

I recently stumbled upon this question after needing to do this to do some real-time microstructure analysis and have taken a look at the various possible implementations. Here are some of the pros/...

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

As Alex C. notes, OHLC bars are meant to be calculated using transaction ticks. However, you could try to make bars from bid/ask individually (or perhaps even the mean of the two as an approximation), ...
• 223
Accepted

### Modelling queue position

No, you have to build your model empirically with data. Suppose $p(x)$ denotes the probability of cancel in front of you when your order is positioned $0 \leq x \leq 1$ through the queue, there are a ...
• 1,616
Accepted

### Order Book Dynamics

The Queue Reactive Model (by Huang, L and Rosenbaum) is an improvement of what Cont and de Larrard (CL) did. This model is capturing the inflows and outflows in each queue given the current state of ...
• 10.5k

### What is an efficient data structure to model order book?

I do not know in which context you want to implement a matching engine (ME). But according to me the two nice challenges in this context are: implement one in an FPGA for simulation / fast replay ...
• 10.5k
Accepted

• 1,349
Accepted

### Model reference price of Limit order book

This reference price is also sometimes called intrinsic price. One of the simplest ways to improve it in regards to the mid-price (assuming you have the depth data) is the following: define a ...
• 952
Accepted

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

(First of all, sorry to have taken so much time to see this question...) For the paper you refer to (Guéant-L-Tapia), there is a report (in French) by Sophie Laruelle about how to do it in practice: ...
• 10.5k
Accepted

### Limit order book - does it get wiped over night?

Orders stay in order book for as long as you specify, e.g. "good till cancelled" (GTC) will be sitting there until it's executed or you cancel it. There are many types, just google them - IOC, FOK, ...
• 725

### Limit order book cancellations

This is somewhat of an opinion based response with some factual anecdotes at the end. Spoofing is a very difficult concept to define, identify and prove. In voice brokered markets where transactions ...
• 7,997

Some exchanges have agreements with market makers to provide liquidity (the market makers often get some kind of preferential treatment in return). Often these agreements will include obligations to ...
• 150
Accepted

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

This differs from exchange to exchange but in Toronto (TSX) the rule is that the unfilled amount becomes a limit order at the last sale price. ...
• 1,349
Accepted

### Order Execution Algorithms

Most of the big players offer a suite of execution algorithms for big orders, as seen in this listing from Credit Suisse. Very generally speaking, the algorithms will have a pedigree going back to ...
• 14.4k

### Order Execution Algorithms

To slice up an order you can use several execution strategies. TWAP which will execute small slices of your order over a time period VWAP which will spread your order over time and try to minimize ...
• 1,349
Accepted

### how are gaps usually handled in market data received with multicast?

You are usually given an option to either - Request a re-transmission of the messages you missed (through a different channel). Request a snapshot of the current book from a dedicated server. Both ...
• 758

### Estimate probability of limit order execution over a large time frame

One way to do this is a simple Monte-Carlo simulation. There are formulae you can use to get the likelihood of a stock being below a price if you know the stock's volatility and time frame - see for ...
• 371

### Identify Iceberg Orders

Liquidity seeking is difficult to test empirically since price only data tells us nothing about the how transactions related to the level 1 (NBBO) order book, let alone the depth of the order book. ...
• 2,825