🤖 AI Summary
This work addresses the challenge of balancing predictive accuracy and ultra-low latency in algorithmic trading by proposing to offload limit order book–based machine learning inference tasks onto programmable network switches, enabling real-time price prediction directly within the network data plane. The approach innovatively performs both order book reconstruction and inference inside the switch hardware and introduces a hybrid deployment architecture that coordinates switches with backend servers. Experimental results demonstrate that, compared to an all-server baseline, the system reduces end-to-end latency to the microsecond range—improving by over 10%—while processing 38% of potentially valuable trades directly in-switch. Notably, this performance gain incurs only a marginal increase in prediction error rate of approximately 3%, thereby achieving substantial improvements in throughput and responsiveness without significantly compromising model accuracy.
📝 Abstract
Machine learning is significantly transforming algorithmic trading, yet the requirement for rapid execution speeds persists. While both aspects aim to boost profitability, embedding advanced machine-learning techniques with reduced trading latency presents a notable challenge. Adopting in-network machine learning, which involves offloading inference to programmable network devices, offers a delicate equilibrium in this trade-off. In this paper, we present LOBIN, a solution that utilizes machine learning within the network for market prediction based on high-frequency market data feeds. LOBIN is adept at constructing limit order books and performing inference directly within programmable switches. When compared to server-based benchmarks, LOBIN not only predicts future stock price movements with higher throughput but also maintains robust machine learning performance. It achieves over a 10% reduction in latency compared to the NASDAQ order-matching server benchmark and delivers microsecond-level latency. Furthermore, the machine learning performance of LOBIN can be further enhanced through the adoption of a hybrid deployment approach that integrates both the switch and the servers. Our evaluation demonstrates that among all data feeds of evaluated stocks, the application of hybrid deployment results in approximately 45% of the traffic and 38\% of the total potential transaction value being processed within switches without server intervention, reducing latency while ensuring that the average change in error rate of predictions remains at around 3% relative to benchmarks based solely on server use.