Making a trading system “fast” cannot be an afterthought. While low latency programming is sometimes seen under the umbrella of “code optimization”, the truth is that most of the work needed to achieve such latency is done upfront, at the design phase. How to translate our knowledge about the CPU and hardware into C++? How to use multiple CPU cores, handle concurrency issues and cost, and stay fast?
Importance of Low Latency in Trading Systems: Low latency is crucial in automated trading due to the high volume of trades and the need to respond quickly to market changes. For instance, if a significant market event occurs, it’s necessary to cancel buy orders immediately to avoid losses.
Designing for Performance: Performance should be a primary consideration from the beginning of the system design process. While premature optimization can lead to unnecessary complexity, considering performance from the outset is essential in the overall design strategy.
Strategy vs Tactics in System Design: Strategy refers to the overall approach to meet a goal, such as handling a million events per second or reacting to a certain event within a specific latency distribution. Tactics, on the other hand, refer to individual actions or implementation details. While premature optimization (tactics) can be detrimental, considering performance from the beginning (strategy) is essential.
Building Blocks of Low Latency Systems: Four main topics are crucial in building low latency systems: data model access, system tuning, eventuality, and performance measurement. These topics provide a roadmap for designing and implementing a low latency trading system.
Evolution of Exchange Speeds: Exchange speeds in financial markets have evolved, with the current focus on achieving microsecond-level latencies. This highlights the increasing demand for speed in financial markets and the need for trading systems to keep up with this trend.
Trigger to Target Latency: “Trigger to target latency” is a concept used to measure the speed of trading systems. It refers to the time from when the exchange sends an event to market participants (the trigger) to when any market participant sends an order back (the target). This is a key performance indicator in the world of automated trading.