David Simic

2.1K posts

David Simic banner
David Simic

David Simic

@DrDavidSimic

Crypto market making & quant research | Recovering physicist, ex-Citadel | Building @botfedai

Katılım Mayıs 2024
398 Takip Edilen1.2K Takipçiler
Sabitlenmiş Tweet
David Simic
David Simic@DrDavidSimic·
If you are doing cross exchange arb or market making in a typical digital assets setting then your fair price will have to take into account price feeds originating from multiple geographic locations with different latency profiles. You'll be faced with figuring out how to define your fair price based on quotes that have different levels of staleness and liquidity, updating ever few milliseconds. For example, how do you weigh that Binance quote that is 5ms stale vs the Bybit and Coinbase quotes that are 10ms and 100ms stale? What about when Binance comes in late at 30ms and bybit comes in faster at 5ms? And just like in Einstein's theory of relativity, depending on where your observer is located you will have different answers for these questions. In Virginia the computed information shares will look radically different from those for an observer located in Tokyo even though they been extracted from, in principle, the same data feeds.
David Simic tweet mediaDavid Simic tweet media
English
5
6
120
11.6K
Merchant of DeFi
Merchant of DeFi@MerchantOfDeFi·
Top quality posts, nothing in CT compares to this guy
David Simic@DrDavidSimic

When doing market making or cross exchange arb in crypto we discussed some of the issues of computing fair price from multiple geo-distributed data feeds. Your quotes will arrive asynchronously from Binance, Bybit, Coinbase and so on, and each will be an indirect measure of fair price. For example, how do you weigh the Binance and Bybit quotes that came in 35ms and 75ms ago against that Coinbase quote that came in 15ms ago? What about when the ordering is reversed? Each exchange has a different level of liquidity, error, and basis, so even if the quotes were all equally fresh, there'd still be some decisions to be made. But latency adds an additional layer of complexity. One mental model for this is ruler theory. Imagine trying to combine the measurements of a bunch of different rulers, each with their own bias (μ) and error (σ), into one optimal measurement. Bias means a particular ruler is on average off from the truth by a consistent amount. Error means there is a random fluctuation by how much it is off from this average amount, sometimes a lot, sometimes a little, but usually within one stdev around the truth. In physics, the way to weight each measurement is via precision weighting where each ruler is weighted by its inverse variance: ~ 1/σ² A quote from a particular exchange is like a ruler measurement of fair price in that it too has its own bias and error. The dominant part of bias is easy to measure, it is just basis, and a good start is to compute a rolling mean. Error is a bit more complex. It will depend on liquidity, spread, volatility ... and time elapsed. BTC-USDT on Binance is expected to be a less errorful measurement of BTC than the same instrument on say, Kucoin. But BTC-USDT on Binance 1 second ago is expected to be more errorful than BTC-USDT on Kucoin 10ms ago. So there is an innate component to error and a time component. Total error squared will look something like this: error² ≈ ε²_exchange + σ_price²·τ where τ is the amount of time that has elapsed from when the quote was emitted to when you registered it, and ε²_exchange is the error unique to that instrument on that exchange (and at that particular point in time). For the time dependence, the assumption here is Gaussian diffusion, which is a defensible first order approximation when you are not near a significant liquidity event. So errors have a component that grows at a speed proportional to variance, creating a kind of uncertainty cone as they propagate forward in time. This tells you roughly how to weigh different quotes from different exchanges arriving at different times. Below are plots from two models built on this intuition. Both are measurably better than just using the Binance mid-quote, and in production, more robust against feed glitches on any single exchange. We'll discuss in more detail some concrete models that incorporate this intuition, and some that work surprisingly well while ignoring parts of it, in a subsequent post.

