Larry Ryan

Larry Ryan

To establish the feasibility and performance of a low-latency trading system hosted on Cloud-based servers, we developed and deployed a simple trading system to three Cloud environments and tuned it for low latency.

Low Latency Trading Systems

To stay ahead in the high-speed race, high frequency/low latency trading systems must maximize throughput, minimize latency, and accommodate rapid development of additional functionality.

Traditionally, low latency, high-frequency trading has required powerful server hardware in a large data center, scaled to accommodate worst-case network traffic scenarios on the busiest trading days. Resilience in the face of network or power failures required expensive redundant hardware as well as offsite data retention.

Cloud-based alternative

Cloud-based software solutions are architected to be distributed, resilient, and easily scalable, meeting many of the needs of a high-frequency trading system. However, while Cloud environments meet capacity, availability, and resiliency requirements, they introduce additional challenges to achieving low latency. The greatest barrier to building a high-frequency trading system in a Cloud environment has been the limited ability to provision hardware which is co-located within a data center, essential for meeting the low latency requirements of such systems. Other challenges include decreased performance due to virtualization of Cloud instances and the difficulty of synchronizing clocks across instances to meet regulatory requirements. That said, a system running in the Cloud with reduced latency offers the promise of keeping up with competition and ensuring users have the best possible chance to make informed decisions, informed by real-time data.

Recent developments by Cloud providers such as Azure and Oracle Cloud Instructure (OCI), including the introduction of availability sets, access to bare-metal instances, and high-performance networking are enabling Cloud platform support for a high-frequency trading use case. Such developments mean that it is now possible to implement a high-frequency trading system fully hosted in a Cloud environment. Such a system would provide traders with all the advantages of a fast, efficient trading platform, as well as the robust, easily maintainable infrastructure provided by a distributed Cloud architecture.

While traditional low-latency trading systems built on dedicated servers with co-located trading platforms provide advantages not available in public Clouds, such as:

  • Lowest latency
  • Infrastructure control
  • Physical access control

they don’t offer the advantages of public Clouds, including:

  • Cost-effective dynamic scaling
  • On-demand globally distributed data centers
  • Global reach
  • Marketplace for software pricing, distribution and control

Proof of Concept

To establish the feasibility and performance of a low-latency trading system hosted on Cloud-based servers, we developed and deployed a simple trading system to three Cloud environments and tuned it for low latency. We executed performance tests on an automated deployment hosted on Amazon Web Services (AWS), Microsoft Azure and Oracle Cloud Infrastructure (OCI). The effectiveness of our system in delivering round trip trades on Cloud-based servers at production message rates with competitive latency was assessed. Additionally, we performed a measurement and analysis of clock skew and clock drift between two servers when running performance tests, to determine whether it is currently possible to implement a MiFID II-compliant trading system in a Cloud environment.

We tested a trading system with a Solace message broker, a typical pattern for FX trading, and a brokerless trading system, typical for equity trading. For the brokered message-based solution, submitting an order into the market required a mean round-trip latency of 251 microseconds and 99% completed within 357 microseconds at a message rate of 10,000 orders/second. For a brokerless solution, submitting an order into the market required a mean round-trip latency of 20 microseconds and 99% completed in 54 microseconds at a message rate of 10,000 orders/second. With further work we can improve these results but believe that the latency and jitter is good enough to justify running trading systems in Public Clouds.

Additionally, an analysis of clock skew and drift demonstrated that available clock synchronization methods are not yet capable of meeting MiFID II compliance in the Cloud environment. However, we believe that with further work Public Cloud platforms can achieve MiFID II compliance.

Our testing demonstrates that Public Clouds can support the performance requirements of low-latency/high frequency trading. We posit that deploying trading platforms in the Public Cloud enables new models for market data distribution, order routing and trade reporting. The challenge will be market adoption: who will try this first and how will adoption disrupt the trade lifecycle ecosystem. New technologies often fail to adopt in this space due to market resistance; will that happen with trading in the cloud?  Or will trading in the Cloud challenge existing participants and enable adoption of new solutions?  We think it’s time to find out!

For further details, download our White Paper.