Flash Boys

Flash Boys is a book by Michael Lewis about high frequency trading and exploits of the [US] stock market. Lewis writes great books, and seems to have a knack for finding the interesting people to write about in any given scenario. I’d recommend all the other books of his I’ve read, especially Moneyball and The Big Short. He usually writes about finance, but Flash Boys is about the intersection of finance and computing, which is why I’m highlighting it here. From my point of view, Flash Boys is about what happens when a human system becomes an algorithmic computer system.

Way back when, the stock market was a totally human process, with clients instructing stockbrokers to buy or sell, and deals carried out between people on the trading floor. Gradually, technology was used to support this process, until now the transactions are carried out purely electronically, with stockbroker machines passing orders to the stock exchange machine, which puts together buyers and sellers into transactions. This has various consequences, which are covered in Flash Boys, which I wanted to highlight here.

Too Fast For Humans

The market now moves so fast that there is no opportunity for microscopic human oversight. Machines are programmed to execute client orders, or to use an algorithm to try to make profit in the market, but with microseconds (or less) per trade, even the machine’s controllers are at the mercy of its actions. Knight Capital famously lost 440 million dollars in 45 minutes due to computer error, and that could be seen as a generously long time over which the error occurred. With little opportunity to correct matters after the fact (unless you have sufficient influence to get the stock exchange to rollback your mistake), it is increasingly important for your machines and algorithms to be correct.

Having said that, one interesting detail seemed to be that on a microscopic level, the market is actually very inactive. As I understand, the machines don’t generally sit there trading continuously in stocks against each other. The market settles to an equilibrium, and it’s only when new information is received that it makes sense to trade. Thus the activity is still driven by human input: when a buyer wants to buy, probably because a person somewhere has issued an order, the trading activity kicks in before (see speed, below) and after the human-triggered order, then stops.

Speed Matters…

One of the themes in Flash Boys is how being the fastest earns you money. It is less about being fast to access a single stock exchange, but more about being fastest between two sources of information. If you know a large order for, say, Apple shares is incoming from a buyer, but you can get to the stock exchange before them, you can buy some Apple shares at the current price and then sell them on to the buyer for slightly more. Similarly, if you see the price for a stock increase in New York, and you can get that information to Chicago fast enough, you can again buy in Chicago, and thus buy shares which are almost immediately worth more than you paid for them. There are tales in Flash Boys of building the straightest fibre optic link possible (time being distance over speed, and speed being limited by the speed of light, less distance is key) and moving around machine rooms to be closest to the exit. Lewis characterises these practices as a tax on the real buyers and sellers in the market: the high frequency traders who perform this racing between exchanges are making money at the direct expense of those slower than them in the market.

…But Doesn’t Have To

For many technological dodges, there are technological solutions. A group that Lewis focuses on try to build an exchange immune to many of these practices by increasing the latency to their exchange. By slowing everyone’s access down, they can eliminate the advantages gained by spotting price differences between that exchange and others.

Some elements of trading really are an information war. Certain regulations, or just certain programmed behaviours, mean that a small order for a share being placed in Chicago is likely to be a sign of a subsequent order arriving in New York (if you want to buy lots of one share, you may have to visit many exchanges to find a buyer). Deterministic behaviours offer opportunities for exploitation by other players in the market; but also offer guarantees of reproducible behaviour.

A Black Box

One running theme is how little many of the players in the stock market seemed to know about the implications of the electronic system underlying it. Some stockbrokers and investors were having their orders exploited by high frequency traders for months or years before they figured out what was going on. There was a complete lack of human oversight of how the system as a whole worked, partly due to regulations that prevented certain information being public, and partly because there was a lack of technical understanding of how the system worked. Lewis describes how the technical staff went from being subservient to the brokers, to being the ones highly sought after to provide a market advantage.

The Trial

This theme of technical ignorance permeates into the trial of one programmer, Sergey Aleynikov, accused of stealing program code. Whether or not you consider him guilty, it is troubling how little the investigator, prosecutor and expert witnesses seemed to know about relatively basic technical concepts. The investigator apparently only arrested the programmer on the suggestion/order of Goldman Sachs. The part where the investigator found it suspicious that the programmer had put the code in a subversion repository is a face palm moment. (If, like me, you have your technical hat on by default and don’t immediately see the problem, recall the dictionary definition of subversion to see the investigator’s view. Interestingly, even a search for define:subversion on google won’t offer the dictionary definition, and will only show you links to download Subversion.) The trial was still rumbling on in the past few months, with Aleynikov convicted a second time (having been convicted and acquitted once already), and then acquitted a second time.


Wikipedia points out several people claim that Lewis’s book gives an inaccurate and overly-negative view on high frequency trading; I don’t know enough details to judge. But as a book looking at what happens when a human system becomes a machine system, I found it fascinating. A recommended read if you want to consider the effects of computerisation on society. It’s also interesting to wonder what would be different in the book if all the people featured had had some computing education; what would have turned out differently? The trial might have reached a different verdict, the people may have sussed the stock exchange problems a little earlier, the stock trading rules may have been written slightly differently.


Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s