yang

30 posts

yang banner
yang

yang

@hftgod

ex-cambridge HFT quant. probably better than you at math.

Katılım Ocak 2026
68 Takip Edilen1.1K Takipçiler
yang
yang@hftgod·
I’m getting more and more interested in prediction markets. This MM wallet is all over my feed: @k9Q2mX4L8A7ZP3R" target="_blank" rel="nofollow noopener">polymarket.com/@k9Q2mX4L8A7ZP…. On top of its impressive PnL (~$1.5mn on ~$175m volume since Dec ‘25 at time of writing) + high sharpe, it’s also farmed ~$75k of maker rebates. It’s a sophisticated strat which I don’t think is replicable with vibecode. I think there are a couple main ways to have edge here. 1) Better latency. Are you the fastest at picking up crypto moves from the leading venue and transmitting that to Polymarket’s AWS regions in EU-West-1/2? Part of this is literally just buying the fastest lines from providers and sending the data down those, but at this stage of the game, I’m pretty sure that’s not enough. I have to redact a lot of the specific techniques here because every firm might not be doing all of these (and we might be missing a couple too), but the sophisticated firms will have invested a lot of time and resources into optimizing the data feeds from various exchanges, which could happen anywhere from the main crypto exchanges in Asia to CME futures in Illinois, to get information about that tick first. 2) Better modeling. What if you don’t have the fastest line, but with the data you do have, you’re better at generating alpha? I think this is secondary to latency, but the general thesis is that retail traders are speculating on contract prices at some future point in time, but these contracts are basically digital options priced in greater size on Deribit (small put/call spreads divided by strike difference -> the derivative of this surface taking the limit), so piping that into your pricing model should generate a fair value for these bands which could be pretty dislocated from where it’s trading. The problem is the massive noise in backing out the implied 10 minute vol from a 1 day expiry option. I tried modeling this, but didn’t put it into production - blending in features from a model like HAR RV could work pretty well (this should weight the diurnal fluctuations more, so you can price things like the US open/close better). This prices the ATMs pretty well but underweights the wings - empirical return fits alone miss some combination of tail-insurance demand, spot/vol correlation, and vol-convexity premia. There could also be lower hanging fruit in trades which people aren’t really looking at - what if there’s a Kalshi <> Polymarket arb? (I sanity checked this too and after fees and liquidity on different Kalshi buckets, it’s not worth my time). This isn’t the area of quant research that I focus on, but for those interested, the HAR-RV is basically doing 3 things: 1) Looking at intraday realized variance. I pulled a week of 1-min closes and looked at log returns, aggregated this into 288 5-minute blocks of realized variance (which is just the sum of squares of returns in that block). 2) Intraday vol is basically a U-shape but can quantify this - average the realized variance (RV) for each 5 minute bucket across the 7 days, and normalize these averages so they average to 1. You can then smooth this U curve with something like a 3 point rolling kernel. If a bucket has a value of 4.5, it has 4.5x the average variance (e.g open). If it's 0.5, it’s a quiet APAC morning with less vol. We can then see what the deseasonalized variance is by dividing out this factor to get the deseasonalized block RVs (DRVs). 3) We can then aggregate these DRVs into daily and weekly averages and fit a linear model to predict the next day’s DRV. The coefficient of the daily term is intuitively saying “yesterday was volatile so today should be too” - vol is autocorrelated, and the coefficient of the weekly term is saying vol tends to mean revert. For my fit, this was -0.378 -> the weekly average is elevated but we expect reversion tomorrow. Putting these together, you can “deaggregate” this predicted DRV by dividing by 288 to get back the 5 minute variance, and sum the variances in the contract expiry window multiplied by the factors in 2). Annualizing this then gives a decent-ish forecast for the vol in that window. To caveat all of this, the modeling is all trying to forecast realized variance using a real-world (P measure) distribution, and then mapping this into a price, but this will differ from market prices because of risk premia/convexity, and we aren’t modeling using this risk neutral distribution (Q-measure), but I did adjust the model to fit closer to it. You can inject skew into this model too. If you took those 5 minute buckets and computed an empirical CDF, that would be an improvement, but over a week, there are ~2015 buckets, so at 3sigma that’s around 5, and around 0.13 at 4sigma, so way too noisy to fit to this. A student-t replacement for the normal would be better, where a degrees of freedom parameter is fitted from the data with an MLE estimator. Roughly, a kurtosis of 5 puts dof at 5.2, which is more fat tailed. The problem with this is that the tails are symmetric, which is not what we observe - downward moves tend to be sharper than upward. The market tends to be structurally net long on leverage with positive funding rates, so we see more liquidation cascades to the downside. Any bad news, like hacks, new regulation, macro tends to cause instant sharper reactions, whereas good news like more adoption, ETF approvals etc. tend to play out more slowly. The downside also tends to be structurally less liquid than the upside - more people sell into strength when the market gaps up. This is all part of the risk neutral measure world we need to add adjustments for. Using something like Hansen’s skew-t can improve the fit to return asymmetry, but it still won’t fully capture the dynamic surface effects that drive listed skew in practice.
English
7
6
109
14.6K
yang
yang@hftgod·
But yeah, we can look at higher level sanity checks for this too. There isn’t a major open interest change before and after - only 20k ETH ($40M notional). Usually the open interest would typically drop if someone was hunting liquidations - this is more consistent with a single participant trading in and out of the position. This can happen if you misconfigure something like risks and the valuation. For ex, a contract multiplier is off, so the algo thinks it can buy ETH worth 20k at 2k and fires bids deep into the book. Once it's traded, the algo could get a balance update, and think that it's beyond its limit, so it aggressively flattens the position. If there is no cooldown timer or stop loss or other safety, it could still see edge to the valuation and immediately re-fire, creating this loop. If you're running an algo like this systematically, there needs to be multiple levels of checks for this kind of thing. I've had similar things happen to me, but smaller losses which we were able to just post-mortem and prevent happening again.
yang tweet media
English
0
0
8
816
yang
yang@hftgod·
I came to a similar conclusion to yenwod regarding the ~$80m loss on Bybit perps. Looking at Binance perps, the volume traded over these 20 minutes was ~$7B notional. This is 37% of the volume traded over the whole 24 hour UTC day on this venue - disproportionately high for a 20 minute window. If we look at just the realized pnl of these trades, roughly $3.5b traded pretty evenly on bid and ask for a realized loss of ~$15.5m. This is pretty limited in that we’re only looking at the taking markouts for the whole book and we can’t attribute this to the trader, but it’s reasonable to assume the aggressor took the hit for most of it. It also brings us closer to yenwod's $100m loss estimate, and we haven't even looked at okx or the spot books yet! (exercise for the reader)
yang tweet media
English
1
0
7
1K
yang
yang@hftgod·
Really good post by yenwod on the bizarre wicks we saw in the 1 minute charts on ETH last weekend. I'm still seeing most of CT point the finger at Binance, Wintermute, leverage, but it’s most likely unintentional - an algo trading firm losing 10s of millions in a Knight Capital-esque event. In most traders' first week on the job, they are warned that a deployment error cost KCG over $400mn on a similar time horizon. It’s possible to do something like this and run a profitable (though market manipulating/illegal) strategy if you stand to make money on another leg of the trade. The mango markets manipulation comes to mind here, or the Polymarket candle betting market, or even the Jane Street Indian options trade, where this data could be used as an oracle for a more liquid market. This is very unlikely on an asset as liquid as ETH though.
yenwod@yenwod_

