A cloud-native globally distributed financial exchange simulator for studying real-world trading-latency issues at planetary scale

  • Bradley Miles  ,
  • Dave Cliff  
  • a,b Department of Computer Science, University of Bristol, Bristol BS8 1UB, UK
Cite as
Miles B., Cliff D. (2019). A cloud-native globally distributed financial exchange simulator for studying real-world trading-latency issues at planetary scale. Proceedings of the 31st European Modeling & Simulation Symposium (EMSS 2019), pp. 294-303. DOI: https://doi.org/10.46354/i3m.2019.emss.042.

Abstract

We describe a new public-domain open-source simulator of an electronic financial exchange, and of the traders that interact with the exchange, which is a truly distributed and cloud-native system that been designed to run on widely available commercial cloud-computing services, and in which various components can be placed in specified geographic regions around the world, thereby enabling the study of planetary-scale latencies in contemporary automated trading systems. The speed at which a trader can react to changes in the market is a key concern in current financial markets but is difficult to study latency issues using conventional market simulators, and is extremely difficult to study "in the wild" because of the financial and regulatory barriers to entry in conducting experimental work on real financial exchanges. Our simulator allows an exchange server to be launched in the cloud, specifying a particular geographic zone for the cloud hosting service; automated-trading clients which attach to the exchange can then also be launched in the cloud, in the same geographic zone and/or in different zones anywhere else on the planet, and those clients are then subject to the real-world latencies introduced by planetary-scale cloud communication interconnections. In this paper we describe the design and implementation of our simulator, called DBSE, which is based on a previous public-domain simulator, extended in ways that are partly inspired by the architecture of the real-world Jane Street Exchange. DBSE relies fundamentally on UDP and TCP network communications protocols and implements a subset of the FIX de facto standard protocol for financial information exchange. We show results from an example in which the exchange server is remotely launched on a cloud facility located in London (UK), with trader clients running in Ohio (USA) and Sydney (Australia). We close with discussion of how our simulator could be further used to study planetary scale latency arbitrage in financial markets.

