Early in the afternoon of 6 May 2010, the leading stock market index in the US, the Dow Jones Industrial Average, suddenly started falling. There was no evident external reason for the fall – no piece of news or economic data – but the market, which had been drifting slowly downwards that day, in a matter of minutes dropped by 6 per cent. There was pandemonium: some stocks in the Dow were trading for prices as low as 1 cent, others for prices as high as $100,000, in both cases with no apparent rationale. A 15-minute period saw a loss of roughly $1 trillion in market capitalisation.So far, so weird, but it wasn’t as if nothing like this had ever happened before. Strange things happen in markets, often with no obvious trigger other than mass hysteria; there’s a good reason one of the best books about the history of finance is called Manias, Panics and Crashes. What was truly bizarre and unprecedented, though, was what happened next. Just as quickly as the market had collapsed, it recovered. Prices bounced back, and at the end of a twenty-minute freak-out, the Dow was back where it began. It’s the end of the world! Oh wait, no, it’s just a perfectly normal Thursday.This incident became known as the Flash Crash. The official report from the Securities and Exchange Commission blamed a single badly timed and unhelpfully large stock sale for the crash, but that explanation failed to convince informed observers. Instead, many students of the market blamed a new set of financial techniques and technologies, collectively known as high-frequency trading or flash trading. This argument rumbles on, and attribution of responsibility is still hotly contested. The conclusion, which becomes more troubling the more you think about it, is that nobody entirely understands the Flash Crash.The Flash Crash was the first moment in the spotlight for high-frequency trading. This new type of market activity had grown to such a degree that most share markets were now composed not of humans buying and selling from one another, but of computers trading with no human involvement other than in the design of their algorithms. By 2008, 65 per cent of trading on public stock markets in the US was of this type. Actual humans buying and selling made up only a third of the market. Computers were and are trading shares in thousandths of a second, exploiting tiny discrepancies in price to make a guaranteed profit. Beyond that, though, hardly anybody knew any further details – or rather, the only people who did were the people who were making money from it, who had every incentive to keep their mouths shut. The Flash Crash dramatised the fact that public equity markets, whose whole rationale is to be open and transparent, had arrived at a point where most of their activity was secret and mysterious.Enter Michael Lewis. Flash Boys is a number of things, one of the most important being an exposition of exactly what is going on in the stock market; it’s a one-stop shop for an explanation of high-frequency trading hereafter, HFT. The book reads like a thriller, and indeed is organised as one, featuring a hero whose mission is to solve a mystery. The hero is a Canadian banker called Brad Katsuyama, and the mystery is, on the surface of it, a simple one. Katsuyama’s job involved buying and selling stocks. The problem was that when he sat at his computer and tried to buy a stock, its price would change at the very moment he clicked to execute the trade. The apparent market price was not actually available. He raised the issue with the computer people at his bank, who first tried to blame him, and then when he demonstrated the problem – they watched while he clicked ‘Enter’ and the price changed – went quiet.