Wednesday, July 29, 2009

Computer Trading is Good Competition

Paul Wilmott today warns us against the scourge of computer trading, and it seems everyone has an opinion on it (see NYTimes , Trader Magazine, Chuck Schumer, Tyler Cowen). Alas, this covers such a broad umbrella of strategies, one can be against this only like one may dislike unpopular books. The panic piece begins as follows:
The idea is straightforward: Computers take information — primarily “real-time” share prices — and try to predict the next twitch in the stock market. Using an algorithmic formula, the computers can buy and sell stocks within fractions of seconds, with the bank or fund making a tiny profit on the blip of price change of each share.

This has been ongoing with Moore's law. In the bad old days orders were given to a human (called a 'specialist') who then had the ability to accept, or back away, from orders as they came in. With electronic exchanges, much of this is being done not by a priviledged specialist, but rather computers. They basically do the same thing, only now their is much more competition. Remember back in the 1990s when Harris, Christie and Schultz and reported tha Nasdaq quotes bizarrely omitted 'odd eigths'. That is, the could post a bid-ask as 3/8-1/2, but instead regularly posted 1/4-1/2. This was for many very large companies such as Microsoft and Apple, that even then traded millions of shares a day. This was collusion, and shortly after the publication of this piece these stocks magically began trading at odd eigths, though no one was ever convicted of any collusion.

Stock specialists who consolidate retail orders to buy and sell have been ripping off customers since trading began. The first head of the SEC was Joe Kennedy, who was a master stock manipulator in the 1920's. He was a master of the stock pool (bucket shop), a then-legal stunt in which a few traders conspired to inflate a stock's price, selling out just before the bubble burst. Regulation to protect the integrity of the investor invariably meant stiflying competition, allowing the big exchanges (NYSE and AMEX) to make easy money by being 'in the club'. For generations, specialists would sit on trades for minutes, not milliseconds, while they decided how to maximize their profits. I know one guy who worked for a specialist around 2000, and he noted his boss lost money only a handful of days every year. Specialists would emphasize the risk they took in providing liquidity, yet on big gap days like October 19 1987 they did not step in and exacerbated the situation. The risk they took on providing orderly markets was a license to steal for decades, and they now scream 'unfair!' as their order flow evaporates.

With electronic exchanges, the competition is much greater. Bid-ask spreads are only a penny for most S&P500 companies (as opposed to 25 cents 20 years ago), and they are generally very deep. It is rumored that Renaissance's flagship hedge fund (not the long only fund) makes most of its money as an off-the-exchange market maker. They invested a lot of money in computers, and algorithms that efficiently set bids and offers given recent order flow, the depth of the market (level 2 quotes), and their own inventory. Good for them.

There are basically three types of algorithmic trading strategies. In one, you are basically slicing a big order into littler bits to minimize trade impact. No longer do you need a human to work a 5000 share order, rather, a machine spits it into digestable chunks and by the day you are done, and don't owe anyone a big holiday basket for their hard work. In another, you basically have a machine implement relative value trades. The famous pairs trading, where if Pepsi rises, but Coke stays flat, you sell Pepsi and buy coke, is based on this idea. But it can be generalized to indices versus sectors, or baskets against each other based on statistical properties, or even oil futures vs. Exxon. Lastly, there are the market making algorithms that try to capture the spread in the market by correctly anticipating the future distribution of retail order flow based on the current book, and this strategy can complement a relative value trading algorithm. Many times these algorithms try to reverse engineer future trades via the way current trades are coming in. As many trades come in each second, for many stocks the best bids and offers are adjusted several times a second.

One article noted that some algorithms basically infer the price increase from trades, getting rid of the profits otherwise available. But these are all short term scenarios, and basically make a market efficient. That is, say Apple announces good news, suggesting a sharpe bounce in the stock. An investor tries to buy, and would like to trade 1MM shares, but clearly that's too much, so he puts in an order for 1000, then next minute, another 1000, and another. A machine might sense the pattern and basically jump on for the ride with him, diluting his profits. Is that bad news? Only for the short-term trader. For the longer run investor oblivious to this, who was on the other side, they got to sell at a higher price (the price rose faster than otherwise). The short-term speculator basically makes less because the algorithm reverse engineers his insight. This is the essence of an informationally efficient market, where news gets into the price asap. That those at the bleeding edge are making a profit is not a bug, it's a feature.

