Chapter 03 – Algorithm Wars

Algorithmic Trading Strategies and Automated Stock Trading

“How about a nice game of chess?” — WOPR computer in “War Games”

There used to be two market structures for U.S. equity traders to contend with: the NYSE (for listed stocks) and NASDAQ. Recent counts put the number at roughly 40. Many are sources of dark liquidity, which sounds like red wine, but actually refers to market systems that allow (or require) hidden interest.(1)

This chapter goes into more depth on the flowering of electronic market access. Programs that started out as simple electronic order pads so brokers wouldn’t have to bother with their paper slips(2) for small orders are now complex software entities that game against each other in an ever more complex and fragmented equity market.

Here we look at how the meanest, smartest algorithms (aka algos) on the street got that way, and at the even meaner, smarter algorithms that will replace them. The Cold War is history, but there’s an arms race underway in securities algo trading. It started in the 1980s, and shows no signs of slowing down.

An early form of direct market access

Readers of a certain age and juvenile sensibility are no doubt familiar with Mad magazine’s “ Spy vs. Spy ” cartoons, which have run continuously This chapter is an expanded version of an article, “Algo vs. Algo,” that appeared in Institutional Investor Alpha magazine (February 2007). Reprinted by permission. since 1961 in the “Joke and Dagger” department. We see the spies, identical except for the color of their coats and hats, engage in an endless series of elaborate schemes to gain an advantage. Mad’s spies use an assortment of daggers, explosives, poisons, military hardware, and Rube Goldberg schemes in their war. The battle for supremacy in algorithmic execution uses an assortment of mathematics, programming, communications, computing hardware, and, yes, Rube Goldberg schemes.

It’s worthwhile to understand the simpler beginnings of electronic trading to better appreciate today’s elaborate systems, and the more elaborate systems that will replace them. When market systems involved chalkboards, shouting, hand signals, and large paper limit order books, there was no possibility of using a computer to execute trades. This changed in 1976, when the NYSE introduced the Designated Order Turnaround (DOT) system, the first electronic execution system. It was designed to free specialists and traders from the nuisance of 100-share market orders. The NASDAQ market, started in 1971, used computers to display prices, but relied on telephones for actual transactions until 1983 with the introduction of the Computer Assisted Execution System (CAES), and the Small Order Execution System (SOES) in 1984.

Simultaneous improvements in market data dissemination allowed computers to be used to access quote and trade streams. The specialists at the NYSE had a major technology upgrade in 1980, when the specialist posts themselves, which had not changed since the 1920s, were made electronic for the first time, dramatically reducing the latencies in trading. A study(3) of trading before and after the upgrade found major improvements in market quality.

Early electronic execution channels were for only the smallest market orders. But the permitted sizes grew quickly. Support for limit orders was added. DOT became SuperDOT. And the tool was adapted for direct use by the buy side, first by the little guys — a joint venture between Dick Rosenblatt and a technology provider, Davidge Data (more on that later) — and later by the big boys, who gave the product away for clearing business. It and the automated NASDAQ systems accommodated ever larger orders. Orders exceeding the size limits for automation were routed to specialists and market makers.

This was algorithmic trading without algorithms, an early form of direct market access. The first user interfaces were for one stock at a time, electronic versions of simple, single paper buy and sell slips. This became tedious, and soon execution capabilities for a list of names followed. Everyone was happy to be able to produce and screen these lists using their new Lotus 1-2-3 spreadsheets, which totaled everything up nicely to avoid costly errors.

We were only a step away from algorithmic trading. Programmers at the order origination end grew more capable and confident in their abilities to generate and monitor an ever larger number of small orders. Aha! Algo trading had snuck up on us.

Algos for Alpha to deliver superior automated trading performance via quantitative hedge funds

Early adopters of these ideas were not looking to minimize market impact or match volume – weighted average price (VWAP). They were looking to make a boatload of cash, and willing to commit firm capital to do so.(4) Nunzio Tartaglia, a Jesuit-educated Ph.D. physicist with the vocabulary of a sailor, started an automated trading group at Morgan Stanley in the mid-1980s. He hired young Columbia computer science professor David Shaw.

