How the Nasdaq got hacked

This story is excerpted from "Automate This, How Algorithms Came to Rule Our World"

August 30, 2012|Forbes

ON A DAY IN EARLY 1987, a man who worked for the Nasdaq stock market—let’s call him Jones—showed up in the lobby of the World Trade Center. He found the appropriate elevator bank for his floor and pressed the up button. He was making a routine visit to one of the Nasdaq’s fastest-growing customers.

A receptionist greeted him and retreated to another room to fetch his host. When she returned, a short, dapper man with a full head of silvering hair accompanied her. Thomas Peterffy’s blues eyes warmly greeted Jones. He spoke with an accent.

Jones couldn’t have known that Peterffy would later become a man worth more than $5 billion, one of the richest people in America. He was still at that point a Wall Street upstart. But his trading volume had been streaming upward, and so had his profits. Jones was always curious as to how people like Peterffy figured out ways to beat the market so consistently. Had he hired the sharpest people? Did he have a better research department? Was he taking giant risks and getting lucky?

What Jones didn’t know was that Peterffy wasn’t a trader at all. He was a computer programmer. He didn’t make trades by measuring the feelings of faces in the pit, the momentum of the market, or where he thought economic trends were leading stocks. He wrote code, thousands of lines of computer language—Fortran, C, and Lisp—all of it building algorithms that made Peterffy’s trading operation one of the best on the Street, albeit still small. He was chief among a new breed on Wall Street.

As Peterffy led the way onto his trading floor, Jones grew confused. The more he saw—and there wasn’t much to see—the more flummoxed he became. He had expected a room bursting with commotion: phones ringing, printers cranking, and traders shouting to one another as they entered buy and sell orders into their Nasdaq terminals. But Jones saw none of this. In fact, he saw only one Nasdaq terminal. So who was making all those trades?

“Where is the rest of the operation?” Jones demanded. “Where are your traders?”

“This is it, it’s all right here,” Peterffy said, pointing at an IBM computer squatting next to the sole Nasdaq terminal in the room. “We do it all from this.” A tangle of wires ran between the Nasdaq machine and the IBM, which hosted code that dictated what, when, and how much to trade. The Nasdaq employee didn’t realize it, but he had walked in on the first fully automated algorithmic trading system in the world.

With the hacked data feed coming from the Nasdaq terminal, Peterffy’s code was able to survey the market and issue bids and asks that could easily capture the difference between the prevailing price at which buyers would buy and sellers would sell. That difference, called the spread, could grow past 25 cents a share on some Nasdaq stocks at that time, so executing a pair of 1,000-share orders—one to buy at $19.75 and one to sell at $20.00—resulted in a near-riskless $250 profit.

Peterffy’s operation marked a new dawn on Wall Street, as programmers, engineers, and mathematicians mounted a two-decade invasion in which algorithms and automation, sometimes incredibly complex and almost intelligent, would supplant humans as the dominant force in our financial markets.

The Nasdaq had no trading floor; all of its trades took place over the phone or on its computer network that took users’ orders as they entered them on the keyboard of a dedicated Nasdaq terminal. Peterffy had taken the incoming data wire meant for the terminal and spliced it, soldering the split end into a circuit board that his team of programmers and physicists had built from scratch and embedded into the motherboard of an IBM PC. The IBM ran software that Peterffy wrote himself. As the PC got data from the Nasdaq wire splice, its algorithms analyzed the market and made quick trading decisions, firing these trades back through a tangle of wires that wound their way into the innards of the Nasdaq terminal. Peterffy, unbeknownst to anybody until that moment, had hacked the Nasdaq.

The Nasdaq didn’t need word of this contraption, this mad scientist’s laboratory, reaching the market. Would other traders be comfortable knowing they were matching wits with algorithms powered by an IBM rather than other gut-following gamblers? The Nasdaq didn’t want to find out.