Design and Analysis of a Distributed Multi-leg Stock Trading System

We present the design, optimization and analysis of a highly flexible and efficient multi-leg stock trading system. Automated electronic multi-leg trading allows atomic processing of consolidated orders such as "Buy 200 shares of IBM and sell 100 shares of HPQ". While the expressive power of multi-leg trading brings significant value to investors, it also poses major challenges to stock exchange architecture design, due to additional complexities introduced in performance, tradability, and fairness. Performance can be significantly worse due to the need to coordinate transactions among multiple stocks at once. This paper studies the performance of multi-leg trading under different fairness constraints and variability in order price and order quantity. We identify the major performance bottlenecks when using traditional atomic commitment protocols such as 2-Phase Commit (2PC), and propose a new look-ahead algorithm to maximize transaction concurrency and minimize performance degradation. We have implemented a base-line 2PC prototype and a look-ahead optimized prototype on IBM z10 z Series e Server mainframes. Our experimental results show that the look-ahead optimization can improve throughput by 58% and reduce latency by 30%.

[1]  Mudhakar Srivatsa,et al.  ExchangeGuard: a distributed protocol for electronic fair-exchange , 2005, 19th IEEE International Parallel and Distributed Processing Symposium.

[2]  Robert Griesemer,et al.  Paxos made live: an engineering perspective , 2007, PODC '07.

[3]  Patrick Valduriez,et al.  Principles of Distributed Database Systems , 1990 .

[4]  D. Parkes,et al.  Auctions, Bidding and Exchange Design , 2004 .

[5]  Masaru Kitsuregawa,et al.  Speculative locking protocols to improve performance for distributed database systems , 2004, IEEE Transactions on Knowledge and Data Engineering.

[6]  Jayant R. Haritsa,et al.  Revisiting commit processing in distributed database systems , 1997, SIGMOD '97.

[7]  Michael Stonebraker,et al.  A Formal Model of Crash Recovery in a Distributed System , 1983, IEEE Transactions on Software Engineering.

[8]  Patrick Valduriez,et al.  Principles of distributed database systems (2nd ed.) , 1999 .

[9]  Patrick Valduriez,et al.  StreamCloud: A Large Scale Data Streaming System , 2010, 2010 IEEE 30th International Conference on Distributed Computing Systems.

[10]  Michael J. Fischer,et al.  The Consensus Problem in Unreliable Distributed Systems (A Brief Survey) , 1983, FCT.

[11]  Michel Gendreau,et al.  Série Scientifique Scientific Series Models for Bundle Trading in Financial Markets Models for Bundle Trading in Financial Markets , 2022 .

[12]  Andrew B. Whinston,et al.  The Design and Development of a Financial Cybermarket with a Bundle Trading Mechanism , 1999, Int. J. Electron. Commer..

[13]  Sven de Vries,et al.  Combinatorial Auctions: A Survey , 2003, INFORMS J. Comput..

[14]  Weimin Du,et al.  A paradigm for concurrency control in heterogeneous distributed database systems , 1990, [1990] Proceedings. Sixth International Conference on Data Engineering.

[15]  Arun Iyengar,et al.  A highly available transaction processing system with non-disruptive failure handling , 2012, 2012 IEEE Network Operations and Management Symposium.

[16]  Daniel J. Abadi,et al.  Low overhead concurrency control for partitioned main memory databases , 2010, SIGMOD Conference.

[17]  David Porter,et al.  Combinatorial auction design , 2003, Proceedings of the National Academy of Sciences of the United States of America.

[18]  Miron Livny,et al.  Parallelism and concurrency control performance in distributed database machines , 1989, SIGMOD '89.

[19]  Danny Dolev,et al.  On the minimal synchronism needed for distributed consensus , 1983, 24th Annual Symposium on Foundations of Computer Science (sfcs 1983).

[20]  Dale Skeen,et al.  Nonblocking commit protocols , 1981, SIGMOD '81.

[21]  Yoav Raz The Principle of Commitment Ordering, or Guaranteeing Serializability in a Heterogeneous Environment of Multiple Autonomous Resource Mangers Using Atomic Commitment , 1992, VLDB.

[22]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[23]  Robert Gruber,et al.  Efficient optimistic concurrency control using loosely synchronized clocks , 1995, SIGMOD '95.

[24]  Ibm Redbooks IBM System Z10 Enterprise Class Technical Guide , 2009 .

[25]  Andrew B. Whinston,et al.  A Web-Based Financial Trading System , 1999, Computer.