It sounds like something out of The Matrix: a giant, world-spanning electronic network where high-powered machines, some of them using GPUs to gain a speed advantage, run secret, rapidly-evolving software algorithms that battle it out for profits in a high-stakes game of cat-and-mouse, attack-counterattack, that yields some $21 billion a year for the winners and can spell ruin for the losers. Except that it's not The Matrix—it's the stock and commodities markets, and the fact that these markets mainly consist now of computers trading against one another has been brought closer to the public's attention by last month's alleged theft of Goldman Sachs' proprietary trading code.

The collection of computer-automated, high-speed trading technologies and techniques that are typically lumped under the heading of "high-frequency trading" (HFT) have been around for a while, but HFT has recently become heavily identified with the banking giant Goldman Sachs, which dominates some aspects of it on the New York Stock Exchange. And as Goldman draws more media and congressional scrutiny, so will HFT. To prepare you for the high-frequency trading media onslaught, we'll take a look at HFT and at a stock market that really isn't what you thought it was.

If you look under the hood of the markets in 2009, you'll find that the trading floor has been replaced by electronic networks; the frantic, hand-signaling traders have been replaced by computer systems; and all of moves in the trader's dance—a thousand little tricks and techniques (some legal, some questionable, and some outright illegal) for taking regular advantage of speed, location, and information to generate profits—are executed hundreds of times per second, billions of times per day. And the whole enterprise is mainly powered by the same hardware from Intel, AMD, and NVIDIA, that Ars readers use for gaming.

The world that has been pulled over your eyes to blind you from the truth

Press reports of trading days that end with big gains or losses are typically accompanied by shots of a trading floor where young traders are either euphorically throwing papers into the air (up days) or staring dejectedly at a stock ticker with hand pressed to forehead, shoulders slumped in defeat (down days). These guys, you think, are "the market," and if you looked up the New York Stock Exchange (NYSE) on Investopedia you'd find nothing in the "Stocks Basics: How Stocks Trade" entry to disabuse you of this widely held notion. "The NYSE is the first type of exchange... where much of the trading is done face-to-face on a trading floor," Investopedia declares, and it goes on to provide a description of the workings of a floor-centered, face-to-face NYSE that hasn't matched reality for about five years.

The floor of the New York Stock Exchange

Only about three percent of the trading volume on the NYSE is actually carried out by means of traditional "open outcry" trading, where flesh-and-blood humans gather to buy and sell securities. The other 97 percent of NYSE trades are executed via electronic communication networks (ECNs), which, over the past ten years, have rapidly replaced trading floors as the main global venue for buying and selling every asset, derivative, and contract. So the ECNs are the markets in 2009, and those pit traders who pose for the cameras are mainly there for the cameras.

"Why don't you know BATS?," Bernard Donefer, a finance professor and HFT expert at CUNY's Baruch College, asked me rhetorically. "Because there's nothing to look at. It's based in Kansas; the computers are in Jersey City."

At the time that Donefer and I spoke last week, BATS was the third largest equity market in the world, behind the NYSE and NASDAQ, and it has been all-electronic since it began life in 2005. There has never been a floor that a CNBC camera crew could report from, so it's essentially invisible to the general public. The NYSE and a few other exchanges keep hanging on to their trading floors "mainly for branding purposes," Donefer told me.

The ECNs offer the advantages of speed, anonymity, error minimization, and audit trails. They've also "ported" many of the problems endemic to electronic networks—security vulnerabilities, the "garbage-in, garbage out" (GIGO) problem, and the problem of technology moving too fast for lawmakers, to name just three—from the Internet to the markets. But the problems with ECNs are a topic for another day. The real issue is that when the average retail investor gets an E*Trade account and tries to play the stock market, she typically has no idea that she's going up against the market equivalent of IBM's chess grandmaster-thumping supercomputer, Deep Blue.