At first, a few papers about hooking Unix systems to market systems emerged. Then the former academics realized there was no alpha in publications. Shaw went on to found D.E. Shaw & Company, one of the largest and most consistently successful quantitative hedge funds. Fischer Black’s Quantitative Strategies Group at Goldman Sachs were algorithmic trading strategies pioneers. They were perhaps the first to use computers for actual trading, as well as for identifying trades.

The early alpha seekers were the first combatants in the algo wars. Pairs trading, popular at the time, relied on statistical models. Finding stronger short-term correlations than the next guy had big rewards. Escalation beyond pairs to groups of related securities was inevitable. Parallel developments in futures markets opened the door to electronic index arbitrage trading.

Automated market making was a valuable early algorithm strategy

Automated market making was a valuable early algorithm. In quiet, normal markets buying low and selling high across the spread was easy money. Real market makers have obligations to maintain a two-sided quote for their stocks, even in turbulent markets, which is often expensive. Electronic systems, without the obligations of market makers, not only were much faster at moving quotes, they could choose when not to make markets in a stock. David Whitcomb, founder of Automated Trading Desk (ATD),(5) another algorithm trading pioneer, describes his firm’s activity as “playing NASDAQ like a piano.”

There were other piano players. Morgan Stanley’s trading desk transformed into an automated market making system. Along with firms like Getco, Tradebot, and ATD, they came to dominate the inside quote and liquidity in the largest names today. Joe Gawronski, president of Rosenblatt Securities at the NYSE, sees a massive change in market structure brought about by these algo wars.

Faster data feeds and faster computation let you run ahead of the other kids in line. This was a time when the lag between one desktop data feed and another might be as much as 15 minutes. The path from market event to screen event had significant delays. Slow computers, sending information to slow humans over slow lines, were easy marks for early algo warriors willing to buy faster machinery and smart enough to code the programs to use it. This aspect of the arms race continues unabated today.

Algos for the Buy Side: Transaction Cost Control

It didn’t take long to notice that these new electronic trading techniques had something to offer to the buy side. Financial journals offered a stream of opinion, theory, and analysis of transaction costs. Firms like Wayne Wagner’s Plexus Group — now part of Investment Technology Group, Inc. (ITG) — made persuasive, well – supported arguments about the importance of transaction costs. Pension plan sponsors, sitting at the top of the financial food chain, were convinced in large numbers. Index managers did not have to be convinced. With no alpha considerations in the picture, they observed that it was possible to run either a lousy index fund or a particularly good one. The difference was the cost of trading. Those passive managers, on their way to becoming trillion-dollar behemoths, were high-value clients to brokers.

>>>>>> READ MORE HERE < <<<<<<


1. Rosenblatt Securities, at, maintains one of the most complete public sites for information on the fast-changing world of dark liquidity.

2. White slips were used for buy orders, pink for sells. Index arbitrage, a strategy that would buy or sell a basket of index (e.g., S & P 500) stocks and a simultaneous opposite position in the index futures, was just getting started at this time. Index arbitrageurs would bring their hundreds of order slips to the floor in wheelbarrows. So as not to signal whether they were buyers or sellers, they would have pairs of wheelbarrows, one with white slips and one with pink, ready at the edge of the trading floor. This got old fast, and the index arbs were eager early adopters of electronic trading.

3. “The Impact of Trading Technology: Evidence from the 1980 Post Upgrades,” December 2006 working paper by D. Easley (Cornell), T. Hendershott (Berkeley), and T. Ramadori (Oxford),

4. This is a form of alpha, profits from trading and investing. In this case, the holding periods were extremely short. A long – term investment might be an hour. Contrast this with agency trading, which is a pure fee-for-service activity, with revenue coming in the form of commissions. Alpha comes in many forms, and is the subject of Part Two of this book.

