FX trading is fast-paced and complex, requiring low-latency trading systems to compete with the best.
FX trading is fast-paced and complex, requiring low-latency trading systems to compete with the best.
April 2024
Introduction and Key Points
Man Group embarked on a project to enhance its FX execution system, aiming to reduce latency and achieve high levels of system reliability under heavy data loads, therefore improving execution quality for its clients.
- Technology used: Aeron Transport and Aeron Archive
- Technical challenges:
- Navigating the existing infrastructure & shifting the system to a new host.
- Integrating Aeron, an open-source technology, within Man Group’s tech stack ensuring improved performance without service interruptions.
- The roll-out: Starting with a trial, Aeron was initially deployed in a ‘production-like’ simulation environment to ensure its performance over a range of different traffic profiles.
- The test criteria: Aeron needed to…
- Demonstrate its ability to handle short-lived bursts of intense quoting activity across multiple providers.
- Maintain minimal latency when quote streams were slow-moving and messages infrequent.
- The outcome: Man Group deployed Aeron in production, fully replacing its legacy middleware solution. Aeron continues to provide high-performance messaging, outperforming the legacy solution by at least one order of magnitude across every percentile.
The Process
Industry challenge
In FX markets, speed is important. Liquidity conditions are dynamic and change in real-time, so orders must be sent promptly to minimise the risk of hitting stale quotes and being rejected.
Execution systems are the engines through which investment firms access and interact with markets, combining rich functionality with high performance. Hedge funds understand that having the right tools is beneficial – a system that lags peers is a strategic disadvantage.
The brief - from commercial to open source
FX execution systems are multi-layered, facilitating the entire FX trading lifecycle. Each element of the system communicates via Inter-Process Communication (IPC) to complete the trading flow. The bigger and more sophisticated the system, the greater the number of components and services to run simultaneously.
Figure 1: FX Algo Engine Architecture
Man Group’s use case centred around its multicast RFQ protocol. The system needed to be able to take orders from upstream and compare them in real time with the available liquidity streamed from multiple liquidity providers. The quotes are then aggregated and fed into an algorithm which decides when best to execute orders against which liquidity.
To achieve this, latency is key. The algo must be aware of the most up-to-date quote data in order to make informed trading decisions. Any delay between receiving data to execution can result in changes in price, impacting the cost of the trade or perhaps even missing out altogether.
Man Group was looking for fast and reliable technology to meet the following selection criteria:
- Open-source tech to give the firm greater control of its functionality and roadmap.
- Predictable, ultra-low latency.
- Reliability under the highest data loads.
- Proven industry use cases and references.
The goal was to build a fully fault-tolerant, low-latency messaging layer.
Technical challenges
When Man Group decided to move away from its legacy messaging tool and started to integrate Aeron, a key technical challenge was navigating the existing infrastructure and shifting the system to a new host. For example, the Linux kernel – which manages the interaction between software and hardware – caused issues with Aeron’s idle strategy holding back immediate performance improvements.
Figure 2: FX IPC Simulator
These issues were overcome by creating a virtual environment, simulating the execution system, to test the new software under multiple loads and ease implementation. Parameterising variables such as the number of quotes their rate of quoting, and idle strategy enabled the tech team to tune the deployment appropriately. The system showed how Aeron could support the low latency messaging needs and helped the development team to productionise the technology.
Migration to Aeron
Man Group’s technology team realised they would need to move the application to an alternative host to address the kernel idle strategy limitation. However, to avoid migrating the commercial IPC solution, Aeron had to be tuned to the existing host and rolled out there first. The simulator enabled them to do this with confidence.
The two-phase rollout strategy meant that the latency gains were achieved incrementally:
- Aeron deployed alongside the application and IPC migrated. At this point the latency testing saw:
- Small gains in lower percentiles, e.g. 10%
- A slightly more stable median in a similar latency range.
- Upper percentiles, e.g. 99%, remain similar due to the kernel idle strategy issue.
- Application migrated to an alternative host, resolving the kernel incompatibility issue. At this point, latency benefits were seen across all percentiles, particularly the upper ones.
Figure 3: Latency profiles during migration
Aeron Roll-out
Over the course of the year-long project, Aeron was used to build two key components.
- A new, low-latency messaging layer: Aeron Transport became the vehicle for an updated IPC protocol capable of supporting multicast RFQ, trading instructions and system availability messages. As predicted, the new platform unlocked significant performance gains.
- Message persistence: Man Group later began using Aeron Archive for the recording and replay of inbound FIX messaging streams. The persisted streams may be used for real-time monitoring, offline analysis, and counterparty simulation in lower (pre-production) environments. Use of Archive gives confidence that messages can be relayed from latency-sensitive trading processes without blocking or backpressure.
Benefits of Aeron - in a nutshell
Man Group replaced its legacy technology with a state-of-the-art, open-source solution. Leveraging Aeron Transport and Archive technology, the firm was able to:
- Build a high-performance messaging layer.
- Improve its latency statistics and predictability.
- Ensure higher resilience to spikes of messages and instant recovery in case of failures.
- Future-proof its FX execution system.
- Build resiliency into the system so reporting processes do not interfere with trading activity.
The Future
Man Group has added Aeron to its toolkit of approved technologies for any projects with low-latency requirements. The firm’s technology team subsequently integrated it into an equities and futures trading platform for communicating signals to algo execution engines.
You are now exiting our website
Please be aware that you are now exiting the Man Group website. Links to our social media pages are provided only as a reference and courtesy to our users. Man Group has no control over such pages, does not recommend or endorse any opinions or non-Man Group related information or content of such sites and makes no warranties as to their content. Man Group assumes no liability for non Man Group related information contained in social media pages. Please note that the social media sites may have different terms of use, privacy and/or security policy from Man Group.