Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Developing High-Frequency Trading Systems
Developing High-Frequency Trading Systems

Developing High-Frequency Trading Systems: Learn how to implement high-frequency trading from scratch with C++ or Java basics

Arrow left icon
Profile Icon Sebastien Donadio Profile Icon Sourav Ghosh Profile Icon Romain Rossier
Arrow right icon
€27.99 €31.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (19 Ratings)
eBook Jun 2022 320 pages 1st Edition
eBook
€27.99 €31.99
Paperback
€38.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Sebastien Donadio Profile Icon Sourav Ghosh Profile Icon Romain Rossier
Arrow right icon
€27.99 €31.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (19 Ratings)
eBook Jun 2022 320 pages 1st Edition
eBook
€27.99 €31.99
Paperback
€38.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€27.99 €31.99
Paperback
€38.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Developing High-Frequency Trading Systems

Chapter 1: Fundamentals of a High-Frequency Trading System

Welcome to Developing High-Frequency Trading Systems!

High-Frequency Trading (HFT) is a form of automated trading. For the last twenty years, HFT has gained recognition in the media and in society. A book called Flash Boys: A Wall Street Revolt, written by Michael Lewis in 2014, topped the sales on the New York Times Best Seller list for three weeks. It relates to an investigation into the HFT industry and its impact on the trading world. Scholars, the financial world, and the non-financial world are fascinated by this form of trading. Meanwhile, this new era of trading has created a lot of fear while giving more and more control to machines.

The goal of this book is to review what HFT is and how to build such a system from a technical perspective. HFT is a multi-disciplinary matter involving thorough knowledge of computer architecture, operating systems, networking, and programming. By the end of this book, you will understand how to build a trading system from scratch by using the most advanced technical choices for optimizing speed and scalability. We chose to divide this book into three main parts.

In the first part, we'll go through how HFT tactics function and what kind of trading we may expect from HFT. Then we will go over the functions of an HFT system. We will conclude this part with a description of how a trading exchange works.

In the second part of this book, we will explain the theory of operating systems and hardware and the required knowledge to optimize a trading system, taking into account the hardware and operating system features.

The final part will explain in detail how to use C++, Java, Python, and FPGA to create an HFT system. We will also extend this knowledge to crypto trading, and we will review how to build a trading system in the cloud.

In this chapter, we will talk about how we got into HFT. We will review what kind of trading strategies work for HFT. We will explain in detail what makes HFT so different from regular trading.

Our objective in this chapter is to cover the following topics:

  • History of HFT
  • What HFT is
  • Who the participants are
  • What trading strategies work in HFT

History of HFT

Let's discuss the history of exchanges and financial markets prior to 1930.

When we talk about HFT, it is difficult to give a precise date for when it started. We need to come back to the primitive times when trade arose from human contact. Before the invention of modern-day cash, ancient people relied heavily on trading to trade products and services with one another in a gift economy. Long-distance trade extends back to almost 150,000 years ago, according to Peter Watson. Year after year, with more people, more goods, and more money, trading became one of the major activities of humankind. It is obvious that making money implies more business. One of the parameters was speed. If you make more transactions, you will make more money. Many stories describe the ambition of traders to get technologies such as better transportation to make deals more quickly or to get news more quickly to take advantage of other folks who do not have access to these new technical means.

We did not have to wait for too long before seeing cases of unfair trade involving those who have technical advantages over others. In 1790, a Georgia representative spoke to the US House of Representatives to expose high-speed traders. Indeed, Congress was debating the Secretary of the Treasury Alexander Hamilton's proposal that the US government absorb the previous debts accrued by the states during the Revolution (Funding Act of 1790). Traders who had learned the decision immediately bought or rented rapid boats. Their goal was to front-run messengers and buy the old debts since the passage of the Act would increase the market value. During the twentieth century, the idea of speed trading or HFT appeared.

The post-1930s era

