This work aims to bridge the existing knowledge gap in the optimisation of latency-critical code, specifically focusing on high-frequency trading (HFT) systems. The research culminates in three main contributions: the creation of a Low-Latency Programming Repository, the optimisation of a market-neutral statistical arbitrage pairs trading strategy, and the implementation of the Disruptor pattern in C++. The repository serves as a practical guide and is enriched with rigorous statistical benchmarking, while the trading strategy optimisation led to substantial improvements in speed and profitability. The Disruptor pattern showcased significant performance enhancement over traditional queuing methods. Evaluation metrics include speed, cache utilisation, and statistical significance, among others. Techniques like Cache Warming and Constexpr showed the most significant gains in latency reduction. Future directions involve expanding the repository, testing the optimised trading algorithm in a live trading environment, and integrating the Disruptor pattern with the trading algorithm for comprehensive system benchmarking. The work is oriented towards academics and industry practitioners seeking to improve performance in latency-sensitive applications.
翻译:本研究旨在填补延迟关键型代码优化领域现存的知识空白,特别聚焦于高频交易(HFT)系统。研究最终形成三项核心贡献:构建低延迟编程知识库、优化市场中性统计套利配对交易策略、以及C++中Disruptor模式的实现。该知识库作为实践指南,辅以严谨的统计基准测试;交易策略优化使速度与盈利能力获得显著提升。相较于传统队列方法,Disruptor模式展现出显著性能优势。评估指标涵盖速度、缓存利用率及统计显著性等维度,其中缓存预热与Constexpr技术对延迟降低效果最为显著。未来方向包括扩展知识库、在实盘交易环境中测试优化后的交易算法,以及将Disruptor模式与交易算法集成以进行全面的系统基准测试。本研究面向寻求提升延迟敏感型应用性能的学术界与业界从业者。