5. Automated Trading Desk has an appropriately snazzy web site:

6. Best bid and offer, the inside quote. It consists of four numbers: bid price, bid size, ask price, and ask size.

7. “The Hybrid” refers to the NYSE’s ongoing effort to find a way to accommodate human and machine traders in the same market. It is something of a moving target, as various approaches are tried and modified. The handheld electronic device seen on the floor of late is part of this.

8. IBM Business Consulting Services, “The Trader Is Dead, Long Live the Trader” (2006).

9. . Finextra is a great bargain, a zero-cost, high-quality news update on global electronic markets with no spam and with good reporting.

10. . This is the source for the cover of this book.

11. Wombat Financial Software ( ) is a big arms dealer in the algo wars, sort of the Adnan Khashoggi of low-latency finance. The firm was purchased by the NYSE in 2008.

12. The Securities Industry Automation Corporation is the place where the consolidated tape gets consolidated. Once the mother of all market data, it has a long history as the market data arm of the New York exchanges, back to the New York Quotation Company, formed in 1889. The current firm was formed in 1972. NYSE Group acquired the part it didn’t already own in 2006.

13. From the skepticism displayed by the spell-checker, disintermediate is not universally regarded as a word in English. It should be; it is a key idea in many aspects of Internet commerce.

14. Dimitris Bertsimas and Andrew W. Lo, “Optimal Control of Execution Costs,” Journal of Financial Markets 1 (1998): 1 – 50,

15. Robert Almgren and Neil Chriss, “Optimal Execution of Portfolio Transactions,” Journal of Risk 3, no. 2 (Winter 2000/2001). Almgren calls this “the most cited, least read paper in algo trading” ( )

16. Elizabeth Corcoran is the author of an excellent series of photo articles on robotics in Forbes (September 4, 2006).

17. Michael Wooldridge, An Introduction to MultiAgent Systems (Hoboken, NJ: John Wiley & Sons, 2002),

18. Peter Horowitz, “Shifting from Defense to Offense: A Model for the 21st Century Capital Markets Firm,”

19. Sarah Diamond, “Profiting Today by Positioning for Tomorrow: A Field Guide to the Financial Markets of 2015,”

20. . If you are looking for quality Internet entertainment, check the surprising video there. Those guys at the Jet Propulsion Laboratory are such a bunch of cutups.



23. Pasha Roberts, “Information Visualization for Stock Market Ticks: Toward a New Trading Interface” (master’s thesis, MIT Sloan School, February 2004). This can be found at MIT, or with video supplements at the visualization company Roberts founded, Lineplot ( ).

24. An animated version of the Visible Marketplace can be seen at

25. Dow Jones Elementized News Feed,

26. Reuters Newscope algorithmic offerings,

27. These tools are called Open Calais ( ).

28. For the technically ambitious reader, Lucene ( ), Lingpipe ( ), and Lemur ( ) are popular open source language and information retrieval tools.

29. Anthony Oettinger, a pioneer in machine translation at Harvard going back to the 1950s, told a story of an early English – Russian – English system sponsored by U.S. intelligence agencies. The English “The spirit is willing but the flesh is weak” went in, was translated to Russian, which was then sent in again to be translated back into English. The result: “The vodka is ready but the meat is rotten.” Tony got out of the machine translation business.

30. This modern translator is found at . I tried Oettinger’s example again, 50 years later. The retranslation of the Russian back to English this time was “The spirit is of willing of but of the flesh is of weak.”

31. The CIA In-Q-Tel venture capitalists are found here:

Wall Street Analytics

Easily find all of the
lowest cost no load
mutual funds and ETFs
Available at major ebook stores:

Amazon -- Kindle/MOBI
index funds list investing books

Apple iBookstore -- iPad/EPUB
index mutual funds investment guide

Barnes & Noble -- Nook/EPUB
no load mutual funds investment guide

Smashwords -- EPUB, MOBI, PDF
low cost mutual funds investment guide

no load index mutual funds
by David Leinweber