Low latency trading-Three hurdles in the race to zero (zz)
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
In today's high frequency trading community where everything is carried out
Electronically there is much talk about latency. But few truly understand what
Latency is, where it comes from or how it manifests itself. The first step
Eliminate latency is to understand it.
In the race to zero latency there are three major hurdles:
Of these three, one has all but been eliminated by the world's leading high
Frequency traders. A second has been tamed, and the third is in the cross hairs
For demolition by innovative new computing techniques.
Latency defines how quickly a trading system can react to changing conditions.
In any system of networked computers, overall latency can be broken down
The three fundamental categories of propagation, transmission and processing.
Other forms of latency, such as queuing latency or network latency can be
Described in terms of these three fundamental types.
Understanding the relative magnitudes of latency in each category can yield
Valuable insight for optimizing the performance of a high-frequency trading
Propagation latency is the time required for a signal to move from one end of
Communication Link to another. This quantity of latency is a function of the speed
Of light, the physical nature of the communication medium and the distance
Between the endpoints. For an optical signal traveling through a fiber optic cable,
The rate of signal propagation is roughly two-thirds the speed of light in a vacuum,
Or about 200 million meters per second. Another way of stating this is that every
20 kilometers between two endpoints equates to about 100 microseconds
Since we can't change the speed of light, the only significant way to reduce
Propagation latency is to move the endpoints closer together. This fact gives rise
To the increasing popularity of proximity solutions, where electronic trading
Systems are placed in the same geographic area as the trading venues
Themselves. If a trading system is within 20 kilometers of an electronic venue,
Propagation latency can be as small as 100 microseconds. If the trading system
Is co-located in the same data center and within 200 meters, the propagation
Latency can be smaller than a single microsecond.
Transmission latency is often confused with propagation latency, but it is
Distinct phenomenon. Unlike propagation latency, transmission latency is not
Dependent on distance. It is directly related to how quickly a data packet can be
Converted into a series of signals to be transmitted on a communication link.
To send a data packet from one computer to another, it must first be turned into
Stream of individual bits. Each bit is then transmitted in a serial fashion, one after
Another. The rate at which individual data bits are converted to signals is termed
The bit rate of the communication link, or its link speed.
Expiration of today's high-speed networks utilize link speeds of 1 Gbps, or one billion
Bits per second. A data packet consisting of 1,000 bits (or 125 bytes) requires
One millionth of a second to transmit on such a link, or exactly one microsecond.
More and more trading systems today are moving to even higher speed
Interconnect technologies, such as 10 Gigabit Ethernet or InfiniBand, which can
Transmit data up to 40 Gbps. At these link speeds, a 1,000 byte data packet
(8,000 bits) can be serialized and transmitted in a fraction of a microsecond.
It's clear that two of the three major component categories of overall latency in
High-frequency trading system can easily be written CED to less than a microsecond
By moving close to trading venues and utilizing modern high-speed
Processing latency then becomes the category that dwarfs all others. It's the time
Required to act upon a data packet once it has been already ed. In a high-frequency
Trading System, this can involve transforming the data into alternate
Representations, updating the current view of the market, deciding whether to act
Upon this new view and issuing buy, category or cancel orders into the market.
General purpose computer systems are typically used to host the Processing
Logic of trading systems in the form of software. As their name implies, these
Systems are designed to be very general, and can be programmed through
Software to solve a wide variety of computational chores. These systems are
Marvel of modern technology, but their very nature often leads to increased
Latency for specific applications.
The fundamental operation of all general-purpose processors today, regardless
Of the physical form they take, is to execute a sequence of stored instructions in
A serial fashion, one instruction after another. Each instruction takes a fixed, finite
Amount of time to complete that is related to the CPU's clock speed. The more
Instructions needed to implement a given piece of functionality, the longer
Entire sequence takes to complete and the greater the processing latency.
A modern day microprocessor with a clock speed of 2.0 GHz can, optimistically,
Execute a single machine instruction every clock cycle. This equates to two
Billion instructions per second, or 2,000 machine instructions per microsecond.
To put this into perspective, a single line of a high-level programming language
Will typically yield anywhere from 3 to 8 machine instructions. That means on
Average a single microprocessor can execute at most a few hundred lines
Software code in a single microsecond.
When you consider the hundreds of lines of code that are executed by
Operating system simply to receive or transmit a data packet over a network,
Coupled with the thousands of lines of code needed to process a market data
Feed or implement a trading strategy or matching engine, it's easy to see how
Even simple software applications can quickly dwarf other sources of latency in
Trading System. Even the most highly optimized software-based systems can
Easily take several thousand microseconds (milliseconds) to complete their
Improving the processing latency on general-purpose computers means grouping
The number of software instructions, increasing the processor clock speed, or
Introducing parallel threads of execution by way of multiple processors. But these
Approaches offer diminishing returns today. The increasing sophistication
Trading algorithms demands more instructions, not fewer.
Meanwhile microprocessor speeds seem to have reached a plateau.
Recently, increases in CPU performance have been able to ride the coattails
Moore's law, and their advances have been sufficient to meet the demands
Trading systems. But that free ride has come to an end.
Moore's Law originally stated that "the complexity of an integrated circuit,
Respect to minimum component cost, doubles every 24 months. "This complexity
Is often measured in the number of transistors per unit area that can be
Implemented on a silicon chip. Increasing transistor density has led to greater
Capacities in memory devices and until recently, in greater clock speeds
While Moore's law still appears to apply for increasing complexities, Other
Economical factors mean that these advances do not translate into clock frequency
Speed increases for microprocessors. The increased clock frequencies made
Possible by greater transistor densities have come at a cost. It takes more energy
To switch a transistor on or off at higher frequencies, regardless of its size.
Greater the clock frequency, the more electrical power is consumed and the more
Heat is generated by individual transistors. The increased power and cooling
Requirements are creating prohibitive operational costs.
So rather than increase clock speeds, microprocessor producers are
Inconfigurating multiple instruction execution cores to boost performance. This
Parallelism increases the number of instructions executed per unit of time,
Thereby helping to reduce processing latency. But the degree of Parallelism
Achieved with this approach is limited to the number of instruction cores. More
Importantly, there is an upper limit on the speedup achievable with parallel
According to Amdahl's law, the speedup of a program using multiple processors
In parallel is limited by the time needed for the sequential fraction of the program
-That portion of the program that cannot be parallreceived.
Every software-based program has some inherent sequential nature. Indeed,
Very structure of the instruction execution cores dictates sequential processing
The individual machine instruction level. There is nothing a software system can
Do to increase the parallelism of a single sequential instruction.
For this reason, parallel computing with multiple instruction execution cores is
Only useful for either small numbers of cores, or for so-called "embarrassingly
Parallel "problems. Relying on this approach alone is not sufficient to reduce total
Processing latency of trading systems to microsecond levels at a reasonable cost.
A new approach that avoids this limitation uses reconfigurable hardware
Increase the degree of parallelism by several orders of magncategory.
Reconfigurable hardware can host complex computational circuits whose logic is
A direct implementation of a specific algorithm, but without the time-sequential
Nature seen in software. This "Instruction-less" computing is able to utilize fine-
Grained, multi-layer parallelism in a way that surpasses the computational speed
Of coarse-grained, instruction-level and thread-Level Parallelism obtained
Multi-core processors and software.
When this type of hardware acceleration is coupled with traditional software
Systems, the overall processing latency of the trading system can be
Reduced to microsecond scale, and no longer dwarfs other forms of latency.
Microseconds can now rule the world of high-frequency trading and the high
Frequency trader can leap over the last significant hurdle in the race to zero.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.