across the whole time period, takers on bybit realized $85m of losses assuming VIP fees. 100m estimate wasn't too far off!

English
2
0
27
5.3K
yang
yang@hftgod·
0. Let’s do one last recruiting story before we cool off and do more trading stuff. This is the story of how I started shifting from TradFi to Crypto. A 🧵:
yang tweet media
English
5
5
137
19.2K
yang
yang@hftgod·
12. Caroline pinged the next day and said they wanted someone more experienced. I wasn’t too phased by this - I wasn’t keen on the lifestyle they were living, and was in the process with other firms that I thought were a better cultural fit. More specifically, I found out the couple years experience I had at the time wasn’t enough - they wanted someone with ~6, and crypto experience, so he wouldn’t take long to train. This checks out - hiring is expensive in terms of employee time needed, and they optimized for that hard. I did indeed stay in trading (moving to crypto HFT), but didn’t manage to touch base with them again.
yang tweet mediayang tweet media
English
0
0
17
2.5K
yang
yang@hftgod·
11. I found it really hard to reconcile the luxury with which they lived and worked with the Effective Altruism they espoused. They’d travel in private jets, stay in multimillion dollar penthouses, go to fancy dinners, but eat vegan food, and drive toyota corollas. Their explanation when I asked was that if this led to a 10% increase in productivity, the expenses paid for themselves. I could buy that, but I still got strange vibes; it was like being locked in a golden cage. The Bahamas were beautiful, but living here long term felt unsustainable.
yang tweet mediayang tweet media
English
1
0
9
3K
yang
yang@hftgod·
That's a great question. I might do a longer post on this at some point but having been on both sides of this table, the grads we were most likely to give returning offers to were just the ones who: - paid close attention, listened to what was taught with interest and enthusiasm - showed up every day and worked hard - completed the projects that were assigned to them to a high standard - didn't put their fellow interns down - just focused on themselves Keep your ego low, and be generally likeable. I used to tell people to spend time on Python/data science basics, core finance fundamentals (e.g. for options firms, a few chapters of Natenburg), and staying up to date with markets. With recent AI advances, I think there’s less need to obsess over pure coding, though knowing the basics is still important.
English
1
0
7
510
ziggy
ziggy@onchainziggy·
@hftgod suppose you were interning in a competitive prop firm (such as optiver). any prep you'd do to bag the return offer?
English
1
0
2
1.8K
yang
yang@hftgod·
One of the most brutal and memorable recruiting experiences I had was with Optiver. Unlike most other trading firms, they were radically open and transparent about the application process and the salary. They also did their recruiting onsite at Cambridge, which was rare. One of their partners gave a presentation where he outlined how the culture punished mediocrity. They were taking 10 grads, but only 1 or 2 would make it into the second year. He also said the starting salary was €120k - since then, it’s gone up a lot in line with the rest of the market, but it was huge to the starry-eyed, budget-conscious uni kids he was chatting to, without many reference points on other companies’ salaries. He explained their marbles compensation system - everyone would be allocated a certain number of marbles depending on their job (trader, quant, software dev etc.), and what level of experience they were. A portion of the PnL would then be allocated to these marbles, and you would have a multiplier on top of this for individual performance. It reduced the variance of what you would get, and exposed you to the upside of the firm, so it incentivizes collaboration. This model has been adopted by companies like Wintermute and Maven. This is a system I personally am not a fan of - I feel like it can cap your upside unlike discretionary bonuses. After his talk, we could sign up to take their infamous multiple choice arithmetic test. The test was done at Cambridge too. We were all in the same room, and the HR handed them out and started the 8 minute countdown. None of the questions were hard, but it was tricky to finish in the given time if you hadn’t practiced much. At the end, she collected the tests, and let us chat between ourselves for a few minutes while they were marked. When she was done, she announced that the cut off mark for this test was 55/80. In Optiverian fashion, she then started reading out our test scores: “Matthew 43, Kevin 57, Jason 65, John 28…”. At the end, she asked the people who didn’t make the cut to leave. As they awkwardly sidled out of the room, she gave out the second test to those of us who passed. Out of the 30 or so people who showed up, around 15-20 of us were still left. The second test was also maths and if we made the cut for the interview round, we’d get an email. The email came scheduling a phone screening with HR. This was the strangest cultural fit call I’ve done. It only lasted a few minutes. She asked me to name an award they had won (they had a list on their website), a few facts about Optiver, and whether I’d be willing to move to Amsterdam. She then gave me travel details for the London round. The London round was pretty interesting too - it was with one of their traders. Like Jane Street, they also asked estimation questions, e.g. “make a market on the number of petrol stations in the UK.” He gave a time limit of 30 seconds and counted down from 10 out loud to add pressure. He also asked other probability questions - standard ones, like Bayes’ theorem and an infinite series. The round after this was their final invite to their Amsterdam office, but I got an exploding offer from the firm I ended up going with so I didn’t fly down. I regret not doing this for the optionality, but with the looming deadlines of problem sets, it didn’t seem worth it at the time. The past few years, as the company really took off, I’ve heard insane numbers for what their marbles have been worth. Not sure I made the right call with that one…
yang tweet media
English
10
18
646
72.1K
yang
yang@hftgod·
@anistotle_ Their stroopwafels are their only redeeming quality
English
0
0
3
626
Ani
Ani@anistotle_·
@hftgod Your sanity in not working with the Dutch is priceless
English
1
0
4
1.8K