Several bloggers have made a big deal out of 'flash trading' article in Traders Magazine, where exchanges give priviledged access to order flow, letting them accept or reject these trades prior to hitting the general market. Normally this would upset me, but they have an option lasting only 30 milliseconds (30 thousandths of a second). For a computer, this is enough time to make a decision. This is certainly enough time to make a tenth of a cent or so on market orders by leaning on the existing book. That is, if the market is bid-ask at 10.03-05, with 100 shares on each, a market order to buy 100 shares might make you hit the offer at 10.05 because you know there is 100 shares following you, and you hope the price increases based on this flow. This is known as 'front running'. Or you might see more buying coming in at a limit price of 10.02, and decide to increase your bid at 10.03 because you know your downside is now limited to a penny, as you can sell at 10.02 in size. This is known as pennying a bid, because you basically use the other person's limit orders as a backstop, giving you a penny downside risk. As tendencies move probabilistically, on any one trade such shenanigans are worth much less than a penny, but it can add up for the one doing it. For your average investor, in contrast, it is totally irrelevant. In the context of buying a $20 stock, does the fact that a highly competitive group can make tenths of a cent on market transactions bother me? No. It is orders of magnitude lower than 10 years ago, which is orders of magnitude lower than 30 years ago. Commissions for most investors are at least a penny. Of all the financial skullduggery in the world today, Flash Trade front running worth a fraction of a penny is small beer.

But Wilmott paints a scary picture:
the problem with the sudden popularity of high-frequency trading is that it may increasingly destabilize the market. Hedge funds won’t necessarily care whether the increased volatility causes stocks to rise or fall, as long as they can get in and out quickly with a profit. But the rest of the economy will care.

I surmise that poor Paul has not been invited to consult on these algorithms, and like many experts, finds those excelling at something in his field of expertise is useless at best, but probably damaging. After all, if it was important and useful, he should be a player, because that's his wheelhouse, right? Of course, given the many different types of algorithms extant, it could be they glom on to some vicious positive-feedback loop, but given the profits they are chasing, these are micro-bubbles, a couple pennies. An algorithm chasing micropennies does not instigate trends the way portfolio insurance did in the 1987 crash, because in that case long-only funds were looking at their total long position, selling into declines (emulating a put option). The current algorithms generally look at relative value trades between sectors or issues, momentary order imbalances, a very different beast. Trade imbalances have always and will continue to move prices, but that isn't the computers fault. If there's continually 10x as many sell orders as buy orders, the result is going to be lower prices no matter what market is created. When buys and sells are coming in with equal size, price stability will be restored. To suggest the computers could exaggerate a movement is hysterical fear mongering in this context, because while anything is possible, it's a baseless hypothetical. Maybe we should regulate financial textbook writers as they popularize models that create things like CDO's that were so prominent in our latest financial crisis? Perhaps he is diverting our attention from his crime of the century?

Paul then concludes:
Buying stocks used to be about long-term value, doing your research and finding the company that you thought had good prospects. Maybe it had a product that you liked the look of, or perhaps a solid management team. Increasingly such real value is becoming irrelevant. The contest is now between the machines — and they’re playing games with real businesses and real people.


He is bringing up the perenial idea that investors should trade less, which I think is good practice. But earlier he suggested insiders make too much money off short term trades, implying higher trading costs. Isn't this then a disincentive to trade? So what should it be? When you propose two conflicting ideas why you are against something this reveals you aren't arguing on principle. And aren't houses the prototypical asset with high transaction costs and long investment horizons that should make them immune to bubbles? Remember, before there were maniacal machines making money in a competitive market, there was a a government-backed oligopoly or monopoly of trade execution.

Basically, people who do not understand a market where some participants are making a lot of money are often eager to call for regulation of that market because it seems obviously unfair. The solution, however, is invariably to merely entrench a status quo with a bigger shield against competition, but one where the profits can be shared equally by the exchanges, their member firms, and their regulators (through revolving door employment at the top ranks between exchanges, firms, and government). There was little 'change' on the exchanges prior to the 1990 computer revolution, and they robbed the public blind the whole time because they had a monopoly on order flow, all the while regaling their friends at the country club about their deft risk management skills and financial acumen ('the market was down and I still made money!').

Leave the market alone. It is very competitive, and if some electronic exchanges have different rules where people feel their orders are treated more fairly, volume will flock there (there are about 5 electronic exchanges). Competition is the best regulator ever invented. If you think someone making a tenth of a cent on your order is a big problem, you trade too much.

8 comments:

Anonymous said...

