Prof. Michael Kearns

NOTE: This is the archival site of the PLAT Project from the 2002-03 academic year. The active site for the 2003-04 project can be found here.

The following draft is perhaps the best overall introduction to the PLAT project:

  • The Penn-Lehman Automated Trading Project. With L. Ortiz. Preprint, 2003.

  • [Postscript] [Compressed Postscript] [PDF]


    The Penn-Lehman Automated Trading Project is a broad investigation of algorithms and strategies for automated trading in financial markets and related environments. The project makes use of the Penn Exchange Simulator, a simulator for automated trading that uses real-world, real-time stock market data available over modern Electronic Crossing Networks (ECNs). There is more discussion of ECNs and the Penn Exchange Simulator below. It is likely that we will initially organize the project either as a friendly competition in automated trading, or as smaller teams investigating certain types of automated trading, or as some mixture of these two alternatives.

    The Penn-Lehman Automated Trading Project receives generous financial and professional support from the Quantitative Trading group of Lehman Brothers in New York City.

    Eventually, the project will probably expand to the investigation of other kinds of markets and trading, some of which are also discussed below.

    Here is a PowerPoint overview of the project that I recently presented at MIT.

    Organization of this site:

  • NEWS AND NOTES (This is the main source of timely and detailed information about the project.)

    There will be links to other project material and pages sprinkled throughout.


    The primary personnel for the project are:

  • Michael Kearns,
  • Berk Kapicioglu,
  • Byoungjoon Kim,
  • Luis Ortiz,
  • Rashid Tuweiq,
    For any and all systems issues, you should send mail to, which will reach all five of us above.


    News and Notes was getting rather lengthy, so I have moved them to a separate page here.


    As of this writing (January 2003), I am actively seeking participants on the project. I anticipate that there will be a wide range of research opportunities, appropriate for doctoral and Masters students, undergraduate senior design projects, independent study courses, etc. I also expect that there will be interesting opportunities both on the automated trading strategy side and the Penn Exchange Simulator itself.

    If you have an interest in participating, please send me mail.


    I plan to hold fairly regular meetings for the project on Thursdays at 10 AM during Fall 2002. These meetings will be located in the main conference room of IRCS. IRCS is located on the fourth floor of 3401 Walnut (the building over Starbucks). Take the elevators to the fourth floor, go left out of the elevator, and left again through the glass doors of IRCS. The conference room is immediately on your left as you enter.


    The scientific and monetary lure of designing computer programs that automatically and autonomously trade in complex financial markets has a long and interesting history, and is an active area of investigation both in academic circles and on Wall Street. A variety of technology developments over recent years has made this field even more relevant and exciting. The sources of market data available to both consumers and brokerages are rapidly becoming faster, more detailed, and higher volume. This trend (combined with regulatory events such as the decimalization of stock prices) is making it more challenging for humans to profitably do certain kinds of trading: the volume and richness of relevant data is beyond comprehension. Simultaneously, there is increased sophistication in, and understanding of, algorithms that process and act on such high-volume data streams. Within artificial intelligence and computer science, there is even a community of researchers specifically interested in all types of trading agents and electronic commerce, which holds annual competitions and scientific conferences.

    Market Orders, Limit Orders, and Order Books

    Let's look at an example of one type of very interesting data that is becoming widely available, and is most relevant to the Penn Exchange Simulator. First, a little basic background on the stock market. Coarsely speaking, if you wanted to buy or sell 1000 shares of Microsoft stock, there are two kinds of order you could place: a market order or a limit order. A limit order is a request to buy or sell shares of a stock, but only at a specified price. If there is no matching seller or buyer willing to take the opposite side of the trade, a limit order is placed in the so-called order book. The order book can be thought of as a queue, ordered by competitiveness of price. Thus, at the top of the buy order book is the buy limit order currently offering the highest buy price, and the top of the sell order book is the sell limit order currently offering the lowest sell price. Limit orders in these two queues wait until a matching opposing offer arrives on the exchange, at which point the two sides are matched and the trade is executed. Note that overly agressive limit orders --- buy orders with low prices and sell orders with high prices --- may never be matched.

    A market order is a request to buy or sell shares "at the market price". What does this really mean? Broadly speaking (there are many details), it means that this order will be executed immediately by matching with the most competitive opposing offer in the order books. Thus, if you place a market order to buy shares of a stock, you will be matched with the limit order at the top of the sell order book. If you asked for more shares than that seller was offering, the remainder of your order will be matched with the next limit order in the sell book, etc.

    The details of how buy and sell market and limit orders are matched with each other is sometimes called the "market micro-structure". It's worth checking out the SEC's page on trade execution. Note that a market order is guaranteed to be matched, but there is uncertainty about the price you will receive; while a limit order ensures the price you will get if the order is matched, but it may never be matched.

    Electronic Crossing Networks

    The basic structure of order books and matching described above has been around for a long time in the major markets, predating the widespread use of computing, networking and communications technology on Wall Street. In the old days, the order books were kept on paper by some guy wearing a green visor and chomping on a cigar, with little sticky notes he would shuffle around to keep track of the queues. This is changing rapidly. In particular, there are now Electronic Crossing Networks (ECNs) that accept market and limit buy and sell orders over the Internet, and that maintain their order books and matching process in entirely automated fashion. What's even more interesting, and very relevant to our project and the Penn Exchange Simulator, is the fact that many of these ECNs are publishing the details of their order books in real time.

    Let's make this more concrete with a little demo. If you go to the web site of the ECN, in the upper right corner you will see a little text entry box labeled "BookViewer". In this box you can enter in the ticker symbol of any NASDAQ stock --- for instance, try entering MSFT (the ticker symbol for Microsoft) and hitting return. (This will only be interesting if you try it on a weekday between roughly 8 AM and 6 PM, when the markets are active.) This will cause a smaller window to pop up. This window essentially shows exactly the Island order books for the stock as described above: on the left you will see the buy limit orders currently outstanding, ordered by decreasing price, and on the right the sell limit orders, ordered by increasing price. Also provided are the price and time of the last match between a buyer and seller, and the total volume of activity for the day so far. On the toolbar at the top, if you keeping hitting "refresh" and you are looking at a highly active stock like MSFT or QQQ (the latter is a stock representing a mixture of NASDAQ stocks) during peak market hours, you will see the order books, last price, and volume change quite rapdily.

    There are at least two very interesting opportunities that arise from the availability of this kind of order book data. The first is automated trading strategies that use this data in a way that improves on traditional strategies, which only had access to the last price of the stock or the "inside market" (the orders on top of the buy and sell books). The second opportunity is market simulation that uses order book data in a realistic manner. The first opportunity is one that I expect we will investigate in the project. The second is the subject of the Penn Exchange Simulator.


    The Penn Exchange Simulator was designed and implemented by Prof. Kearns, Luis Ortiz, Byoungjoon Kim, and Berk Kapicioglu. We will get into more detail on the architecture and use of the simulator as necessary, but conceptually its operation is quite simple. The simulator is a real-time, real-data, order book simulator for any NASDAQ stock. On the one hand, the simulator repeatedly polls the Island web site, and downloads the most recent buy and sell books published there. These books are maintained internally by the simulator in its own buy and sell books, and these internal books are updated and cleaned in accordance with the changes shown on Island. On the other hand, the simulator accepts connections from automated trading agents that can, in real time, place "virtual" buy and sell orders.

    The simulator then runs the matching process described above, making no distinctions between the "real" orders from Island and the "virtual" orders placed by the trading agents. One or more trading agents can be simultaneously connected to the simulator, and thus agents' orders may match with each other, or with the real market data. The simulator runs a faithful matching process on this merged market, removing matched orders from the simulator queues, reducing the volume of partially matched orders, etc. The simulator also computes, again in real time, the profit and loss of each connected trading agent.

    The point to emphasize is that agents using the simulator are effectively trading against the real market (and possibly other agents), and in real time. There is no "model" of how the stock market behaves --- rather, the actual market is used in the simulation.

    The Penn Exchange Simulator arguably implements the most realistic simulation of the market and trading agents possible without actually risking any money. The primary way in which the simulator fails to capture reality is that if an agent's orders were truly placed on Island, these orders might change the behavior of the other parties trading on Island, as they would see these agent orders. For example, if I write an automated trading strategy that occasionally tries to sell huge volumes of stock, in the real market this might well cause a significant drop in the price. In the simulator, the real market strongly influences the simulation, but agent orders are not visible to the real market. We will spend some time discussing how we might address this issue.

    Status of the Simulator

    The simulator is actively working as the centerpiece of the project, and new functionality is added regularly. More details and the most recent API for trading clients can be found on the News and Notes page.


    Here I will collect links to research papers, projects, companies, etc. that seem relevant to our project. Some of these links are repeats of those in the text above.

    Electronic Crossing Networks

  • Island
  • Archipelago
  • NASDAQ SuperMontage --- Aggregated ECN
  • Analysis of ECN performance
  • Island ITCH and OUCH protocol specs
  • Island Order Book Visualizer

    Financial Markets

  • New York Stock Exchange

    Automated Trading Agents and Electronic Commerce

  • 2001 Trading Agent Competiton (includes link to 2000 event)
  • 2002 Trading Agent Competition
  • 2003 ACM Electronic Commerce Conference
  • Michigan Internet AuctionBot

    Market Simulators
    Here I will collect links to commercial and research financial market simulators that I come across; please let me know of interesting additions. All of the simulators I have found so far seem focused on human rather than automated trading, though some of them may support automated trading. It seems they are also heavily reliant on last price rather than order book simulation.

  • Cyber Trader Pro Simulator At first this one seemed interesting, suggesting that virtual order matching or ``filling'' will be based on the actual order books from the prior day's market. But then upon downloading I learned it matches orders randomly --- independent of price! Still, it's a fairly realistic GUI of the type traders might actually see.
  • Speedtrader Simulator This one seems similar. I have not tried it.
  • Thinkquest There seem to be a number of sites like this market simulation game designed for classes, which comes complete with reports generated for the instructor.

    Technical Trading Strategies
    Here is a collection of links on trading strategies and types.

    Research Papers

  • Parlour paper on "Price Dynamics in Limit Order Markets"
  • Hasbrouck and Saar paper on "Limit Orders and Volatility in a Hybrid Market: the Island ECN"
  • Biais et al. paper on "Imperfect Competition in Financial Markets: Island vs. NASDAQ"
    (Thanks to Oliver Hansch of Penn State for pointing out the above references.)