# Tag Info

15

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 ...

9

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 some options firms this might be called a "tachyon" in reference to its virtual faster-than-light property. Others simply call it a "private fill (...

9

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 in From the viewpoint of exchanges Optimal fee schedules to "attract" liquidity (and hence efficient market makers), have a look at Optimal make-take ...

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,...

6

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 obligated to show its side. This design dates back to times when you had to trade over the phone, where you would typically ask for a two-sided quote so your ...

5

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 specified in the paper: $$dS_u = \sigma dW_u,$$ with initial value $S_t = s$. To get the solution to the above SDE, we can integrate from $t$ to $T$ on both ...

4

Is GBM still viable for modeling asset prices in a very short time period ? I assume by asset price you mean the mid-price of the asset. Ito diffusions are unable to capture stylized facts of market microstructure: in particular, you can't get volatility clustering, negligible autocorrelation in return series, the signature plots or the Epps effect. We can ...

4

If you use a retail platform, they do not make markets. For example, CMC markets gets the FX rate from liquidity providers like Deutsche Bank, JP Morgan, Barclays, Goldman, UBS, Citibank and HSBC. You should find a similar logic with others. If you setup a limit order it will simply sit there and get filled on your behalf (aims to fill at the best available ...

3

What you are doing is the best you can do with that data. But bear in mind that you will see executions in the middle often from many sources and you won't have the data to tease that out. If you can get a direct feed then the exchanges will show you execatly who initiated when they can. (Many orders are hidden so you can't see it). Also, make sure you ...

3

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 ...

3

They are different trends of research agent based models, and you are right: Michael is a pioneer point process based models, and I would say that Frederic's book is a reference: Limit Order Books. propagator initiated models, here Jean-Philippe's work, and his recent book, is what has to be read: Trades, Quotes and Prices. Markov-chain based models, ...

2

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) things as fast as possible, and the list to walk along the neighbours to join gaps (such as when filling trades that spam many orders). Even with big books in ...

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 ...

2

I've worked in this industry for a while and have run ETF market making for quite a few years. It's very difficult to perfectly lock in profit as you detailed above. With fast equipment it can be done sometimes. But most of the time you really are just hedging to model - and there is risk in that case. For example, you might sell ETF X and then hedge ...

1

To add some colour to the FX market structure: FX used to be a clear two tier market, the closest analogy I can think of is a hub and spoke system with customers interacting with dealers via a quote type mechanism and dealers interacting with each other in a more central limit order book fashion with that order book either maintained by a network of ...

1

I answer my own question. A starting point would be : the summer school on mean field games, provided by the University of Chicago. summer school

1

Today 99% of these orders are executed by algos. All of the main brokers offer a suite of these tools to their trader. Here's an example of one such strategy offered by CS: https://plus.credit-suisse.com/r/V7oShS2AN-ZQ55.html The modern market trades in 100 (or fewer) share increments. There's no practical way that a trader could manually work a large ...

1

I will attempt to elaborate on this from risk management perspective. scenario analysis approach: An example of this is stress testing that Fed mandates for investment banks. Fed gives stress variables to various fundamental macro variables. For example, a certain market stress scenario will be rates down 100bps, volatility up 30%, curve flatter by 30bps, ...

1

I guess I could give you a far from complete, but good start of researchers who've tried using ML/CS in LOB modeling: Alvaro Cartea, Marcos Lopez de Prado, Sebastian Jaimungal, Dieter Hendricks, Brian Ning, Jean-Philippe Bouchaud (mean-field games, not ML), Rama Cont (used to only do math modeling, but recently tried deep learning for price formation), etc.

1

You can also utilize two red black trees. Bids would be stored in descending order in one tree. Asks would be stored in ascending order in the other. The best bid and ask would always be the first node of their respective trees. Your inserts and deletes would be in O(log n) time.

1

I think it depens on the inner workings of the preferred language in the first place. I suppose many order books are nowadays written in JS. So after considering many data structures like priority queues etc i think the best turns out to be a simple array and you don't even have to implement binary searches whatsoever. My idea is to use a sparse array with a ...

Only top voted, non community-wiki answers of a minimum length are eligible