Trading is the exchange of items for other items. It can be financial products, services, cash, digital assets, and more. One of the goals of trading is to make a profit from these transactions. The number of transactions will be correlated with the quantity of money generated by the exchange of assets. When we manage to increase the ratio between the number of transactions and the time, we can increase the profitability over time. Therefore, being capable of increasing the number of transactions is critical. Trading actors understood very quickly that they needed to shorten the trading time and started gathering in some specific places. They used to place their orders in these locations, which we call today the trading exchange (or trading floor). Major events participated in the expansion of fast-speed automated trading:

  • 1969: Instinet was one of the first automated system infrastructures. It speeded up the adhesion of high-speed transactions.
  • 1971: The National Association of Securities Dealers Automated Quotations (NASDAQ) was created in 1971 with electronic transactions.

It was the world's first electronic stock market. Initially, it only used to send quotations.

  • 1996: Island ECN was the pioneering electronic communication network for US equities trading, while Archipelago facilitated electronic trading on the US trading exchange by creating Archipelago Exchange (ArcaEx).
  • 2000s: 10% of transactions are HFT transactions.

The financial sector gathered more and more technologists in the early 2000s. By getting this technological intake, the sector started evolving sharply. Automation, throughput, performance, and latency became words that were well known by trading firms. The HFT transactions reached more than 10% of the market. By 2009, 2% of trading firms accounted for 75% of the equity volume. Nowadays, only a few firms remain in HFT, such as Virtu, Jump, Citadel, IMC, and Tower.

The modern era

The post-1930s era focused on transparency and regulation in the equities markets (and the pit in commodities markets). The modern era gives prominence to electronic trading and improves transparency. In 2000, the US Securities and Exchange Commission (SEC) proposed the Central Limit Order Book (CLOB). The CLOB is a transparent system matching orders between participants. Many more exchanges (such as Island and Arca) came to the trading scene. The number of trading firms, hedge funds, and electronic players kept increasing. They created their own technology stack to trade more quickly and stay competitive. After 10 years, only a few trading firms managed to remain competitive, becoming the 2% of the trading firms accountable for 75% of all equity volume.

The savoir faire for competing in HFT requires heavy investment: money, people, and time. It is a marriage of low-level system expertise and quants, as well as smart money (investors are more and more technology savvy). Engineers capable of creating performant code for designing ultra-low latency systems are very expensive. Only a few engineers had these skills. The performance for such a system required specialized hardware. Routers, servers, and network devices are also expensive. Therefore, the experience and the barrier of entry will prevent a lot of new incomers and will limit the competition. On top of the five firms we talked about previously, there are boutique shops that trade HFT strategies using an edge they found either in the market structure or some technical fact that other firms are not exploiting. The giant HFT firms are the companies responsible for moving most of the equity volume. Nowadays, HFT is estimated to account for at least 50% of the US equity (shares) trading volume. The market share of HFT has declined, as has profitability, since the peak year (2009).

After 2015, the growth of digital currencies cleared the way for new opportunities for high-frequency traders. Today, we can see an extensive growth of HFT strategies working with well-known crypto exchanges such as Coinbase, Binance, and hundreds of other crypto exchanges.

This modern era has anchored technology and automated trading for good. Trading models are data driven and model driven. The market data business definitely became a major part of trading. Exchanges and trading firms started making money by generating or collecting market data, the raw material of any algorithm trader.

Left arrow icon Right arrow icon

Key benefits

  • Learn how to build high-frequency trading systems with ultra-low latency
  • Understand the critical components of a trading system
  • Optimize your systems with high-level programming techniques

Description

