The Quant Cookbook
Practical recipes for building trading systems — distilled from first principles and production experience. These are the engineering principles behind the systems we trade on and the infrastructure we build.
Intro
HFT Optimizations
Memory management
Virtual and physical address space, pages, the TLB, and when huge pages help or thrash.
Context Switching
Why the OS switches, scheduler defaults vs HFT, core pinning, kernel bypass.
Lock-free data structures
Lock costs, lock-free progress, ring buffers, single-writer.
Pre-allocation & Pre-fetching
The memory hierarchy, instruction pre-fetch, locality and cache-line size.
Caching
Cache hierarchy, line size, associativity, hit latency vs conflict misses.
Function templates
Compile-time work, inlining, branchless code, CRTP over virtuals.