References

  1. Arnuk, S., & Saluzzi, J., 2012. Broken Markets: How High-Frequency Trading and Predatory Practices on Wall St are Destroying Investor Confidence and your Portfolio. Financial Times / Prentice Hall.
  2. AWS, 2019. Amazon Web Services: Amazon Cognito. https://aws.amazon.com/cognito/.
  3. Bodek, H. & Dolgopolov, S, 2015. The Market Structure Crisis: Electronic Stock Markets, High Frequency Trading, and Dark Pools. CreateSpace Publishing. Cartea, A., Jaimungal, S., & Penalva, J., 2015. Algorithmic and High-Frequency Trading. Cambridge University Press.
  4. BSE, 2012. The Bristol Stock Exchange. On GitHub at github.com/davecliff/BristolStockExchange
  5. Cliff, D., 1997. Minimal-Intelligence Agents for Bargaining Behaviours in Market-Based Environments. Hewlett-Packard Labs Technical Report HPL-97-91.
  6. Cliff, D. 2009. ZIP60: Further explorations in the evolutionary design of trader agents and online auction-market mechanisms. IEEE Transactions in Evolutionary Computation, 13(1): 3-18.
  7. Cliff, D., 2018a. BSE: A Minimal Simulation of a Limit-Order-Book Stock Exchange. In: M. Affenzeller, A. Bruzzone, et al. (eds) Proceedings of the European Modelling and Simulation Symposium (EMSS2018), pp.194-203.
  8. Cliff, D., 2018b. “An Open-Source Limit-Order-Book Exchange for Teaching and Research.” Proc. IEEE Symposium on Computational Intelligence in Financial Engineering (CIFEr), pp.1853--1860.
  9. Cliff, D., 2019. “Exhaustive Testing of Trader-agents in Realistically Dynamic Continuous Double Auction Markets: AA Does Not Dominate”. In: A. Rocha et al. (eds) Proceedings of the 11th International Conference on Agents and Artificial Intelligence (ICAART 2019), Vol.2: 224-236; ScitePress.
  10. CTA, 2018. Securities Information Processor. https://www.ctaplan.com/index, 2018.
  11. Das, R., Hanson, J., Kephart, J., & Tesauro, G., 2001. “Agent-Human Interactions in the Continuous Double Auction”. Proc. International Joint Conference on AI. (IJCAI’01), pp.1169-1176.
  12. De Luca, M., & Cliff, D., 2011. Human-Agent Auction Interactions Adaptive-Aggressive Agents Dominate. Proceedings of the International Joint Conference on AI (IJCAI-2011), pp.178-185.
  13. De Luca, M., 2015. Adaptive Algorithmic Trading Systems. PhD Thesis, University of Bristol, UK.
  14. Duffin, M., & Cartlidge, J., 2018. Agent-Based Model Exploration of Latency Arbitrage in Fragmented Financial Markets. In Proc. 2018 IEEE Symposium on Computational Intelligence for Financial Engineering and Economics (CIFEr-2018).
  15. FIX, 1992. Financial Information Exchange Protocol. https://www.fixtrading.org.
  16. Gjerstad, S. & Dickhaut, J., 1998. Price Formation in Double Auctions. Games & Economic Behavior, 22(1):1-29.
  17. Gjerstad, S., 2003. The Impact of Pace in Double Auction Bargaining. Working Paper, Department of Economics, University of Arizona.
  18. Gode, D. & Sunder, S., 1993. Allocative efficiency of markets with zero-intelligence traders: Market as a partial substitute for individual rationality. Journal of Political Economy, 101(1):119-137.
  19. Haldane, A., 2011. The Race to Zero. Transcript of a speech given to International Economic Association Sixteenth World Congress. Available from https://www.bis.org/review/r110720a.pdf
  20. Harris, L., 2002. Trading and Exchanges: Market Microstructure for Practitioners. Oxford University Press.
  21. Jane Street, 2017. How to Build an Exchange. https://www.janestreet.com/tech-talks/
  22. Kagel, A., & Roth, J., 1997. The Handbook of Experimental Economics. Princeton University Press.
  23. Kagel, A., & Roth, J., 2016. The Handbook of Experimental Economics, Volume 2. Princeton University Press.
  24. Miles, B., 2019. Architecting and Implementing a Globally Distributed Limit Order Book Financial Exchange for Research and Teaching. MEng Thesis, University of Bristol.
  25. Narang, R., 2013. Inside the Black Box: The Simple Truth about Quantitative Trading. 2nd Ed. Wiley Finance.
  26. Palmer R., Rust, J., & Miller, J. 1992. Behavior of Trading Automata in a Computerized Double Auction Market. In D. Friedman, & J. Rust (Eds.), Double Auction Markets: Theory, Institutions, Laboratory Evidence. Addison Wesley.
  27. Patterson, S., 2013. Dark Pools: The Rise of AI Trading Machines. Random House.
  28. Pentapalli, M., 2008. A comparative study of Roth-Erev and Modified Roth-Erev reinforcement learning algorithms for uniform-price double auctions. PhD Thesis, Iowa State University.
  29. Rodgers, K., 2016. Why Aren’t They Shouting? A Banker's Tale of Change, Computers, and Perpetual Crisis. RH Business Books / Cornerstone Digital.
  30. Smith, V., 1992. Papers in Experimental Economics. Cambridge University Press.
  31. Stotter, S., Cartlidge, J., and Cliff, D. 2013. “Exploring assignment-adaptive (ASAD) trading agents in financial market experiments”, Proceedings ICAART2013, 1:77-88.
  32. Tesauro, G. and Das, R. 2001. “High-performance Bidding Agents for the Continuous Double Auction”. Proceedings of the 3rd ACM Conference on Electronic Commerce, pp.206-209.
  33. Tesauro, G. and Bredin, J., 2002. “Sequential Strategic Bidding in Auctions using Dynamic Programming”. In Proceedings AAMAS 2002.
  34. Vytelingum,P., 2006. The Structure and Behaviour of the Continuous Double Auction. PhD Thesis, University of Southampton.
  35. Vytelingum, P., Cliff, D., & Jennings, N., 2008. “Strategic Bidding in Continuous Double Auctions”. Artificial Intelligence, 172(14):1700-1729.
  36. Wah, E. & Wellman, M., 2013 “Latency arbitrage, market fragmentation, and efficiency: a two-market model,” in Proc. 14th ACM Conference on Electronic Commerce, pp. 855–872.