The world of trading markets is complex, but it can be made easier with technology. Sure, you know how to code, but where do you start? What programming language do you use? How do you solve the problem of latency? This book answers all these questions. It will help you navigate the world of algorithmic trading and show you how to build a high-frequency trading (HFT) system from complex technological components, supported by accurate data. Starting off with an introduction to HFT, exchanges, and the critical components of a trading system, this book quickly moves on to the nitty-gritty of optimizing hardware and your operating system for low-latency trading, such as bypassing the kernel, memory allocation, and the danger of context switching. Monitoring your system’s performance is vital, so you’ll also focus on logging and statistics. As you move beyond the traditional HFT programming languages, such as C++ and Java, you’ll learn how to use Python to achieve high levels of performance. And what book on trading is complete without diving into cryptocurrency? This guide delivers on that front as well, teaching how to perform high-frequency crypto trading with confidence. By the end of this trading book, you’ll be ready to take on the markets with HFT systems.

Who is this book for?

This book is for software engineers, quantitative developers or researchers, and DevOps engineers who want to understand the technical side of high-frequency trading systems and the optimizations that are needed to achieve ultra-low latency systems. Prior experience working with C++ and Java will help you grasp the topics covered in this book more easily.

What you will learn

  • Understand the architecture of high-frequency trading systems
  • Boost system performance to achieve the lowest possible latency
  • Leverage the power of Python programming, C++, and Java to build your trading systems
  • Bypass your kernel and optimize your operating system
  • Use static analysis to improve code development
  • Use C++ templates and Java multithreading for ultra-low latency
  • Apply your knowledge to cryptocurrency trading

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 17, 2022
Length: 320 pages
Edition : 1st
Language : English
ISBN-13 : 9781803243429
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 17, 2022
Length: 320 pages
Edition : 1st
Language : English
ISBN-13 : 9781803243429
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 118.97
Hands-On Financial Trading with Python
€35.99
Machine Learning for Algorithmic Trading
€43.99
Developing High-Frequency Trading Systems
€38.99
Total 118.97 Stars icon

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(19 Ratings)
5 star 68.4%
4 star 10.5%
3 star 5.3%
2 star 0%
1 star 15.8%
Filter icon Filter
Top Reviews

Filter reviews by




Armaghan Jun 19, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Really enjoyed reading this book. Gives a good insight on how high-performance low-latency financial trading systems work. The knowledge provided is not limited to financial trading systems, but can be applied to any C++ application that uses networking for communication.
Subscriber review Packt
Leonid Shleymovich Jan 09, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book gives rather deep observation of trading process from the back office developer's point of view. This is the first 30% of the book. Then in 60% of the book it evaluates different relevant C++ and overall design aspects to make trading faster. For every tool and advice is Author honestly lists a negative side, since almost every design solution is a tradeoff. The last 3 chapters describe Java tools, Python tools and more detailed sample architecture for Crypto exchange.
Feefo Verified review Feefo
anthony weston Jul 11, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Developing High-Frequency Trading Systems gives a great overview of what is important when developing a HFT system. It covers the aspects of system, network and software design that is needed to build an optimized trading system. Helps the reader learn what is used to evaluate the performance of the trading system and what can be done to help improve it. It directs the reader in what technologies(microwave, fiber, c++, fpga…) are required to reach various trading thresholds like nano, micro, millis.
Amazon Verified review Amazon
Jean Oct 31, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very detailed and comprehensive book on high frequency trading systems. It is geared towards people who have more of a Computer Science background as it doesnot require any prior Finance knowledge and all trading concepts are very well explained. However, some prior knowledge on networks, OS structure and memory management might be useful though not necessary in my opinion. The book goes in depth in some of the optimization (and reasons for implementing them) to build an efficient trading system.In the last part, it finally highlights how different features of different programming languages can be used in your system.
Amazon Verified review Amazon
toto Aug 01, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's typically daunting for new entrants to know all the technologies that go into making modern high frequency trading (HFT) systems work. This book attempts to bring together a comprehensive overview of all the things that make HFT systems tick, and does a good job at it.I'm not aware of any other book that's as tailored specifically to HFT and is well rounded with regards to all the components one must be aware of and techniques that are used to reduce trading latency. This book is focused on giving existing developers (C++/Java) a good handle on all the techniques and aspects that are used to reduce latencies in modern HFT systems.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.