HFT Bot-versus-Bot

by Scott

Zero Hedge has a great post on High Frequency Trading (HFT):

“It’s Not A Market, It’s An HFT ‘Crop Circle’ Crime Scene”

In this article Tyler Durden presents pretty compelling visual evidence of “quote stuffing” by HFT trading bots.  This quote stuffing can end up “pushing the bid/offer range up to 10% higher without even one trade ever having occurred,” Durden says. It is illegal to indicate a quote without the intent to complete the quoted transaction.

But in my mind what is most significant about all of this is to whom this quote stuffing is directed.  It’s not directed at “head faking” analog Hedge Funds, or those rare “Real Money Investors” —it’s clearly directed at other HFT trading bots.  Yes, we’ve entered the era of Bot-versus-Bot in our stock market.  And to the new retiree that got pumped on the latest e-trade advert that’s in heavy rotation on CNBC and is ready to tiptoe in, I can only give the same best wishes that everyone gave to my grand-pappy: “Good luck, shooter (tap) (tap)…Coming out!”

HFT began with the observation that there is “structure” to the tick-by-tick movement of the markets—that as market participants, analog Hedge Funds, Real Money Investors, Brokerage Houses—made their trades, there were patterns to the price movements that could be predicted, and therefore profits could be made.  From this position, the natural next step is that as HFT trading bots become a large part of the transaction volume of the stock market (and they are), the algorithms that power these HFT trading bots should look to exploit the “structure” provided by other HFT trading bots.

A logical next step, no doubt, but we are really at what I call “the end of the rationale road” of this stock market thing.  More of my thoughts in my prior post about the topic:

High Frequency Trading, ECNs and the Green Light

We created this stock market thing so Montgomery Burns, with capital, could get that capital to Transatlantic Zeppelin, which needed it, in an efficient manner. Now, who knows why it exists.

And concomitant with the rise of HFT trading bots is an increasing correlation between the individual components of indexes11.Correlation Soars on S&P 500 Shares, WSJ 7/12/10 [$link] (e.g. all of the stocks in the S&P are moving in lockstep).  That great line that traders started in the 80’s, “the ticker symbol is just a name on my screen, I don’t even know what the company does,” has now become, in the roaring 10’s, “the name is just a line in the computer code, I don’t even know what the fucking name is anymore!?!”

But back to this Bot-versus-Bot competition. What we have is this: one HFT trading bot puts out data to the federated market (like quote stuffing or other trading movements), then that data is then used by a second HFT trading bot to make a misstep that allows the first one to profit.

In the software testing world there is something called “fuzzing”22.Fuzz Testing, wikipedia [link].  From Wikipedia:

Fuzz testing or fuzzing is a software testing technique that provides invalid, unexpected, or random data to the inputs of a program. If the program fails (for example, by crashing or failing built-in code assertions), the defects can be noted.

For the purpose of security, input that crosses a trust boundary is often the most interesting.33.Emphasis mine.For example, it is more important to fuzz code that handles a type of file commonly downloaded from the Web than it is to fuzz the parsing of a configuration file.

In the context of HFT trading bots, you can read that quote with a lot of irony.  ”If the program fails” —say by losing a million dollars in a day—the “defects can be noted.” Ha! Noted by the loser by the burning hole in his pocket and by the winner by some serious loot—or a trip to the slammer, we’re not sure which yet.  Also, it is in vogue that these HFT trading bots should take in as much information as possible, so there are a large amount of inputs. I can think of no greater “trust boundary” than that of the one between the output of one HFT trading bot going into the input of another HFT trading bot.  Most interesting, indeed.

For anybody that is familiar with software development, they will know that it is a very error-prone process.  The challenge of writing a “defect-free” HFT trading bot exceeds any accomplishment in the history of human experience with software.  To even attempt something like what they are trying to do would require thousands of people in a NASA-like control center—and still I wouldn’t be optimistic. From what I understand, these companies are not doing anything like that44.High-Frequency Programmers Revolt Over Pay, Forbes, ironically in their “Personal Finance” section, 7/28/10 [link]and there are a number of firms of differing expertise and budgets attempting this. It’s completely insane.

Perhaps the only thing that saves us from this endless virtual war is an event like that encapsulated in one Star Trek episode where Kirk goes down to the planet to find that they are engaged in a computer simulation of war with the rival planet, and both planets are actually executing their citizenry according to the casualty counts output by the computer.  We need a Kirk figure to come down and pull the plug on the computer, darkening the whole thing. And then when James Simons asks gravely, “What are we to do now?”  Kirk will respond, “Go outside! Meet some real companies that are making real products,” and the skyscrapers of Manhattan will drain onto the sidewalks with dazed, pasty traders, blinking in the bright sunlight, awkwardly holding their airline tickets, ambling towards JFK (or Newark if you are near Penn Station).