If you blinked, you might have missed it. BATS Global Markets, the smaller sibling to the much larger NYSE Euronext (NYSE: NYX) and Nasdaq OMX (Nasdaq: NDAQ) exchanges, went public on Friday. And then all hell broke loose. Within nine seconds, its share price fell from $15.25 to fractions of a cent. Trading in the company's shares was halted, and then the IPO was withdrawn completely. Many industry analysts, including the Fool's own Rick Munarriz, have rightly dubbed it the worst IPO ever. And why? Not just because it fell through the floor, but because its own exchange tied that rock to its legs.

This was an astoundingly lousy day for poor BATS, but for the rest of us it was a pretty average trading session. Although Apple (Nasdaq: AAPL) shares briefly got swept up in the carnage, losing 9% before trading was halted for five minutes, that stock finished out the day only marginally in the red. One hopes that BATS will learn how to avoid these problems before attempting another offering in the second quarter, but we can learn something from this situation today. Let's call it a teachable moment on high-frequency trading.

Behind the hive mind
The BATS and Apple mini flash crashes can be blamed more on the BATS exchange's technical failures than on what's commonly referred to as HFT. But in a way, it was representative of what can go wrong in a computer-driven market. There's simply no way for humans to effectively intervene, or to even make sense of things, when thousands of trades happen in milliseconds, most executed by algorithm.

It was also representative of what can go right when regulators make necessary improvements to the way they handle sudden, outsize market shifts. Apple's market cap would have shrunk by $52 billion had the glitched trades stood. Left unchecked, it might have caused a stampede. But circuit breakers -- implemented after 2010's now-infamous flash crash -- sprang into action and stopped the plunge in its tracks, canceling the nonsensical trades and restoring a sense of order.

How does it all affect those of us still using primitive brains and bodies? That depends on whom you ask. HFT leaves telltale signals that can be tracked, letting us know which stocks the algorithms favor, and to some degree how much trading they do -- the TABB Group estimates HFT has accounted for at least half of all U.S. trading volume since 2008. But knowing these simple facts doesn't necessarily help us identify their effects on the market, nor does it help us understand what might happen if things go wrong.

The cascade effect arrested
Regulators lucked out when Friday's glitches only hit two stocks. HFT can be involved in any stock at any time, so the general rarity of catastrophic failures is a bit of a surprise. Only two major events have been tied into computerized trading, and the first occurred early in the computerization of the markets. 1987's Black Monday had many of the telltale signs of the flash crash more than two decades later -- a sudden, seemingly inexplicable massive drop that the markets got over rather quickly. In 1987 the Dow dropped by 500 points in October, but ended the year in positive territory. The flash crash's effects were reversed even sooner, with the Dow surpassing its crash day opening level a week later.

The fact that only three major market-moving events (if you consider the BATS battiness "major") have been tied to computer error in more than a quarter-century of computerized markets is pretty remarkable when you think about it. Computers break down and software has bugs. If you've never had your computer (or tablet, or smartphone) suddenly stop working, you're probably reading this article on a piece of paper in a cave. Each catastrophe has been progressively less damaging as well, from a 22% drop in 1987 to a process affecting two stocks that was halted and reversed within minutes in 2012.

Inside the high-frequency Matrix
Yet the proper operation of HFT remains poorly understood. The exchanges encourage it to provide liquidity, but it's also been demonized by politicians on both sides of the pond. A recent weeklong debate on The Economist's website asked readers to vote on whether HFT made markets better. Early voting was strongly opposed to that assertion, but changed markedly after the debate's opening remarks reflected favorably on the technology. That reflects both the unease many investors feel about operating alongside algorithms and how little information many have to go by when reacting to those algorithms.

That debate's primary arguments in favor were as follows:

  • HFT improves market quality by improving professional traders' efficiency.
  • Trading costs are lower and markets more liquid thanks to HFT.
  • Price discrepancies are almost nonexistent and prices more accurate.
  • HFT produces stronger informational links between markets.
  • HFT abuse can be tracked and punished thanks to permanent records.

The opposition came back with these claims:

  • HFT can damage confidence in the market.
  • HFT preys on trading imbalances and funnels returns to fewer investors.
  • Polling shows that many institutional investors don't trust HFT.
  • More than 90% of all HFT orders are canceled before they're executed.

The supporting arguments were clearly more compelling to Economist readers, who switched from 39% in favor and 69% opposed on the first day of voting to 55% in favor and 45% opposed following the opening arguments. This remained consistent through rebuttal statements, showing that HFT proponents have been better able to marshal facts to their side. The claim that HFT orders are frequently canceled was countered by the assertion that revising quotes (which involves canceling orders) helps keep prices accurate in a timely way.

Normal-frequency final thoughts
If anything, Friday's short circuit should reassure nervous investors that such events are rare and generally controllable. The circuit breakers worked, the trades were reversed, and life went on -- except for BATS, which will have to live down the humiliation of destroying its own IPO. Regulators will never be able to keep up with all the financial innovations coming out of trading houses, but there are bigger fish to fry in the financial world. As long as they enact smart regulations rather than making knee-jerk emotional reactions, the market won't be destroyed by machines. There are plenty of other dangers lurking that deserve far more attention.

If you're looking for a way to get a leg up on high-frequency movements, it pays to think long term. That's what's helped Warren Buffett to achieve such astounding success. Buffett has had his eye on a few financial stocks for a while, but there's one great opportunity that he's missing. Find out how you can out-Buffett the Oracle with The Motley Fool's brand-new free report on the banking stocks only the smartest investors are buying.