The Penn-Lehman Automated Trading Project Michael Kearns Computer and Information Science University of Pennsylvania PLAT development team: Luis Ortiz, Berk Kapicioglu, Byoungjoon Kim, Rashid Tuweiq What Is It? • A project in real-time, automated trading in financial markets • A realistic, multi-client market simulator using live and historical depth-of-market data • A competitive testbed for trading strategies • An investigation of order book strategies • An investigation of AI & ML methods for automated trading • A research and educational partnership between Penn and Lehman Brothers Market Microstructure and Depth-of-Market • Consider an exchange for some specific security (e.g. MSFT stock) • Market order: specify number of shares desired, but leave price to “the market” • Limit order: specify number of shares and desired price (usually away from the market) • Limit orders are placed in a queue (or “book”) on the buy or sell side, ordered by price • Market orders are matched with the top of the book on the opposing side, giving price • Market orders “guaranteed” transaction but not price; limit orders guaranteed price but not transaction Electronic Crossing Networks (ECNs) • Matching process as old as financial markets • Previously done manually (NYSE specialists) • Electronic Crossing Networks (ECNs): – Automate matching process – Now publishing order book data – Can be highly liquid • Examples: Island (17% of NASDAQ volume), Instinet, Archipelago,… • Consolidation efforts (SuperMontage) • OUCH and ITCH messaging protocols • Example: island.htm or http://www.island.com/ The Penn Exchange Simulator (PXS) • A (conceptually) simple, real-time market simulator exploiting order book data • Core processes: – Data Gathering: frequent (live or historical) polling of any given stock from www.island.com – Client Order Processing: acceptance of connections and limit orders from automated clients via API – Market Simulation: simulation of matching process in a virtual market merging the Island and client data; computation of profit and loss of clients LAST MATCH Pric e 23.7790 9:01:55.61 4 BUY ORDERS TODAY'S ACTIVITY Orders 1,630 Volume 44,839 PXS Time SELL ORDERS SHA RES PRICE SHA RES PRICE 1,00 0 23.760 0 100 23.780 0 3,08 7 23.750 0 800 23.799 0 200 23.750 0 500 23.800 0 100 23.740 0 1,72 0 23.807 0 1,72 0 23.728 0 900 23.819 0 2,00 0 23.720 0 200 23.850 0 1,00 0 23.700 0 1,00 0 23.850 0 100 23.700 0 1,00 0 23.850 0 100 23.700 0 1,00 0 23.860 0 800 23.697 0 200 24.000 0 500 23.650 0 500 24.000 Client 1 BUY SELL V 23.80 I 23.78 I 23.80 I 23.80 V 23.80 I 23.81 V 23.82 V 23.83 V 23.84 I 23.85 I 23.85 I 23.86 V 23.89 V 23.90 V 23.97 V 24.00 V 23.77 I 23.76 I 23.75 I 23.75 V 23.74 I 23.74 V 23.74 V 23.73 I 23.73 Client 2 Client 3 early-snap.txt later-snap.txt pxsAPI9.htm Features of PXS • • • • • • • Simulation merges real market data with client No guesses or models for limit order fills Permits investigation of order-book strategies Permits high-speed, high volume trading Forces real-time performance Sandbox for diverse strategies & interaction Execute “live” on real-time data or historical Design Challenges • • • • • Data volume, network latency, performance Timing issues in live versus historical Partial observability of Island queues Client impact on market Future functionality: – – – – Multi-stock simulation External data feeds Web interface and GUI Multiple ECNs; other markets (futures, options) The Project: Participants • Penn Development Team: – – – – PXS design, development, maintenance Client strategy design Education of student researchers/users Competition design and execution • Students: – Approximately 30 students designing 13 strategies – Many senior projects; many joint CIS-Wharton – Several external participants (UTexas and CMU) • Lehman: – Financial support from proprietary trading – Student mentorship and competition judging Goals for the Trading Strategies and Competitions • Attempt to recreate Wall Street “biodiversity” • Market making, pairs trading, VWAP, block trading, technical strategies, etc. • Investigate predictive value of order book data • Investigate application of AI and ML methods • Create a library of strategies and competition structures for mix and match experimentation Strategy Types • Many order-book strategies: – order book imbalance and variations obi.gif or Island Individual Investors • Market-making strategies • Traditional technical strategies: – various “breakout” strategies, trend spotting, etc. – often with order-book modulation • Machine learning strategies using order books – boosting – case-based learning – SVMs The Competitions • All have share position limits • Fall 2002 Historical MSFT Competition hist2002.html • Fall 2002 Live MSFT Competition (1-day) LiveComp.htm red-smooth250.ps blue-smooth250.ps • Order-book Face-off obonly.html • Currently: 3-round, 3-week MSFT Competition FebComp.htm Further Info • • • • General: www.cis.upenn.edu/~mkearns/ PLAT: www.cis.upenn.edu/~mkearns/projects/pat.html mkearns@cis.upenn.edu New participants welcome!