Agreed 100% (or 99% at least). This is another one of those topics with such vacuous lunacy on the opposite side of the argument that it makes me wonder how the human race ever escaped caves.

John said...

I thought this was a great post. Worrying about algo bots is really only a concern of the shortest of short-term traders.

I would add one caveat, however. I don't think Wilmott makes this point very well, but as you question where the specialists were during the '87 crash, the same could be true for some algo strategies. For instance, if many of these strategies are roughly similar and begin to lose money, the ten to one hundred firms running them could easily begin to pull back liquidity. This is predicated on the idea that most of the algo bots are running similar strategies. If they are quite different, then there might be some not affected by the crisis and could make extra profits.

I would say this is a smaller probability. If this game is so easy, then firms would want to allocate decent amounts of capital to it. Even though the infrastructure required serves as a barrier to entry, the larger firms with more diverse strategies may be able to increase their allocations to the strategy and compete for expected profits (if spreads narrow, or whatever) if other firms are losing money and spreads widen.

Anonymous said...

I agree that HFT is mostly good, but your comment about flash orders is a bit disingenuous

"Of all the financial skullduggery in the world today, Flash Trade front running worth a fraction of a penny is small beer."

Front-running is illegal. We have laws in the books against this stuff. Its black and white. So no need to make this into something of a gray area. If fractions of a penny is really what's really at stake, then there wouldn't be so much uproar from monied groups looking to make even more money, now would there?

But What do I Know? said...

Ditto Anon 9:43

My only caveat is that a bucket shop and a stock pool are two different things--as I understand it a bucket shop didn't actually execute orders while a pool traded with itself on the exchange. (I don't know about modern-day bucket shops, but momentum trading seems to be a lot like a stock pool--even assuming the participants aren't talking to each other.)

As you rightly point out, the sainted specialists didn't exactly save us in 1987. . . But I suppose it's easier to blame the computers than ourselves.

Steve said...

Great post.

John, if similar HFT algos begin to lose money and all pull back liquidity it could be a problem *if* it is related to some other market stress. But since most HFT algos are market neutral it wouldn't be related to a market crash (and wouldn't cause one as they withdrew). And other unaffected strategies would still be supplying liquidity.

There was an example of this in August 2007 when mean-reversion quant algos (not high-frequency) all suffered dramatic losses and many did, in fact, pull liquidity from the market. There was very little effect on the broad market probably because they are mostly market neutral and because pulling liquidity need not have any effect on prices. And at the same time momentum-based quant algos were doing great and continued to supply liquidity as did HFT and scalpers and market making algos.

Wilmott did not say there *would* be bad positive feedback effects but that there could be. My impression was that he was urging us to research and ensure that no dangerous relationships exist rather than assume that all is well.

spragus said...

With 50-70 % of the market tied up in HFT, when the "boys" decide to pull up stakes, market liquidity will dry up fast. Specialists had some requirement to stay in the game, but in 1987, regulations were one thing and bank liquidity was another.
Decimalization has been a major issue regulating specialists to the sidelines.
Back in the good old days MFST and APPL were some of the bigger traders on NASDQ, And they traded at much higher spreads than sim
ilar NYSE high flyers. Dealers trading on the NASDQ had a good thing going!
Finally, there's been little to refute the $22B "trading fee/tax" extracted by the HFT:I suspect even Citi would agree that's a lot of fee income.

Anonymous said...

Your reference about 1987 and your friend who worked for a specialist are typical of many people who never worked on the floor. You are quick to chastise everyone about their ignorance of HFT , but you are just as ignorant . Did you ever work on the floor ? Did you ever interact with a specialist directly ? Maybe the specialists did not perform optimally during the crash, but how about NASDAQ the original computerized marketplace ? You chose a poor analogy and you give a very weak argument to support your case.
I have news for you. Back in the day, if you had an issue about how a stock traded you could speak to a floor broker, speak to a specialist, and speak to management of the exchange. Who do you talk to now when you get run over a thousand times each second by the "liquidity providers" ? The fact is that nobody is charged with an obligation to make markets and that is not a positive development for anyone.

John Thacker said...

I have news for you. Back in the day, if you had an issue about how a stock traded you could speak to a floor broker, speak to a specialist, and speak to management of the exchange.

The average little-guy investor could speak to a specialist and management of the exchange? Really? Or just the big guys who were friends of those who ran the exchange (or had previously worked at the exchange, or people at the exchange had previously worked at their firm, etc.) could, and could take advantage of that?

Your comment makes me think even more that people who ran the exchanges were colluding and taking advantage of the spread.