Read MoreRegulate me
Laying out the development of high frequency trading since 2007, Lewis writes:
"Essentially, the more places there were to trade stocks, the greater the opportunity there was for high frequency traders to interpose themselves between buyers on one exchange and sellers on another. This was perverse. The initial promise of computer technology was to remove the intermediary from the financial market, or at least reduce the amount he could scalp from that market. The reality turned out to be a windfall for financial intermediaries of somewhere between $10 billion and $22 billion a year, depending on whose estimates you wanted to believe."
Read MoreHigh-speed trading about to get speedier
Lewis argues that Goldman Sachs in particular was slow to the high frequency trading game and sought to catch up by hiring extremely sophisticated mathematicians and programmers to create faster and faster trading programs. But the effort wasn't entirely successful.
"The stock market had become a war of robots, and Goldman's robots were slow," Lewis writes. What's more, he says, banks like Goldman have gradually come to realize that they can't be the biggest winners in the HFT race. Lewis cites one source familiar with so called "dark pool arbitrage" in which high frequency traders captured 85 percent of the gains, leaving the banks with just 15 percent.
"The new structure of the U.S. stock market had removed the big Wall Street banks from their historic, lucrative role as intermediary. At the same time it created, for any big bank, some unpleasant risks: that the customer would somehow figure out what was happening to his stock market orders. And that the technology might somehow go wrong. If the markets collapsed, or if another flash crash occurred, the high-frequency traders would not take 85 percent of the blame, or bear 85 percent of the costs of the inevitable lawsuits. The banks would bear the lion's share of the blame and the costs. The relationship of the big Wall Street banks to the high frequency traders, when you think about it, was a bit like the relationship of the entire society to the big Wall Street banks. When things went well, the HFT guys took most of the gains; when things went badly, the HFT guys vanished and the banks took the losses."
That kind of thinking may explain last week's Wall Street Journal op-ed piece by Goldman President Gary Cohn. In it, Cohn echoed some of high frequency trading's critics and did something Wall Street players are not famous for—he called for more government regulation of the marketplace.
"The equity-market structure is increasingly fragmented and complex," Cohn wrote. "The risks associated with this fragmentation and complexity are amplified by the dramatic increase in the speed of execution and trading communications."
Read MoreNew York attorney general to probe high-frequency trading