Monday, June 10, 2013

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

Design and Analysis of A Distributed Multi-leg Stock Trading System1 Design and Analysis of A Distributed Multi-leg Stock Trading System Jia Zou1, Gong Su2, Arun Iyengar2, Yu Yuan1, Yi Ge1 1IBM Research – China; 2IBM T. J. Watson Research Center 1{ jiazou, yuanyu, geyi }@cn.ibm.com; 2{ gongsu, aruni }@us.ibm.com Abstract: 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 zSeries eServer mainframes. Our experimental results show that the look-ahead optimization can improve throughput by 58% and reduce latency by 30%. Keywords- computer-driven trading, distributed coordination, multi-leg trading, transaction processing, two-phase commit. I. INTRODUCTION Electronic stock and commodity trading has revolutionized financial markets. Major stock exchanges such as the NYSE and NASDAQ handle large volumes of requests electronically. These exchanges must handle high request rates, serve requests with low latencies, and be highly available. Because of the need for high performance, the systems are designed for requests involving single stocks and not requiring coordination among multiple stocks which can add considerable overhead. There is considerable interest in multi-leg stock trading in which multiple stocks are traded atomically in the same transaction. To illustrate the problem, consider the following multi-leg order: “buy 200 shares of IBM at price ≤ $130, sell 100 shares of HPQ at price ≥ $30, and buy 300 shares of MSFT at price ≤ $20.” This multi-leg order will not trade unless stock prices for IBM, HPQ, and MSFT allow each order on an individual stock, known as a leg, to execute. If the multi- leg order is tradable, then all legs are executed atomically. The key issue is that in order to determine if the entire multi-leg order is tradable and to execute it atomically, trading on all three stocks has to be suspended for a period of time. This reduces performance considerably. Currently, stock exchanges do not support automated multi- leg trading of this type due to the overhead and complexity. A transaction of this type would have to be executed by a human. Stock exchanges and investment banks are aware of the fact that true automatic multi-leg trading would bring significant business value if it could be efficiently implemented. Among other things, it will enable investors to submit and trade only one order rather than multiple related orders with significantly lower transaction cost and enhance existing financial...

Website: researcher.watson.ibm.com | Filesize: 591kb
No of Page(s): 12
Download Design and Analysis of A Distributed Multi-leg Stock Trading System.pdf

No comments:

Post a Comment