Wikipedia defines quantitative investing as "an investing technique typically employed by the most sophisticated, technically advanced hedge funds." So what happens when these "sophisticated" investors get it wrong?

Scott Patterson is the author of The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It. I recently talked with him about quantitative investing, billion-dollar losses, and blackjack.

Mac Greer: What got you interested in this to begin with?

Scott Patterson: Well, in August 2007, a number of hedge funds and prop trading desks at Wall Street banks lost billions of dollars over the matter of a few days and a lot of it was because they were running very similar strategies. They were, in a way, collateral damage from the subprime crisis. I guess the operating theory is that somebody was forced to sell their positions because of margin calls so that created a ripple effect that flowed through all of these quant funds in August 2007, so it was very sudden, very rapid period of losses for people who were not used to seeing big losses. They are used to seeing big gains, or at least they were back then, very consistently. So that is sort of how I got into it and learned more and more about these people.

Greer: And Scott, give us a quick snapshot of quantitative investing and why was this "a new breed of quantitative investor"?

Patterson: There are all kinds of quant strategies. It is difficult to lump them all into one broad category, but I think maybe the easiest way to describe it is that they use past performance of assets or securities to predict where they will go in the future. So for instance, they will look at historical returns of stocks or related group of stocks, like oil companies, and track how they perform in relationship to one another over long periods of time. They program those relationships into their computers and look for deviations from the historical patterns, and when there is a deviation, that means that there is an opportunity to invest because they expect the patterns to hold for the long term. So some invest very rapidly expecting to see the deviation snap back within minutes or hours; some are more long term, expecting to see returns over months or even years. So it is a very powerful way of investing.

One of the problems with it is that sometimes those deviations from the historical patterns don't snap back as soon as these quants expect and when some of them are forced to sell their positions because of margin calls or losses, that can, like in August 2007, that can create a ripple effect, hitting other funds that have used a lot of leverage or borrowed money to bet on all these strategies.

Greer: And one guy that you wrote about, a very interesting character that you call "The Godfather of the Quants" was Ed Thorp.  

Patterson: Thorp was a mathematician in the fifties. He was teaching at MIT and he was really interested in figuring out how to beat games, all different kinds of games, and one day he came across a strategy on how to beat blackjack and he looked at it and he realized that he could improve on it and he used an IBM computer at MIT and fed a whole bunch of data about different kinds of hands that could be played in blackjack into these computers and developed what became the high-low strategy in blackjack, which basically created the card-counting culture in Las Vegas that we see today. Thorp actually took his strategy to Vegas; he made thousands of dollars betting on blackjack, but his primary goals weren't really to make money. It was just to see if he could beat the game. After he did that, he wrote a book called Beat the Dealer, which became the bible of card counting and he eventually decided to move on to Wall Street, which he saw as another big game that he could crack, and he definitely did. He figured out all sorts of ways to use math and computers to make money on Wall Street and became a very, very successful hedge fund manager.

Greer: And what did Ed Thorp make of the recent meltdown and the quants that you wrote about?

Patterson: His opinion seems to be that the current generation of quants has by and large lost the ability to manage risk. There is so much money to be made and so much leverage available from broker/dealers, that in a way the quant world became something of a self-fulfilling prophecy, where all sorts of different firms were piling into similar strategies and making those strategies more profitable.

So the managers were, in a way, a victim of an illusion that their strategies were more successful than they actually were, and this was something that Thorp saw coming. In the early 2000s, he was still running his hedge fund and he saw all these people getting into his world where he had been since the late 1960s, and he could see that something bad was going to happen. There was too much money crowding into these strategies, so he got out. He shut down his hedge fund. Unfortunately for him, he put his money with some other hedge funds, which saw huge losses in 2008 and he was pretty upset about that. Talking to him about it, he was really bitter about how these managers, who were becoming billionaires off the assets they were managing, really were not prepared for what happened in 2008 at all.

Greer: And let's talk about a few other people that you profile in the book --- Peter Muller with Morgan Stanley (NYSE: MS).

Patterson: Peter is the first real quant that I came across in my research and we wrote a page one story about him and his group at Morgan Stanley in late 2007, soon after this quant crisis of August 2007. PDT, or Process Driven Trading, which is the group that Peter still actually runs at Morgan Stanley, was probably one of the most successful proprietary trading operations at any investment bank over the past 15 years or so. They had racked up returns of somewhere around $5-$6 billion, by my own estimates, during that period for Morgan Stanley. Over some periods, they accounted for about a quarter of the net income for Morgan Stanley and they were very, very successful, very profitable, had never had a major loss.

They were running a strategy that is known as statistical arbitrage, which is sort of like how I was describing earlier, betting on relationships of stocks moving in and out of different patterns and betting that they are going to go back into the historical relationships. In August 2007, PDT lost about $600 million in the course of a few days and was really on the edge of just complete meltdown, like many of these other firms were.

Peter himself is a fascinating character. He has considered himself somewhat of a musician and in the late nineties, he was kind of getting sick and tired of running PDT and playing the Wall Street game and started playing more and more music and he actually for a while was taking his electric keyboard down into subway stations and busking for change, literally, even though he was worth probably hundreds of millions of dollars and flew around in a private jet. So he is definitely a quirky character.

Greer: The new financial reform law addresses areas like proprietary trading and so I am curious, how much is Peter Muller's world and the business he is in going to change?

Peterson:  I wish I knew for sure because PDT is very secretive, and I don't know what the discussions are within Morgan Stanley. But if I were to guess, they are faced with a serious problem because of the Volcker rule, which will mandate that banks essentially have to shut down their proprietary trading operations or spin them off. So I would think that PDT would be a prime candidate for one of these proprietary operations and banks that is no longer going to be viable. Morgan Stanley will probably figure out a way to make money off of it. There are some allowances in the bill for banks to invest in outside hedge funds, so Morgan Stanley can essentially just spin it off and take a stake in it and still reap profits off of PDT's operation.

Greer: And another person you profile, Deutsche Bank's (NYSE: DB) Boaz Weinstein.

Patterson: Boaz Weinstein was the head of all credit trading at Deutsche Bank just a few years ago. He was a very powerful trader and very young. He was only in his mid-30s. He ended up losing about $1.7 billion in late 2008 for Deutsche Bank, so he left after that happened and set up his own hedge fund. The latest I heard, this hedge fund, which is called Sabba, which was also the name of his prop trading operation at Deutsche Bank, it means "grandfather" in Hebrew. I think they have about a billion dollars now, which is pretty good for a new start-up hedge fund, and indicates that they are doing very well. Hopefully Boaz learned his lessons at Deutsche Bank and is not going to be rolling the dice quite as aggressively as he once did. He is a very smart trader and he will probably do very well.

Greer: What most surprised you as you were writing the book?

Patterson: Definitely one of the most surprising aspects is how influential quants are and how much they control, but also that they are so smart and many of them have PhDs and have studied markets for many, many years and yet they do incredibly stupid things, betting too much and using too much leverage. And it just shows you how human nature is often a lot more powerful than the mathematical systems that they claim that runs their system. At the end of the day, greed is probably a lot more powerful than the rational market theories that people say operate in the markets. Greed and fear are often a lot more influential, and it is very difficult for even these extremely intelligent and rational individuals to overcome that.