My last book is a collection of all the articles I've been writing in the past year.
Rearranged for easy reading.
All printed in a book and in one place.
Stays next to my desktop for reference.
(online articles remain fully for free, so having this book is not necessary for reading them)
The book:
The Electronic Trading Stack: Collected Field Notes on Architecture, Latency, and Execution Quality in High-Frequency and Institutional Trading
Find it on Amazon now!!
Before you rewrite a C# FIX decoder in C++, look at one loop.
From my book: "Almost all of the gap lives in one loop, the CheckSum byte sum". "The byte-sum loop is 88% of the gap against MSVC 14.44 and 80% against 14.51."
"MSVC auto-vectorizes the CheckSum byte sum. RyuJIT does not, because .NET has no auto-vectorizer and the JIT team said so in 2020."
The JIT team on auto-vectorization, that year: "it is unlikely to happen in the near or even mid-term future".
Time your C# and C++ decoders with checksum validation off.
More in chapter 51 of my book, The Electronic Trading Stack.
Is your venue's limit a count per window or a rate per second?
From my book: "It gets written into a config file early, usually by whoever last read a venue manual, and it stops being questioned."
On CME's unlabelled order threshold: "Read 500 as a count and the session sustains roughly 167 messages per second. Read it as a rate and the same session sustains 500, which is 1,500 messages across the same window."
Which reading did your config take, and who checked?
More in chapter 24 of my book, The Electronic Trading Stack.
Your breaker can fire on time and you can still lose money.
The SNB, 15 January 2015: "The Swiss National Bank (SNB) is discontinuing the minimum exchange rate of CHF 1.20 per euro. At the same time, it is lowering the interest rate on sight deposit account balances that exceed a given exemption threshold by 0.5 percentage points, to -0.75%."
From my book: "A circuit breaker governs what you quote going forward. It does not govern what you already own."
If your breaker was tested without your position limits, test them together.
More in chapter 28 of my book, The Electronic Trading Stack.
Where are you in the queue on a crypto venue?
Moallemi and Yuan, on Bank of America: "the value difference between an order placed at the very front of the queue and an order placed in a queue length of average was about 0.26 ticks on 8/9/2013 and 0.21 ticks on 8/20/2013, which is comparable to the bid-ask spread."
Coinbase: "The full channel provides real-time updates on orders and trades." From my book: "most crypto exchanges don't provide L3" is accurate, but "none do" is not.
Which of your venues sends an order ID?
More in chapter 22 of my book, The Electronic Trading Stack.
The second high was higher, yet CVD there was 49K shares lower than at the first.
On AMZN, between the two highs, 105K shares hit the bid and 56K lifted the offer. In VisualHFT Terminal, CVD (Cumulative Volume Delta) goes negative; price shows only the higher high.
#visualhft
Your total volume may earn a tier no single venue gives you.
From my book: "The fund is paying retail-adjacent fees on institutional volume because the volume is diluted across venues that each calculate tiers independently."
Binance: "VIP 2 ≥ 5,000,000 USD and ≥ 25 BNB 0.080% / 0.100%". "VIP 3 ≥ 20,000,000 USD and ≥ 100 BNB 0.040% / 0.060%".
"The fee-tier leak is invisible in most fund reporting because dashboards track total fees paid, not fee-tier delta."
Make each venue's distance to its next tier a line on your fee report.
More in chapter 5 of my book, The Electronic Trading Stack.
Paper published
Order Book Imbalance and the Direction of the Next Mid-Price Change: Evidence from Nasdaq TotalView-ITCH
This has been published with NASDAQ market data, but applies to most of the markets (market agnostic)
#nasdaq#research#marketdata
A sudden step in your cross-venue latency may be the venue's clock moving.
"customers have depended on the Amazon Time Sync Service to provide one millisecond clock accuracy".
AWS, on its older clock. Its newer one is "designed to deliver clock accuracy in the low double-digit microsecond range".
Once your own clock is tighter than that, alarm on any step in measured offset above the normal one-way jitter on that path.
More in chapter 11 of my book, The Electronic Trading Stack.
The free @CMEGroup trading sim page may be interesting to people wanting to tap into futures trading.
I usually don't recommend sim trading, but this offers tools and an environment that teaches more than just buying and selling (incl. real options chains & L2 data, risk tools).
Your trading system's primary venue goes down at 3 AM on Sunday.
My book asks: "how long until orders route to secondary venues?"
If it is "when the on-call engineer acknowledges the alert," your architecture is operator-dependent. If it is "the next order automatically routes to the secondary venue," it is deterministic.
"A system designed for 99.5% uptime was acceptable when markets closed. That uptime target allows 43.8 hours of annual downtime".
More in chapter 3 of my book, The Electronic Trading Stack.
The same reject message can mean slow down or stop.
Euronext, on throttling: "In FIX, clients receive Reject (3) messages". Breach the limit badly and you "won't be allowed to reconnect for 3 seconds".
The FIX 4.2 dictionary says a Reject "indicates a serious error that may be the result of faulty logic in either the sending or receiving application".
Coinbase Exchange: "Your FIX 5 session is disconnected if your messages exceed 200 messages per second".
Send your handler a Reject (3) with tag 373=26. Does it back off or stop?
More in chapter 24 of my book, The Electronic Trading Stack.
Databento reports OPRA's 99th percentile falling from 543.5 to 57.5 microseconds.
On the same page, Databento says "the OPRA SIP's median latency has been mostly unchanged around 19.5 to 20.5 microseconds".
The median stayed near 20 microseconds while the 99th percentile fell by about 89 percent. Does your report show it?
From my book, on desks I have seen: "that blind spot runs low single-digit basis points on burst days".
More in chapter 41 of my book, The Electronic Trading Stack.
Exchange feed drops one packet: the venue fix is discarding your order book, pulling a 5,000-level snapshot, and buffering deltas.
Takes 80ms to >1s. Quoting through is fail-open.
The buffer timeout that survives volatility without thrashing is the number worth comparing.
#hft