53
votes
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-...
24
votes
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 ...
19
votes
Accepted
Backtesting Market Making Strategy or Microstructure Strategy
This is a very difficult question.
First of all you should read Almgren's slides on the topic: Using a Simulator to Develop Execution Algorithms.
First you need to backtest your strategy against a "...
18
votes
Accepted
What are modern algorithms for trade classification?
There are a few approaches to use trade prices and quotes to classify the aggressor as "buy" or "sell." Also, many of these methods have historically had to deal with ...
17
votes
Market impact, why square root?
I found this power point and this paper to be an excellent source on this topic.
Here is a quote from the paper:
A square-root singularity for small traded volumes is highly
non-trivial, and ...
12
votes
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/...
11
votes
Accepted
How do better informed traders apply their advantage over the others?
Example from recent memory.
Right before New York open, Bloomberg posts an article saying country R's local news reported that R's government auditor said that country V has defaulted to R's loans to ...
10
votes
Accepted
What are some currently open problems in market microstructure
They are a lot of open problems in market microstructure. To have an idea of the whole landscape, have a look at Market Microstructure in Practice, 2nd Edition, by L and Laruelle.
I would split them ...
10
votes
Accepted
Using market microstructure and exchange-specific knowledge to design trading strategies
I'll give examples of each: market microstructure, exchange protocols and connectivity.
Private fills
Probably the most well-known in the public domain is the idea of a "canary order". In ...
8
votes
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 ...
8
votes
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:
...
8
votes
How to identify market makers in an orderbook?
You could also look at how each price level is made up.
For example how is the 18 lot on the bid price 0.0995 collated. Is it a 5 lots, 5 lots, 7 lots and 1 lot. You can do this on certain exchanges ...
8
votes
Accepted
Backtesting using microstructure (orderbook) data
Since order book granularity backtesting is challenging, as you've pointed out, I recommend first deciding your business requirements:
Can you rely on a third party execution desk? I do not recommend ...
7
votes
Accepted
How can we estimate new stock price after a large purchase?
There are a number of price impact models which seek to predict the bias induced on prices by trading. There are also issues with some of these models (which I will mention later).
Models
Probably the ...
7
votes
Accepted
What are the proper ways to do order book downsampling?
Two chief reasons for subsampling or using a different event space are (i) computational or spatial tractability and (ii) denoising/signal extraction.
Sergei's response seems to focus on the first ...
7
votes
Stochastic equation in "High Frequency Trading in LoB, Sasha Stoikov and Marco Avellaneda"
First part of your question:
The solution comes from solving the SDE specified in the paper and then using the moment generating function of a normal random variable.
Formally, let us define the SDE ...
6
votes
Order book size limit
I am not aware on any rules preventing a too high number of entries at a limit price. Nevertheless you usually have controls for each trader id. A trader cannot have too many orders in the book or ...
6
votes
What is an efficient data structure to model order book?
Curious how nobody in 9 years has provided an optimal answer yet?
You need a B-Tree that has been extended with a double-linked list on each node.
The B-Tree to find (or not find if they're missing) ...
6
votes
Accepted
What are flickering orders?
A "flickering" order is one which is repeatedly submitted and cancelled (whether it's at the top of book or not).
The answer from @chollida mentions that "the goal typically is to either slow down ...
6
votes
Accepted
Reference request: Quantitative approaches to market abuse detection
I can't help as much with public literature, but I did see a talk with a member of the FINRA data science team responsible for exactly this (event link below - perhaps you can track down the speaker).
...
6
votes
Market impact, why square root?
My understanding (devoid of any mathematical grounding) is as follows.
v = Turnover PER UNIT TIME
n = Shares you need to execute
therefore
...
6
votes
How can we estimate new stock price after a large purchase?
Let me try to answer: I have seen how equity trades are executed at the order book level. Let's say the price of the stock is 100 (last traded price). Let's say the order book is as follows:
Bids: ...
6
votes
Accepted
What does a electronic dealer track in a RFQ market?
Customers dont place limit orders or do they?
No, they don't. In an electronic RFQ market, the requesting participant (presumably the "customer" you are referring to) is generally not ...
6
votes
Do MarketOnClose orders cross a bid-ask spread?
A simpler way to debunk these studies without having actual trade and quote data at the exchange level is to just take into account transaction costs, IBKR's half a penny per share is a good starting ...
5
votes
What is an efficient data structure to model order book?
Why not just implement it with two price-amount maps, as shown here?
5
votes
What is Toxic FX Flow debate?
The primary way ECNs determine if a liquidity taker's flow is 'toxic' or not is by looking at aftermath charts. The aftermath chart shows the average mark-to-market profit of trades done by the ...
5
votes
Accepted
HFT market-making in dark pools?
Yes, it is. There is plenty of information about it online. E.g. here's a related very recent article: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2874957, here's a link to a discussion on ...
5
votes
Accepted
Economics of spoofing
Layering is a spoofing of buy(sell) orders sometimes complemented by higher(lower) sell(buy) orders that push the market up(down). Execution of a limit order above(below) would not be a concern, as ...
5
votes
Accepted
What makes open-outcry preferable to electronic trading and what are its consequences?
The better price will come from two live traders (one on each side of the trade) willing to take a smaller percentage commission for a large block trade. For example, if a trader's average commission ...
5
votes
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.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
market-microstructure × 262market-making × 61
high-frequency × 60
limit-order-book × 50
market-data × 32
equities × 29
algorithmic-trading × 25
trading × 22
quant-trading-strategies × 13
exchange × 13
order-execution × 13
spread × 11
market-impact × 11
volatility × 10
liquidity × 10
options × 9
research × 9
tick-data × 9
time-series × 8
fx × 7
data × 7
financial-markets × 7
market-model × 7
orderbook × 7
finance-mathematics × 6