New answers tagged

0

Though there is no standard solution to your question, empirical studies have consistently shown that the market impact of a metaorder is a non-linear concave function of its size. The square root law of market impact is a quite simple and popular model for price impact estimation: $$ \Delta p = Y\sigma\sqrt{Q/V} $$ where: $\Delta p$ is the price impact, $Y$ ...


11

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 algorithmically ideal? They're not necessarily ideal. In fact, they're rarely used in production trading systems with low latency requirements. However, your source ...


0

“ and each Limit is also an entry in a map keyed off limitPrice.” You don’t spend O(log N) in the tree to find a price, that is a hash at worst. Might want to keep direct BBO links into the tree. Also this info is a bit dated, you probably really want cache-friendlier structures. Intrusive linked lists, flat maps etc.


2

There is a difference about understanding LOB dynamics and using an algorithmic solution to capture these dynamics. How LOB evolves. We understood now long ago (see Jeremy Large's papers) that a Markov chain on "pictures" of the LOB would be an interesting model. After few years of modeling LOB dynamics with Hawkes processes (see for instance ...


7

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 issue, and I'll focus more on the latter. The two objectives can diverge. For example, options and OTC data can exhibit trade to order ratios in excess of 1:10,000,...


2

This depends on the use case, but there are many options including: Convert full order log to top-of-book quotes and trades. This will probably eliminate 90% of ticks in the file. Convert full order log to trades. Even more compression. Take snapshots when you're present in the market, i.e. to measure and optimize your own trade execution quality Take ...


0

On nasdaq, their pegged orders do not operate inside the exchange matching engine as you would expect.. they have some undocumented method that does not gaurantee fifo order is conserved when the order stack moves from one level to another, the re-reinsertion is random at best and they are secrely letting other people jump the queue at worst. IEX does ...


Top 50 recent answers are included