Follow The Daily Ticker on Facebook!

We like to believe that the action in stock markets is driven by human emotions and reason — investors making decisions about the prospects of individual companies and their concerns (or hopes) for national economies and big economic trends. But from the Flash Crash of May 2010 to the Facebook Fiasco of May 2012 — and every day in between — it's clear that the machines are now in charge. "Between 60 and 70 percent of all trading is done by automated high frequency trading computers," says Scott Patterson, a reporter at the Wall Street Journal and author of the new book Dark Pools: High-Speed Traders, A.I. Bandits, and the Threat to the Global Financial System. And while the machines don't control the broad direction of the markets, a great deal of the day-to-day fluctuation can be ascribed to algorithms, ultra-fast computers, and a set of systems that have built up to remove human agency from stock trading.

Patterson, who is also the author of Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It, has become an expert in the way that technology and markets interact. And he doesn't think it is all good. In Dark Pools, Patterson delves into the recent history of innovations of stock-market trading. And while he finds plenty of innovation, new business, he also finds reasons to be concerned. In his view, the developments of the past fifteen years made the Flash Crash inevitable.

The story starts in the 1990s, when idealistic upstarts began to deploy technology to challenge incumbents. The trading of stocks was dominated by the New York Stock Exchange and the NASDAQ, and they were essentially closed systems. In the case of the NYSE, only the specialists on the floor were able to see order floor and tasked with matching up buyers and sellers. But that began to change when companies like Island and Archipelago began offering neutral turf where traders could have greater visibility into market action and conduct trades at a much lower cost. "It was an idealistic vision people had that they were going to open up markets and let more people see prices," said Patterson.

Story continues

At first, it worked. But as the electronic communications networks gained market share and scale, however, they were co-opted by the establishment. NYSE bought Archipelago in 2005. The same year, NASDAQ bought Instinet. Meanwhile, the proliferation of alternative trading networks, combined with ever-more-powerful and fast computers, led to the creation of a vast new industry. Savvy programmers could raise funds and deploy capital that would seek out minute inefficiencies between markets, or that would read the market action and figure out ways to capture minute returns.

The lower cost of trading, the greater visibility into the flow of orders, and the rising capacity to analyze markets and game the system fundamentally altered the nature of the stock markets, says Patterson. "The high frequency traders became the new market makers," he said.

This new dynamic was on full display during the Flash Crash of May 6, 2010. A rising spark of volatility led to large discrepancies in prices between exchanges. That wreaked havoc with the strategies of high frequency traders, and many of the machines essentially shut down and sold off their positions. The sudden departure created a huge void in the markets, and aggravated the volatility.

Patterson doesn't believe the markets have learned their lesson. Sure, the exchanges have fortified circuit-breakers as part of an effort to stop runaway activity in specific stocks. "Whether that will actually stop a systemic event from happening, we don't know," Patterson said. "We just have to sit back and wait."

That's disconcerting. But the reality is that the systems people have built are prone to become overwhelmed by the machines that people have built. For all the talk of redundancy, software, and security, the nation's stock-trading systems don't seem to be sufficiently robust to handle unusual activity. And when we put too much faith into computers, there's a large potential risk. Patterson notes, for example, that the botched Facebook (FB) initial public offering is simply the latest example of computers screwing things up.

Daniel Gross is economics editor at Yahoo! Finance

Follow him on twitter @grossdm; email him at grossdaniel11@yahoo.com