The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

Master high-frequency trading infrastructure. This comprehensive 5-volume architectural suite teaches you to design deterministic matching engines, zero-copy feed handlers, lock-free risk gates, and bare-metal FPGA acceleration layers in modern C++.
Bought separately
$318.96
Minimum price
$129
$199
About the Bundle
The Definitive, Production-Ready Blueprint for Nanosecond-Scale Electronic Trading Infrastructure
In the hyper-competitive world of High-Frequency Trading (HFT) and ultra-low latency infrastructure, traditional software abstractions collapse. Squeezing maximum throughput out of modern hardware pipelines requires a brutal engineering focus on cache alignment, lock-free concurrency, kernel bypass, and hardware-software co-design.
Written under the professional direction of systems performance engineer Weston Ashgrove, this comprehensive 5-volume architectural suite bridges the massive gap between academic C++ syntax and battle-tested, production-grade electronic trading fabrics.
What is Included inside This Flagship Suite:
1. Deterministic Matching Engines in C++23/26: Master the mechanical execution loops of high-throughput order books, price-time priority structures, and zero-allocation memory arrays.
2. Bare-Metal Market Data Engines in C++: Engineer zero-copy feed handlers, streaming zero-allocation parsers, and low-jitter message-passing ring buffers.
3. Bare-Metal FPGA Acceleration for C++ Trading Systems: Unlock extreme hardware acceleration. Master PCIe DMA transfers, register-level communication, and clock-domain execution synchronization loops to offload critical paths completely.
4. Deterministic Risk Engines in C++: Build non-blocking pre-trade risk gates, high-speed position-tracking networks, and streaming lock-free Value at Risk (VaR) computation layers.
5. Ultra-Low-Latency C++ Trading Systems: The grand integration master blueprint. Learn how to map core components cleanly into CPU cache lines, enforce thread affinity, and manage end-to-end tail latency under extreme market volatility.
Core Engineering Methodologies You Will Master:
• Kernel Bypass Ingestion: Utilizing DPDK and Solarflare architectures to pass network packets directly to processing threads, bypassing operating system overhead entirely.
• Lock-Free Concurrency: Eliminating traditional thread contention, mutexes, and context switches using advanced ring buffers and atomic operations.
• Hardware Optimization: Maximizing L1, L2, and L3 cache locality, enforcing cache line alignment, preventing false sharing, and optimizing Translation Lookaside Buffers (TLB).
• Deterministic Execution: Eliminating runtime jitter caused by standard heap allocations by building specialized custom memory allocators.
Who This Suite is Engineered For:
This collection is built specifically for Senior Systems Engineers, Quantitative Developers, Financial Infrastructure Architects, and Technical Managers looking to train engineering desks on production-ready low-latency design patterns.
Skip the theoretical abstractions. Equip your development team with the exact architectural engineering frameworks required to out-compete the global market.
About the Books
Stop treating a matching engine's correctness as something a demo can prove. Learn to build lock-free order books, cache-line aligned price-time priority, and zero-jitter trade execution, guided by a verification discipline that takes the system from a passing test suite to a build you can prove holds under real concurrency, real load, and a real crash.
Key Features
perf c2c measurements, zero-allocation memory pools, and full OS-level jitter eliminationBook Description
A matching engine that never crashes in testing is not a matching engine that behaves correctly under real order flow, and the gap between those two claims is not a corner case, it is where production trading systems actually fail. This book treats that gap as the engineering problem it actually is, starting with the honest question of what "deterministic" precisely guarantees and what it does not, before a single line of optimization code gets written.
From there it covers the full stack in order: order book data structures benchmarked under real volume, order types and matching semantics including icebergs, stop-cascades, and amendment priority rules, and price-time priority as a fairness guarantee that individually correct features can still violate the moment they interact, illustrated by a full regulatory-inquiry case study. The engineering chapters that follow eliminate non-determinism at its source, lock-free compare-and-swap design, the ABA problem and hazard pointers, cache-line alignment measured rather than assumed, zero-allocation hot paths backed by pooled memory, and the nine sources of OS and scheduler jitter most engineers building their first low-latency system never think to check.
The final part closes the loop: measuring tail latency honestly with HDR histograms and realistic burst-load generation instead of misleading averages, proving correctness with libFuzzer-driven edge-case discovery and property-based testing, confirming determinism with byte-identical replay across ten thousand adversarially-scheduled runs, and validating crash recovery with fault injection and measured recovery-time objectives, so that every guarantee this book opens with still holds on the other side of a real production incident.
What You Will Learn
perf c2c instead of assumed struct paddingSCHED_FIFO, NUMA placement, and interrupt isolationWho This Book Is For
This book is for C++ systems engineers, quantitative developers, and trading infrastructure teams building matching engines, order management systems, or any latency-sensitive concurrent system where correctness under load is non-negotiable. Familiarity with modern C++, concurrency fundamentals, and Linux systems programming is assumed; prior exposure to lock-free data structures is helpful but not required.
Table of Contents
Learn to eliminate silent feed corruption with confidence using measured, verified engineering, guided by a pragmatic architect's playbook for zero-copy parsing, gap recovery, and deterministic reconstruction.
Key Features
Book Description
Most engineers ship a feed handler once it parses cleanly, unaware the test stream never exercised a real gap. This book closes that gap, providing the practical knowledge of zero-copy parsing, gap recovery, and reconstruction needed to build a handler with measured correctness, not assumed correctness.
You will begin by parsing FIX, ITCH, and OUCH at speed, benchmarking against real message-mix captures, and detecting sequence gaps that distinguish true loss from ordinary reordering. You'll gain a clear framework for engineering out silent corruption at its source, understanding where naive parsing, unbounded buffers, and untested recovery introduce risk, and how each cost compounds, or gets eliminated, under real load.
The book walks through the full arc of a production system: snapshot-plus-incremental recovery that survives a real outage, order book reconstruction with correctly scoped liquidity, measuring wire-to-book latency honestly, and proving determinism with byte-identical replay. It addresses production faults, including feed divergence and silent staleness, and closes with a full reference implementation.
Whether you're building your first feed handler or hardening your fourth, this book provides actionable techniques for securing correctness that holds under real load.
What You Will Learn
Who This Book Is For
This book is for C++ systems engineers, quantitative developers, and senior infrastructure engineers building or hardening a production feed handler. It's useful for engineers moving into latency-sensitive, high-throughput roles where correctness guarantees grow more complex. No prior binary protocol experience is assumed.
Table of Contents
Stop treating your matching engine, risk gate, and FPGA layer as three problems you've already solved. The fourth problem, the one that only shows up once all three run together against live order flow, is what this book is about.
Key FeaturesA matching engine that passes its own test suite, a risk engine that rejects every order it should, and an FPGA gateway that hits its latency target on the bench are not a trading system. They're three sign-offs, and the gap between them and one correct system is where integrated systems fail, silently, the first day all four run together against real order flow.
It treats that gap as the engineering problem it is, opening with a real end-to-end latency budget across market data, matching, risk, and FPGA execution, one shared clock semantics per boundary rather than four privately defined numbers added together. It wires the risk gate into the hot path as a synchronous check, passes exposure state across boundaries without added latency, and integrates the FPGA layer with a software fallback tested continuously, not a codepath nobody has run in months.
The middle chapters build cross-component reliability: fault recovery ordering across subsystems with independent recovery paths, system-wide determinism through a shared sequence and clock reconciliation at the hardware boundary, and graceful degradation that scopes a fault rather than forcing an unnecessary halt.
The final part proves the system works: latency measurement with per-stage attribution finding which subsystem regressed, deterministic replay reproducing a session byte-for-byte, and chaos testing injecting correlated, simultaneous failures single-fault testing cannot find. It closes with production operation: alerting tied to the real system budget, and a deployment strategy treating hardware-software compatibility as a checked contract.
What You Will LearnThis book is for C++ systems engineers, quantitative infrastructure teams, and trading technology leads who have built one component of a trading pipeline and are now responsible for making several work together. Familiarity with modern C++ is assumed.
Table of ContentsLearn to accelerate C++ trading systems below the software latency floor using HDL design, PCIe DMA transfer, and clock-domain synchronization, guided by a trading systems architect's playbook for building and proving sub-microsecond hardware execution paths.
Key Features
Book Description
Most software-only trading gateways hit a latency floor no further C++ optimization can move, because the cost sits in kernel network stacks, PCIe round trips, and OS scheduling jitter below what a profiler can see. This book closes that gap, providing the HDL design, DMA transfer, and clock-domain synchronization knowledge needed to move market data ingestion and a bounded slice of decision logic into FPGA fabric, with a measured latency improvement, not an assumed one.
You will begin by mapping where software's nanoseconds go, then translate C++ intuitions into correct HDL execution models before setting up a repeatable build and simulation pipeline. You'll gain a framework for drawing the hardware/software boundary, keeping stateless, fixed-format logic in fabric while leaving stateful decision logic in software, and building the DMA and clock-crossing paths that connect the two without adding jitter.
The book walks through a production FPGA gateway: wire-to-logic ingestion, timing closure across worst-case corners, hardware-timestamped latency measurement against a software baseline, and production resilience through formal verification, hardware-in-the-loop replay testing, dual-bank deployment, and automatic software fallback. It closes with a full annotated reference design, a timing report walkthrough, anonymized field post-mortems, and a clock-domain-crossing pattern reference.
Whether you're building your first hardware-accelerated gateway or hardening one in production, this book provides techniques for securing latency guarantees that hold under real silicon, not just in simulation.
What You Will Learn
Who This Book Is For
This book is for C++ engineers, trading systems architects, and infrastructure developers building or hardening an FPGA-accelerated trading gateway, moving from pure software low-latency work into hardware acceleration roles. No prior HDL experience is assumed.
Table of Contents
Learn to build fixed-latency risk infrastructure with confidence using lock-free engineering, guided by a production trading systems architect's playbook for cache-aligned state, incremental computation, and provable correctness under load.
Key Features
Book Description
Most risk engines ship once they pass a quiet-market demo, unaware the same mutex or the same O(n) recomputation that looked fine in testing will stall the matching engine the day volatility actually spikes. This book closes that gap, providing the practical knowledge of cache-aligned state, lock-free publication, and incrementally-maintained risk figures needed to build a risk engine with measured latency guarantees, not assumed ones.
You will begin by deriving an actual latency budget from tick-to-fill time and realized adverse price movement, rather than picking a round number, and building position tracking that updates atomically as fills arrive without contending with the order path. You'll gain a clear framework for pre-trade risk checks, implementing size limits, fat-finger detection, and price collar validation as a fully lock-free gate ahead of the matching engine.
The book walks through the full arc of a production risk system: parametric VaR maintained incrementally rather than recomputed from scratch, live correlation and portfolio-level exposure decomposition, historical stress testing run in parallel without touching the fill path's cache lines, and full production resilience through fail-safe policy design, circuit breakers, and regulatory audit trails. It addresses correctness rigor, including replay testing against historical fills, property-based invariant checking, and reconciliation against independent end-of-day reference data, and closes with a full annotated reference implementation.
Whether you're building your first real-time risk gate or hardening your fourth, this book provides actionable techniques for securing latency guarantees that hold under live order flow.
What You Will Learn
Who This Book Is For
This book is for C++ engineers, quantitative developers, and trading systems architects building or hardening a production risk engine. It's useful for engineers moving into low-latency infrastructure roles where correctness and speed are both non-negotiable. No prior risk management experience is assumed.
Table of Contents
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.