a few more good HFT tricks for you to try out
again. not rocket science. just there to nudge you in the right direction.
01/ multiple feeds
subscribe to multiple feeds, from different places, with different IPs, multiple times.
and deduplicate the output.
you never know why one feed or the other can be faster in different conditions.
benchmarking when the market is calm has nothing to do with high vol times.
even the worst median can be the best p99.
yes ultimately you want a private fiber w/
@Avelacom_Corp but until then just compound the feeds you have and make the best usage of em. can already get you pretty far.
02/ always a/b test
keep a low risk engine running on the side that serves as a reference for your optimizations.
first, well you can still catch some liquidations but more importantly bugs early on and actually see your improvements.
more volume, more activity = more messages going through your system, you need to be able to spot where is the bottleneck at all times.
03/ stale data is worse than no data
you have to know your data feeds, their edge cases, especially when pricing fair value using multiple sources and layers.
each layer should have its own thresholds and protections, an oracle feed you're using for a basis or a weekend mid price should not be treated equally.
i see people want more HFT tricks so here we go
probably most of you doing any serious hft know these simple ones but I think it's always good to see what hft optimizations actually looks like
01/ every action is sent over 3 ws channels at once
why?
just benchmark it, you will see by yourself
its not a global rule, every exchange has its own internal system and logic. TCP networks are inherently random, by multiplying the load you get rid of the tail
not enough IPs ? you can always have more IPs, it's absolutely never a bottleneck
02/ think about shards
exchanges have to shard their backend, not everyone will use the same sharding keys tho, again you have to benchmark it (be careful not to introduce biases there)
some subaccounts could have lower latency, some markets, some api keys or a mix of everything
you have to be creative and understand how the underlying system you're interacting with is shaped, there is no magic rule, there will be nothing online
03/ watch what other traders are doing, hyperliquid is public so use this, analyse patterns, find alpha, its out there, waiting for you
04/ oh great so agents can do it
well, I wish but from personal experience they do lack that creativity, you can easily benchmark previous exchanges' tricks on new ones you're integrating and use them to reverse-engineer/understand better the underlying api/elb/matching engine