Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Developing High-Frequency Trading Systems

You're reading from  Developing High-Frequency Trading Systems

Product type Book
Published in Jun 2022
Publisher Packt
ISBN-13 9781803242811
Pages 320 pages
Edition 1st Edition
Languages
Authors (3):
Sebastien Donadio Sebastien Donadio
Profile icon Sebastien Donadio
Sourav Ghosh Sourav Ghosh
Profile icon Sourav Ghosh
Romain Rossier Romain Rossier
Profile icon Romain Rossier
View More author details

Table of Contents (16) Chapters

Preface Part 1: Trading Strategies, Trading Systems, and Exchanges
Chapter 1: Fundamentals of a High-Frequency Trading System Chapter 2: The Critical Components of a Trading System Chapter 3: Understanding the Trading Exchange Dynamics Part 2: How to Architect a High-Frequency Trading System
Chapter 4: HFT System Foundations – From Hardware to OS Chapter 5: Networking in Motion Chapter 6: HFT Optimization – Architecture and Operating System Chapter 7: HFT Optimization – Logging, Performance, and Networking Part 3: Implementation of a High-Frequency Trading System
Chapter 8: C++ – The Quest for Microsecond Latency Chapter 9: Java and JVM for Low-Latency Systems Chapter 10: Python – Interpreted but Open to High Performance Chapter 11: High-Frequency FPGA and Crypto Other Books You May Enjoy

Use case - Building an FX high-frequency trading system

A company needs an HFT system capable of sending an order within 20 microseconds. To do this, the company can follow this approach:

  • Choose a multi-process architecture over a multi-core architecture.
  • Ensure each process is pinned to a specific core to reduce context switches.
  • Have processes communicating over a circular buffer (lock-free data structure) in shared memory.
  • Design the network stack using Solarflare OpenOnload for network acceleration.
  • Increase the page size to reduce the number of TLB cache misses.
  • Disable hyperthreading to get more control over the concurrency execution of the processes.
  • Use the CRTP to reduce the number of virtual functions.
  • Remove runtime decisions by using templated data structures.
  • Pre-allocate data structures to avoid any allocation on the critical path.
  • Send fake orders to keep caches hot and allow an order to go out at the last moment.

In...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}