English
1
0
1
284
David Simic
David Simic@DrDavidSimic·
@FvckYourHedge Yeah it is. You can't really afford garbage collector farts here. Any boutique mm struggling with this should know that is to be expected.
English
0
0
5
851
David Simic
David Simic@DrDavidSimic·
When doing market making or cross exchange arb in crypto we discussed some of the issues of computing fair price from multiple geo-distributed data feeds. Your quotes will arrive asynchronously from Binance, Bybit, Coinbase and so on, and each will be an indirect measure of fair price. For example, how do you weigh the Binance and Bybit quotes that came in 35ms and 75ms ago against that Coinbase quote that came in 15ms ago? What about when the ordering is reversed? Each exchange has a different level of liquidity, error, and basis, so even if the quotes were all equally fresh, there'd still be some decisions to be made. But latency adds an additional layer of complexity. One mental model for this is ruler theory. Imagine trying to combine the measurements of a bunch of different rulers, each with their own bias (μ) and error (σ), into one optimal measurement. Bias means a particular ruler is on average off from the truth by a consistent amount. Error means there is a random fluctuation by how much it is off from this average amount, sometimes a lot, sometimes a little, but usually within one stdev around the truth. In physics, the way to weight each measurement is via precision weighting where each ruler is weighted by its inverse variance: ~ 1/σ² A quote from a particular exchange is like a ruler measurement of fair price in that it too has its own bias and error. The dominant part of bias is easy to measure, it is just basis, and a good start is to compute a rolling mean. Error is a bit more complex. It will depend on liquidity, spread, volatility ... and time elapsed. BTC-USDT on Binance is expected to be a less errorful measurement of BTC than the same instrument on say, Kucoin. But BTC-USDT on Binance 1 second ago is expected to be more errorful than BTC-USDT on Kucoin 10ms ago. So there is an innate component to error and a time component. Total error squared will look something like this: error² ≈ ε²_exchange + σ_price²·τ where τ is the amount of time that has elapsed from when the quote was emitted to when you registered it, and ε²_exchange is the error unique to that instrument on that exchange (and at that particular point in time). For the time dependence, the assumption here is Gaussian diffusion, which is a defensible first order approximation when you are not near a significant liquidity event. So errors have a component that grows at a speed proportional to variance, creating a kind of uncertainty cone as they propagate forward in time. This tells you roughly how to weigh different quotes from different exchanges arriving at different times. Below are plots from two models built on this intuition. Both are measurably better than just using the Binance mid-quote, and in production, more robust against feed glitches on any single exchange. We'll discuss in more detail some concrete models that incorporate this intuition, and some that work surprisingly well while ignoring parts of it, in a subsequent post.
David Simic tweet mediaDavid Simic tweet media
English
20
19
355
23.4K
Zaro
Zaro@Zero_Arb·
@DrDavidSimic This is advanced level stuff. Thanks for the summary 👌
English
1
0
2
928
David Simic
David Simic@DrDavidSimic·
@xlsmc25 You definitely want to test your system against such events to ensure reasonable behavior and if necessary augment the model in a reasonable way to handle them. Worth discussing in a future post.
English
0
0
1
489
David Simic
David Simic@DrDavidSimic·
@BotFedAI I'll discuss some concrete models in a followup.
English
1
0
1
624
Milk Road
Milk Road@MilkRoad·
Solana beat Ethereum in adjusted stablecoin transaction volume for the FIRST time ever in Feb 2026. "Adjusted" = no wash trading, no fake CEX volume. Real usage only. Bullish signal most people completely missed.
English
27
16
131
9.2K
David Simic
David Simic@DrDavidSimic·
@__paleologo Playing a negative EV game with a fat tail of upside can be worth it if the perceived alternative is being poor and miserable for ever. There is also the entertainment factor for some.
English
1
0
1
332
Sebastian Melchiade
Sebastian Melchiade@sebsmelchiade·
@DrDavidSimic Are you forecasting in-sample or out-of-sample? Because QLIKE vs MSE on log-var might not matter much if your underlying model is overfitted
English
1
0
1
168
David Simic
David Simic@DrDavidSimic·
Tired of being adversely selected? Previously we mentioned the multiple advantages to forecasting vol as a market maker or algo trader in crypto. But what are some sensible ways of forecasting vol? The first question I'd ask is, how do I even decide if I am doing a good job forecasting vol, or in more technical lingo, what loss function should I use? Obviously I need to compare realized vol to my forecasts, but how exactly? The first thing to note is that while variance has a heavily right-skewed distribution, and is never negative, log of variance has a roughly Gaussian distribution. See the graph below. So while MSE on var would be a lousy and poorly motivated loss function (MSE is derived from MLE assuming Gaussian), MSE on log var should work pretty well, and any fit using this loss function would be motivated by an application of Bayes theorem and MLE. Loss = (1/T)Σ (log σ²_t - log h_t)² where h_t is predicted vol and σ is realized vol. Can we do even better? Yes, a bit. Looking at the log variance distribution we notice that it has a significant skew and kurtosis. Any trader would know this intuitively. Volatility when it spikes, spikes in a massive way, interleaved with periods of unusually low vol and intermediate vol. The loss function that is best motivated in this case is QLike, and it turns out that you can show it is the optimal loss function to use with extremely relaxed assumptions on the underlying distributions: Loss = (1/T)Σ [σ²_t/h_t - log(σ²_t/h_t) - 1] And the beauty is we don't need to know which distribution it is. It could be a mixture of distributions (ie: corresponding to different regimes via a latent variable), for all we know (and as suggested by the plot in level space below). For our purposes though, as practical traders, the main thing to notice is that this loss function penalizes more when we underestimate vol (h smaller than σ) than when we overestimates (h larger than σ). This is good, as market makers we lose more when we underestimate vol (tighter quotes than optimal -> more adverse selection) than when we overestimate it (wider quotes than optimal -> no fills -> less adverse selection). In practice qlike vs mse might not be a game changer, given a good underlying model, however it is one of those optimizations to keep in mind. So now that we got that out of the way, which ways of modeling vol are good and which are bad? Stay tuned for the next post. 👇
David Simic tweet media
English
4
4
70
5.4K
David Simic
David Simic@DrDavidSimic·
@solncesinee Haha thanks for the feedback! Going to need to work on my seasoning.
English
1
0
1
307
Cessin
Cessin@solncesinee·
@DrDavidSimic bro the variance chart is cooked had to squint to see whats going on
English
1
0
2
354
David Simic
David Simic@DrDavidSimic·
Market makers, even for linear products such as crypto perps, are short gamma (and long "theta"). There is an odd but understandable misconception by some practitioners that this is not so, because "wait, aren't greeks an options thing?" The trick is to understand that while the underlying product is linear (say PERP on BTC) a market maker's payoff function is not. The limit order itself has a non-linear payoff which introduces short gamma exposure. While understanding this is not strictly necessary for being profitable, it's a neat insight that sheds light on what exactly you are doing when placing a quote, and what exactly needs to go right to NOT consistently lose money. Indeed, market making is a notable example of a probabilistic game where you will consistently lose money even with EVEN odds from the underlying (just try to market make on a random walk and you will see how your pnl curve is down and to the right with prob -> 1 as t -> infinity). One insight that you get from this, for example, is the importance of good vol estimates. If you are short gamma, then it is highly advantageous to have a good prediction for realized vol.
English
0
2
13
1K
David Simic
David Simic@DrDavidSimic·
@stalequant LMAO, yes at this point we can conclude they are totally unserious.
English
0
0
0
7
David Simic
David Simic@DrDavidSimic·
@stalequant If you are an angel and don’t get this I recommend reading secrets of sand hill road - spelled out pretty clearly there.
English
1
0
1
17
David Simic
David Simic@DrDavidSimic·
@andyyy There has been a marked decline in IPOs over the last decade, so anything that makes running a public company cheaper could be a good thing.
English
0
0
0
35
David Simic
David Simic@DrDavidSimic·
If you do market making or cross-exchange arb in crypto, better vol estimates are one of the easiest wins you're probably leaving on the table. Beyond using simple models like an EWMA of squared returns understanding that vol has a strong seasonality component is an easy win. The intraday vol of crypto has been pretty stable over the years including over different US presidencies. In the plots below you can see that BTC intra day vol spikes around US opening hours (roughly 13:00-15:00 UTC). This makes sense since much of crypto vol in recent years has been driven by different economic reports out of the US, plus it's the most liquid market in terms of public assets as a whole. There is a second smaller hump around Asia open (00:00-02:00 UTC), which also makes sense, given that Asia is the number two market after the US. We can also see that the intra day pattern is nearly identical under Biden in 2024 (blue) as with Trump during 2025 and 2026 (red). (Technical note: The estimates here were done using Garman-Klass on 5 minute OHLCV bars using BTC perp data from Binance).
David Simic tweet mediaDavid Simic tweet media
English
0
3
37
3.7K
David Simic
David Simic@DrDavidSimic·
If you backtest a a typical portfolio construction assuming Kelly you will generally find pretty bad results compared to other portfolio weighting techniques. This is in large part because it is highly sensitive to expected return, which is in general the hardest quantity to estimate, unlike in a gambling game.
English
0
0
4
330
mikkom
mikkom@mikkom·
Please don't use kelly for trading. It is not suitable. I see so many people posting about kelly this and kelly that related to trading. Kelly was originally designed for gambling. Gambling has fixed rules that typically favour the house but in some cases you can find an edge. Because the rules and the environment are fixed, the edge can be calculated. In trading you have volatility clustering and fat tails and everchanging environmental chaos from both external event, varying participants and market internals. Kelly assumes fixed and known constants. In trading NONE of these is true: - Environment is known and constant - Ratio of wins/losses is constant and known - Payout is constant and known You can get much better results via backtesting with decent sample size + monte carlo uncertainties. /rant
mikkom tweet mediamikkom tweet media
English
26
14
168
73.4K