ML-Based Smart Order Router for Best Price Selection

Authors

  • Kartik Parmar

Keywords:

Smart Order Routing, Machine Learning, Algorithmic Trading, High-Frequency Trading, Limit Order Book, Random Forest, Logistic Regression, Best Price Selection.

Abstract

The rapid growth of electronic financial markets has resulted in a surge in the demand for sophisticated trade execution systems that minimise transaction cost and optimise execution quality. Traditional Smart Order Routing (SOR) systems mainly rely on pre-defined rule-based algorithms that are often insufficient to deal with fast changing market environments, such as those with changes in trade volume, bid-ask spreads, liquidity and price volatility. To address these limitations, this study proposes a Machine Learning (ML)-based Smart Order Router for optimal price selection utilising high frequency limit order book data. The proposed approach extracts market indicators including reconstructed bid and ask prices, liquidity, order imbalance, relative spread, trading volume and market volatility, and conducts extensive data pretreatment and feature engineering. A simulated multi-exchange environment is created to evaluate execution costs across several trading venues to automatically generate best routing labels based on the lowest execution cost. Then, supervised machine learning models, Random Forest and Logistic Regression, are used to predict the best execution location of incoming orders. An experimental evaluation using a high-frequency Bitcoin limit order book dataset shows that the Random Forest classifier gets an accuracy of 99.9985%, slightly outperforming the Logistic Regression with an accuracy of 99.9981%. The analysis of feature importance shows that the routing decisions are mostly dependent on market volatility followed by normalised volatility and relative bid-ask spread. We further compare our proposed framework with a traditional rule-based router to demonstrate the efficiency of the proposed framework in learning routing decisions from past market features. The proposed method is applicable to real multi-exchange trading scenarios and provides a scalable and data-driven basis for intelligent order routing.

Downloads

Download data is not yet available.

References

Á. Cartea, S. Jaimungal, and J. Penalva, Algorithmic and High-Frequency Trading. Cambridge University Press, 2015.

I. Aldridge, High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems, 2nd ed. Wiley, 2013.

R. Cont, A. Kukanov, and S. Stoikov, “The price impact of order book events,” Journal of Financial Econometrics, vol. 12, no. 1, pp. 47–88, 2014.

D. Bertsimas and A. W. Lo, “Optimal control of execution costs,” Journal of Financial Markets, vol. 1, no. 1, pp. 1–50, 1998.

Z. Zhang, S. Zohren, and S. Roberts, “DeepLOB: Deep convolutional neural networks for limit order books,” IEEE Transactions on Signal Processing, vol. 67, no. 11, pp. 3001–3012, 2019.

A. Briola, J. Turiel, and T. Aste, “Deep learning modeling of limit order books: A comparative perspective,” IEEE Access, vol. 9, pp. 84458–84469, 2021.

R. Kissell, The Science of Algorithmic Trading and Portfolio Management. Academic Press, 2014.

M. O’Hara, Market Microstructure Theory. Blackwell Publishers, 1995.

J. Hasbrouck, Empirical Market Microstructure. Oxford University Press, 2007.

M. D. Gould, M. A. Porter, S. Williams, M. McDonald, D. J. Fenn, and S. D. Howison, “Limit order books,” Quantitative Finance, vol. 13, no. 11, pp. 1709–1742, 2013.

F. Abergel, A. Capponi, B. K. Chakrabarti et al., Eds., Limit Order Books. Cambridge University Press, 2016.

L. Harris, Trading and Exchanges: Market Microstructure for Practitioners. Oxford University Press, 2003.

J.-P. Bouchaud, J. Bonart, J. Donier, and M. D. Gould, Trades, Quotes and Prices: Financial Markets Under the Microscope, 2nd ed. Cambridge University Press, 2018.

R. Cont, “Statistical modeling of high-frequency financial data,” IEEE Signal Processing Magazine, vol. 28, no. 5, pp. 16–25, 2011.

P. N. Kolm, J. Turiel, and N. Westray, “Deep order flow imbalance: Extracting alpha at multiple horizons from the limit order book,” Mathematical Finance, vol. 33, no. 4, pp. 1044–1081, 2023.

S. Gu, B. Kelly, and D. Xiu, “Empirical asset pricing via machine learning,” The Review of Financial Studies, vol. 33, no. 5, pp. 2223–2273, 2020.

M. Dixon, I. Halperin, and P. Bilokon, Machine Learning in Finance. Springer, 2020.

T. Fischer and C. Krauss, “Deep learning with long short-term memory networks for financial market predictions,” European Journal of Operational Research, vol. 270, no. 2, pp. 654–669, 2018.

J. Sirignano and R. Cont, “Universal features of price formation in financial markets: Perspectives from deep learning,” Quantitative Finance, vol. 19, no. 9, pp. 1449–1459, 2019.

E. Fons, P. Dawson, and S. Zohren, “Financial trading as a machine learning problem: A survey,” Artificial Intelligence Review, 2021, Survey article.

J. Zou, Q. Zhao, Y. Jiao, H. Cao et al., “Stock market prediction via deep learning techniques: A survey,” arXiv preprint arXiv:2212.12717, 2023.

M. Mangat et al., “High-frequency trading with machine learning algorithms and limit order book data,” Machine Learning with Applications, vol. 8, p. 100252, 2022.

Downloads

Published

29.02.2024

How to Cite

Kartik Parmar. (2024). ML-Based Smart Order Router for Best Price Selection. International Journal of Intelligent Systems and Applications in Engineering, 12(14s), 799–820. Retrieved from https://ijisae.org/index.php/IJISAE/article/view/8582

Issue

Section

Research Article