A thread on all the components of latency, optimizations, & assumptions with modelling it.
...
This will primarily be for HFT, and focus on digital assets, but I will explain which parts are digital assets specific and which parts are not as much of it is generally applicable.
...
So what are the 3 "components" to our latency:
1. Our compute 2. The network 3. The matching engine
It’s the gains in performance you accumulate over time from tuning your strategy and improving it.
…
When it comes to non-HFT, accumulated improvement often leads to overfitting.
Continuing to tune the model once created often leads to decreases in performance other than simple re-fitting of the model on new data that has come out.
Let’s say a new trade has occurred on an exchange, if we have a latency edge we want to be one of the people incorporating it into price instead of one of the people reacting to price changes.
…
As we can see based on this below Pepe, a trade will cause an initial spike before a much slower levelling off.
Where it levels off to (relative to starting point) is going to be important to know as well as both the spike up and return points.
Fill probability analysis is primarily useful when optimizing maker/taker trades.
These are trades where the first leg we make into and then the rest of the legs are takers.
This is a limit order and then market orders the rest of the way (either limit IOC or market)
...
An example of this is triangular arbitrage, where we make into the first leg and then use taker orders to exit.
How can we estimate the probability of getting filled at any given level, and thus use this information to determine the optimal amount of spread to quote?
What is a mark? Well a mark is how we value something.
We can mark to model (our own subjective value of what something is worth), or mark to market (the current price), or mark to cost to close (market price with liquidity cost factored).
…
That’s mostly accounting systems though. Let’s talk about the relevant part for market making.