BOYD ERMAN
From Friday's Globe and Mail Published on Wednesday, Sep. 26, 2007 2:00AM EDT Last updated on Friday, Apr. 03, 2009 10:57AM EDT
As August's big sell-off of American stocks peaked, Hanif Mamdani spotted an opportunity. The chief investment officer of giant Vancouver-based money management firm Phillips Hager & North had sold some U.S. stocks earlier in the summer on concerns that a crunch was coming. Now Mamdani watched the market rout reach panic levels and decided it was time to take a chance on buying back into the American market. With the S&P 500 index sliding fast and concerns over credit soaring, Mamdani and his colleagues were betting that things were getting so bad the Federal Reserve would intervene, causing stocks to rise.
That left Mamdani and his two dedicated traders with a conundrum: How does a money manager with $67 billion in assets move quietly back into U.S. stocks, without tipping off everyone else in the market? In the past, his best option was to pick up the phone and talk to one of the big brokerages on Bay or Wall Streets, giving a trader there a list of the stocks he wanted and the prices he was prepared to pay. That trader would then start looking for matches with other big investors.
But that route can be risky: If word of the order leaks out while the trader shops it around, the price of a stock can be driven up fast.
So, instead of placing massive orders for all the stocks they were interested in, Mamdani and his staff turned to the latest tool to transform the world of trading: algorithms. To hide big transactions, algorithmic programs use sophisticated mathematical modelling systems to predict how trades will affect the market. Then, they carve buy and sell orders into tiny slices; to locate the best deal, these are then sent around the globe to every exchange imaginable. Instead of placing one order to buy 100,000 shares of Research In Motion Ltd., for instance, an algorithm might send out 50 orders for 2,000 shares. And it might send them to the Toronto Stock Exchange, the Nasdaq and all the smaller alternative trading systems in the U.S. where RIM is listed—all the while monitoring changes in the currency exchange rate by the millisecond and adjusting orders to compensate as the currency shifts higher or lower and transactions occur.
The orders are timed to hit throughout the day, or over a few days, so they will slide unnoticed into normal trading activity. They are based on patterns the algorithm figures out by digging through reams of historical data on stock transactions around the world. But portfolio managers can also customize individual trades as the purchases progress, adjusting target prices and speeding up orders, or slowing them down as the block works through the system.
Using an algorithm is the trading equivalent of throwing hundreds of pebbles into a pond during a rainstorm, rather than lobbing in a boulder. Either way, you can get rid of the same amount of rock, but with pebbles, you make only tiny ripples instead of a big splash that everyone sees. Call it the stealth weapon of the trading world—an analogy that at least one algorithmic developer views as apt. "I view trading as a war or battle," says Abe Kohen, a former nuclear engineer who is responsible for algorithm design at FlexTrade Systems Inc., which builds and sells algorithms and order-management systems for traders. "And if somebody develops a new gun or tank or plane, you have to respond. Algorithms are now the weapons of choice."
Mamdani reckons that on that hectic day in mid-August, when the S&P 500 dropped almost 12% below its 52-week high in the morning before staging an end-of-day rally, half of PH&N's trades were done electronically with algorithms, helping him and his staff to establish positions unnoticed amid the chaos. "The difference between being able to transact in midday trading fairly invisibly and having to wait until the end of the day is huge," says Mamdani. Like many in the increasingly science-based world of finance, he straddles two academic disciplines: He holds a bachelor of science from the California Institute of Technology and a master's in economics from Harvard.
Despite the appealing anonymity and labour-saving attributes of algorithmic models, they have been slow to catch on in Canada. Big buy-side money management firms, a category that includes PH&N, use algorithms for only about one in 10 trades, and, over all, only about one-third of trading orders originating in Canada are done via algorithmic models. Many of those trades are executed in the U.S., where exchanges have moved quickly to update their computer systems to accommodate the higher volumes of lightning-fast orders. Canada's markets are only now adapting to the fast-changing landscape.
The TSX—long considered a laggard in the global trading environment because its computerized order-processing system couldn't react quickly enough to meet the demands of algorithmic programs—began rolling out new hardware this fall designed to process ultrafast, ultrasmooth transactions. Dubbed its "Quantum Revolution," the new system, part of the exchange's $20-million retooling of its trading engine, promises to respond to orders in single-millisecond time frames, and match orders in microseconds. "Algorithmic trading has come to Canada with a vengeance," says Rik Parkhill, head of TSX Markets, the arm of the exchange that oversees the trading business. "There is really nothing out there that can compete effectively with Quantum right now."
And if Quantum doesn't live up to the TSX's claims, at least four new competitors are lined up with a promise to meet the need for speed. Pure Trading is one of these upstarts. Based in a Toronto office tower, the company is working to open a full-fledged alternative trading system (ATS), where every stock listed on the TSX will be available for trading. Pure is in a race with Instinet, the global exchange company, which also plans to have an ATS up and running by year's end; Alpha, a venture of Canada's big banks and Canaccord Capital, which is planning to open next year; and Omega ATS, in the works at Toronto-based Perimeter Financial (columnist Doug Steiner is chairman and CEO).
On top of those ATSs, which are comparable to the TSX's model of a central market where buy and sell orders are visible, there are numerous systems springing up that promise to match buyers and sellers of big blocks of stock anonymously. The holy grail is what's known as "best execution"—getting the best price in the least time—and to achieve it, trading programs need to be able to check markets simultaneously. If one is slower than the others, the algorithms can't determine where to fill an order.
"Pure was conceived in response to fairly consistent complaints coming to us from the algorithmic trading community about the difficulties they were encountering in the Canadian marketplace," says Ian Bandeen, Pure's chief executive. "It wasn't just a case of one or two. There was a fairly steady stream of people who were fed up or wanting to abandon Canada."
Bandeen is not the only one who heard the complaints from users of algorithms and other electronic trading tools. "When we talk to some of the big global hedge funds, there is that perception," says Ray Tucker, a managing director in the equities department of TD Securities who specializes in electronic trading. "They say they won't play in Canada until we are faster."
Still, it may take a while before traders here completely abandon their phones. One reason is that most Canadian stocks, with the exception of those big ones that make the Standard & Poor's/TSX 60 Index, just don't trade often enough and algorithms have been generally designed for the busier U.S. markets. The relatively small volume of trade here makes it much more difficult to disguise a large order, even when it's been sliced and diced into tiny pieces, and can lead to an algorithm's taking many days to slide through a trade—during that time, the markets can move in a big way. So, for the moment, the old-style traders can still make a living helping money managers buy and sell smaller stocks. "Once you get below the top 60, it gets pretty old-school," acknowledges Mamdani.
But even that is changing. The latest generation of so-called adaptive algorithms are much more suited to Canada's less active trading environment. The algorithms are able to sift through even more historical trading data to look at when stocks trade, enabling the algorithms to more accurately forecast Canada's scattered storms of activity. That helps the trader to decide when to use an algorithm and when to go with an old-fashioned phone call.
"The machine can decide now is a good time to trade, and now's not," explains Robert Almgren, a former math professor at the University of Toronto who heads up algorithm development at Bank of America. "That's a benefit in Canada, where trading is so much 'burstier,' so you have to choose carefully when you go into the market."
Another reason that Canada has lagged is that the U.S. has been the hub of algorithmic development, and so far it hasn't made economic sense for large American firms to focus efforts on Canada's quirks. But some Canadian firms are now hard at work trying to adapt algorithms to this country's specific trading world. Toronto-Dominion Bank's TD Securities arm, for example, provides clients with algorithms, developed by Goldman Sachs Group Inc., which the two firms have worked together to customize. TD spent about a year working on developing its own algorithms before deciding to partner with Goldman, probably the most influential trading house in the world, and combine their efforts to build systems for Canada. "We provided our grey matter," says Tucker. "It's not hard to write an algorithm, but it's hard to write a really good algorithm."
The quest for an even better algorithm never ends. The next frontier is cross-asset class systems—a fancy term for programs that can trade different types of investments simultaneously. Developers are working on systems that can automatically buy stocks and hedge them with futures, all the while adjusting for currencies; or that could lay a bullish bet on natural gas by purchasing shares of a producer such as EnCana on the TSX, while hedging with a short position in actual natural gas purchased on a commodity exchange in Calgary or New York.
As newer waves of algorithms emerge and Canadian firms—who want to trade globally—get bigger, the use of electronic trading and algorithms will inevitably increase. The end game is visible in the United States, where traders are becoming a rarity at big money managers. "Big funds in the U.S. will have two or three traders for $200 billion or $300 billion in assets," says Nick Thadaney, head of ITG Canada, a brokerage specializing in electronic trading. "How do they do it? Technology."
Join the Discussion: