A rising winter sun cast pale golden light into the otherwise dark and quiet office in downtown Stamford, Connecticut. Haim Bodek, the founder of Trading Machines LLC, squinted at the light through red-thatched eyes and returned his gaze to a stack of five flat-screens on his desk. The only sound in the room was the low hum of dozens of Dell computer towers and several Alienware Area-51 gaming computers.
The sound of the Machine.
It was December 2009. Bodek hadn’t been up all night swilling fine wines and schmoozing with deep-pocketed clients at four-star restaurants in Manhattan. He didn’t need to. His firm traded for its own account, and Bodek answered only to himself and to a few wealthy partners who’d bankrolled the firm.
He wouldn’t have it any other way. No twitchy investors pulling cash every time the market dipped. And no prying questions about the state-of-the-art Machine he’d created.
No one knew how the Machine worked but Bodek.
But now the Machine wasn’t working. Even worse, Bodek wasn’t sure why. That’s why he’d been up all night. If he didn’t solve the problem, it could destroy Trading Machines--and his career.
What made the Machine tick was a series of complex algorithms that collectively reflected a two decades’ tradition of elite trading strategies. Bodek had personally designed the algos using a branch of artificial intelligence called expert systems. The approach boiled down the knowledge gained by experts in market analysis and crunched incoming market data in order to make incredibly accurate predictions. It combined various models that financial engineers had used over the years to price options--contracts that give the holder the “option” to buy or sell a stock at a particular price within a certain time frame--with new twists on strategies that savvy traders had once used to -haggle over prices in the pits.
But many of those old-school strategies, geared with cutting-edge AI upgrades that permitted them to compete head-to-head in the electronic crowd, were nearly unrecognizable now. The market had entered a phase of such rapid mind-throttling change that even the most advanced traders were in a fog.
The problem that threatened Trading Machines, Bodek believed, was a bug hidden in the data driving his ranks of algos, hundreds of thousands of lines of code used by the computer-driven trading outfit that he’d launched with sky’s-the-limit dreams in late 2007. The code told the Machine when to trade, what to trade, and how to trade it, all with split-second timing.
Bodek, whose seriously pale skin, high forehead, and piercing blue eyes gave him the appearance of a Russian chess master, was a wizard of data. It was the air he breathed, the currency of his profession. An expert in artificial intelligence, he’d made a career of crunching masses of numbers, finding form inside chaos. To discover order in the ocean of information that made up the market required incredible computer power and ingenious trading systems.
Bodek had both. He was so skilled at discovering patterns in the market’s daily ebb and flow that he’d risen to the top of the trading world, working first at an elite Chicago firm, packed with math and physics Ph.D.s, called Hull Trading, then inside an elite quantitative derivatives operation at Goldman Sachs, before taking over a powerful global desk at UBS, the giant Swiss bank. In 2007, he broke out on his own and convinced twenty-five top-notch traders, programmers, and quants (an industry term for mathematicians who use quantitative techniques to predict markets) from across Wall Street to join him. He set up shop in Stamford and launched Trading Machines just as signs emerged of an impending global financial crisis. It had amounted to one of the most ambitious trading projects outside a large investment bank in years.
Despite the bad timing, Trading Machines had fared well in its debut, posting a tidy profit during a time when most of Wall Street was imploding.
Then something went wrong with the Machine. Bodek was on a mission to fix it. Whatever it was.
As the morning progressed, Bodek’s team of traders and programmers filed into Trading Machines’ third-floor office space. They stepped gingerly around Bodek as if he were a hair-trigger land mine.
The slightest pressure could set off an explosion. Not of anger--Bodek was as levelheaded as a fighter pilot--but of talk. Bodek was a legendary talker, a deep well of stories and analogies and long digressions and digressions on digressions. His was a mind trained to focus on minutiae, and it could be exhausting for listeners exposed to its relentless probing, like a powerful searchlight that never stopped sweeping the ground for new information. He could rarely get far into a conversation before he would say with extreme urgency something along the lines of “What I’m trying to say is there are five points I need to make before we can address the first of those ten points I mentioned earlier.” Inside the firm, this was known as “getting Haimed.”
Bodek wasn’t in the mood to talk that morning. His eyes darkly circled, he sat frozen in his chair, staring at his stacked monitors, mumbling to himself in fits and starts, his hands rising on occasion from his keyboard to pincer his blade-shaved head above the ears as if he were trying to squeeze more juice from his sleep-deprived brain. All the stress had taken a toll. While he was just thirty-eight years old, he appeared a good decade older.
Bodek’s entire Wall Street career, from Hull to Goldman Sachs to his own trading desk at UBS, had been one long march from victory to victory. Whenever faced with an obstacle no one thought he could overcome, he’d pull off a miracle. Failure had never seemed possible.
And yet here it was. He could see it, there, on his five screens, in the data that tallied up the firm’s dwindling profits. As Bodek sat there, mystified by the behavior of an electronic trading ecosystem he’d helped invent, he focused his formidable brain power on figuring out what the hell was going on.
The answer that would solve his problems was also there, he thought, on those screens, hiding amid all the data.
Shortly before 9 a.m., Bodek’s partner, Thong-Wei Koh, a six-foot-two crack mathematician from Singapore, took his seat a few desks away from Bodek. The two founders didn’t exchange a word. They’d been fighting tooth and nail for the past few months. A partnership that had started with visions of glory had descended into a bitter daily feud.
TW was obsessed with mastering risk. At UBS, he’d designed a trading system so ingenious that it could never lose a large amount of money--at least according to the math. But now, at Trading Machines, risk was everywhere. He was drowning in it. He’d become so stressed out by the firm’s problems that he’d come down with chronic stomach cramps. Bodek, for his part, was wracked by headaches and insomnia.
He began to stir out of his morning torpor as the start of the trading day neared. It was 9:15 a.m.
Time for the War Song.
Bodek plugged his iPod into a dock and pressed the play button. Pounding electric guitar chords screeched from the dock’s speakers: the manic Viking heavy metal he loved--and everyone else in the room loathed. As a teenager, Bodek had played drums in a thrash band. Ever since, his taste in music had gone one way: loud, angry, violent.
He was trying to teach his team a lesson with the music. It was how he viewed trading: It was war. Us against them. The market was the field of battle. The weapons: brains aided by powerful computers and lightning-fast algos.
Head nodding to the earth-shaking metal, Bodek stood wearily from his chair, his tie hanging loosely around his wrinkled white shirt. While Bodek always dressed the part of a white-shoe banker--gold cuff links, silk tie, patent-leather shoes--he relished the contradictions his outfit implied as the Viking metal pounded away. Once, on a dare at a metal show in 2007, he’d leapt into a raging mosh pit dressed in his suit and tie . . . and lived to tell about it.
Clearing his throat, he rapped for good luck the Spartan helmet perched atop one of his monitors and clapped his hands.
“All right, guys,” he said, machine-gun drums and psycho guitar riffs pulsating off the walls of the office. “Yesterday was bad. We got killed again. But we can’t give up. We’ve got to fight this motherfucker! We’ve got to keep focused! Stay with me!”
There was a reason for urgency. That summer, word had gotten out on the grapevine that Trading Machines was foundering. Now Bodek’s top guns were getting poached by competitors who sensed blood in the water.
To keep the ship afloat, Bodek was doing the work of three employees, staying at the office all night writing code, testing new strategies, digging deep into the guts of the Machine to figure out what had gone wrong. But he couldn’t do much more, and he needed everyone to pitch in if the firm was going to right itself.
“I know it looks bad, but we can turn it around, I know it,” Bodek said. “We can do it! Today we’re going to fucking kill it, OK! Now, let’s go!”
Everyone turned to his screen and started working. Right as the market opened, Trading Machines got whacked. For months it had been the same. Death by a thousand cuts. Sheer torture. As the nicks and cuts mounted, TW watched in frustration, obsessively clicking a pen, sighing, letting out brief bursts of anger, muttering curses under his breath.
Suddenly, the Machine froze. Trading stopped. TW pounded his fist on the desk. “What the fuck is going on, Haim!” he shouted, glaring sharply at Bodek.
This had happened before.
Bodek started to scramble, calling up the code he’d worked on overnight. “Must be a bug,” he muttered, frantically typing.
Groans echoed around the trading room.
Bodek combed through the code and quickly found the problem. A half hour later, Trading Machines was up and running again--only to keep taking losses, again and again, like clockwork.
Trading Machines’ nightmare started in the spring of 2009. Bodek had been on a trip to Hawaii for a relative’s wedding. For a brief moment, he’d had time to relax and reflect on all he’d accomplished in the past decade, since joining Hull. He had it all. Money. A beautiful wife, a classically trained musician with the mental chops to match Bodek himself. A beautiful house on the beach in Stamford. Three beautiful children. Most important: He had his freedom.
When he returned to Trading Machines’ office in early June, he instantly grew worried. The firm’s profits were dropping sharply. Bodek started combing through the nuts and bolts of the Machine, hunting for the problem. He couldn’t find it. Since then, Trading Machines had been getting hammered, day after day, bleeding away its gains. It was still making money, but its profits had been reduced by $15,000 a day--sometimes more--all through the summer and into the fall. Now, its gains weren’t enough to keep up with the firm’s costs, especially the nosebleed salaries Bodek had promised to get all that top-gun talent and the expensive technology his strategy demanded.
It was a terminal path. Eventually, the firm would run out of cash. The clock was ticking on Trading Machines.
Through that December morning and into the afternoon, Bodek sat immobile in his chair, mesmerized by his stack of screens. He barely moved, aside from his fingers flying at the keyboard, his bloodshot eyes darting from screen to screen.
This wasn’t unusual. Bodek almost never left his chair during the trading day. He didn’t eat or even drink water until the market closed at 4 p.m. He rarely spoke. As he sat there, watching the numbers stream by, he was peering into the depths of the market, reading it like an Egyptologist scanning faded hieroglyphics.
There’s Goldman coming in. That’s UBS. Hell, I designed that trade myself in 2005. They’re screwing it up.
Bodek’s Machine was screwing up, too. He saw it happen all day long. He knew its signs.
His eyes widened as he saw another wave coming in. He was tracking the SPDR S&P 500 exchange-traded fund widely known as the Spyder. The Spyder was one of the most heavily traded securities in the world--and one of Bodek’s favorites. It was hovering a few pennies above $112.
Like mutual funds, ETFs represent a basket of stocks, bonds, or other assets such as gold. They’re traded as a unit and mimic the value of the underlying assets. Unlike mutual funds, they can be traded continuously on exchanges--like a stock. The first ETF, the Spyder, was created in 1993. It tracked the S&P 500, an index of five hundred of the largest public companies in the United States. Other ETFs tracked the Dow Jones Industrial Average--the Diamonds--and the Nasdaq 100--called the Qs due to its QQQ ticker symbol.
The funds were like thermometers tracking the health of the market. As such, computer-driven funds, as well as everyday traders, watched them like hawks for any blip in performance.
One of those blips was about to happen. All was quiet in the room. Perhaps too quiet. Everyone was waiting for the Machine to act. Bodek caught his breath. Now . . .
“Oh fuck,” Bodek muttered.
The Machine’s strategy involved rapidly buying and selling stock options. The trouble: Options tend to be extremely volatile and risky. Because of that, options traders normally offset their positions using stock. If the Machine bought an option giving it the right to buy Apple at a higher price within two weeks, it would turn around and sell short Apple stock to protect the position. If the value of the option to buy Apple declined, Trading Machines would make up some of the losses with the short bet on the stock. It was like an insurance policy against a drop in the value of the option.
Crunching the data spit out by the options market was an enormous task. In the U.S. options market alone, hundreds of thousands of messages were produced every second. To sort through the data in real time required computer power of the highest order, and intelligent systems to make sense of it.
Any kink in the strategy could cause it to bleed pennies and nickels. And that’s exactly what was happening to Trading Machines’ stock trades.
Bodek flinched. Over the years, he’d developed a second sense for when the market was about to make a move. He could feel a shift coming.
In a flash, the Spyder ticked down a few cents to $112. The move was so fast the human eye couldn’t see it. A person looking at a screen would see a blur, a wiggle at the edge of motion, but it would seem as if nothing had happened.
Excerpted from Dark Pools by Scott Patterson. Copyright © 2012 by Scott Patterson. Excerpted by permission of Crown Business, a division of Random House, Inc. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.