Copyright ©2011 NPR. For personal, noncommercial use only. See Terms of Use. For other uses, prior permission required.

TERRY GROSS, host:

This is FRESH AIR. I'm Terry Gross.

Even if you're not an investor, you may have money in the stock market through your retirement account. And if you think the market is hard to decipher, it may be even harder than you think.

Computer code is now responsible for much of the activity on Wall Street. The image of smart analysts studying annual reports and a stock exchange floor crowded with men yelling out trades is becoming outdated.

Much of the analysis and trading is now done by computers programmed with lines of code called algorithms. With these computers, high-frequency traders, also known as flash traders, can buy and sell thousands of shares a second.

My guest, Felix Salmon, says this has created a new market - volatile, unpredictable and impossible for humans to comprehend. Salmon's article, "Algorithms Take Control of Wall Street," is published in the January issue of Wired magazine. Salmon writes about the financial world for reuters.com and the Columbia Journalism Review website. Last year, he won the Excellence in Statistical Reporting Award from the American Statistical Association.

Felix Salmon, welcome to FRESH AIR.

Mr. FELIX SALMON (Journalist; Author, "Algorithms Take Control of Wall Street"): Thank you very much.

GROSS: The way the stock market used to work, I'm told, is that the individual investor was a brilliant investor at the mutual fund, studied companies' fundamentals and, based on that, made investing decisions.

But now that Wall Street is ruled by algorithms, the computers are using different information and a different kind of logic than the individual investor studying the health of an individual company would.

So what is in these - what are the computers looking for with these algorithms? What kind of information is feeding them that's different from, say, if you were making an investment, what you would be looking at?

Mr. SALMON: Well, let's not romanticize the past too much here because in the past, the vast majority of investors have always been speculators of some description. They buy stocks because they think they're going up, or they sell stocks because they think they're going down, and they try and make profits.

And there are always traders in the middle of this, people who exist not to hold stocks as long-term investments but just to buy and sell in the markets every day and try and make a small profit every day, and they sell stocks at slightly higher prices than they're selling them for, and that's where their profits come from.

And now what's happened is that those traders in the middle of the market have all pretty much been replaced by machines. And a lot of the fundamental investors, the mutual funds and so forth - who weren't only, by the way, looking at fundamentals, a lot of them would love what they called technical analysis, where they look at lines on charts and extrapolate them and decided now's a good time to buy or sell.

A lot of that activity has now been automated, as well. So you get investors, the investment decisions being made by the machines and also the trading decisions being made by machines. And obviously, machines are going to use more information more quickly than any human ever could.

So we don't know exactly what information is really moving the market anymore, but then again, we never really did.

GROSS: So just so I understand this better, it seems like there are different investment companies and mutual funds that have their own algorithms, their own set of computational analysis. And these are like proprietary codes that you don't want anybody else to know about because this is, like, this is your secret formula to trading and understanding the market. Is that right?

Mr. SALMON: That's absolutely right. You have hedge funds, virtually all hedge funds and lots of Wall Street banks have these black boxes with a lot of code that they spent a lot of time developing. And it's almost impossible to copyright that code or to patent that code or to make it public in any way because the minute it becomes public, everyone else is going to copy it.

So they are very jealously secretive about their code, and they try and use it to make money in ways that no one else has thought of.

GROSS: So what are the different kinds of trades? What are some of the different kinds of actions that the computers now, through these complicated algorithms, are making decisions about? Because it's not just what to buy and sell, right?

Mr. SALMON: Exactly. I mean, ultimately, every trade that they make is either a buy or a sell. That's the only thing you can do in the market. But what they're doing is they're looking at a huge number of data sets.

They're looking at everything from weather forecasts to Twitter streams to whole areas of data streams which you and I can probably never even think of, and they're putting them all together, and they're analyzing them. And what they're doing is they're learning from them in these sort of algorithmic, almost artificial-intelligence-type ways.

They're looking at one set of data or a whole big stream of data from many, many different sources, a fire hose, really, which no human could ever get their head around. They're looking at economic indicators, they're looking at fundamental indicators, they're looking at technical indicators, anything you can imagine.

And then they're looking to see what happens in the market as all of this data comes through, and they're trying to find patterns there. And then what they are ultimately looking for is a kind of if-then algorithm, I suppose you could call it.

They can say, if this kind of thing happens in the data stream, then what you're likely to see is that stocks go up or stocks go down. And then they use those movements and those predictions to make bets and to hopefully make money.

But what we're seeing here is so complex, and a lot of the time the movements are so tiny, they can make money because it costs so little money to trade in the market these days. They can make money just if a stock moves a few cents. You don't need to predict a big move in the stock market. You can make money off such tiny moves that a lot of what they do just simply is incomprehensible to human minds.

In the article in Wired magazine, we talk about this company over in Berkeley, California, called Bolion(ph). They don't really know what they're trading on. They just set their computers loose on a set of data and say, find a signal in all of this noise and then trade on it. And somehow, you know, it seems to work.

And through this method, you can make a lot of money if a stock just moves a few cents because you're buying so many shares. Is that it?

Mr. SALMON: Because you're buying so many shares and because you're making so many trades. You can make thousands of trades a second. You can make these bets not just once or twice a day, as people used to do, but once or twice a millisecond. And when you're trading that frequently, if you're only making a cent each time, it still adds up very quickly.

GROSS: Are there algorithms now created to spy on other algorithms, to crack the codes of other algorithms so that one company will know, you know, one investment company will know what the other investment companies are up to and try to outsmart them?

Mr. SALMON: Exactly. That's known as predatory trading, and it's a very large business. And one of the things they do is they try and trick other algorithms to think they're, say, buying rather than selling so that the other algorithms will try and come in and raise the price. It gets very complicated. It's a spy-versus-spy thing.

One of the people quoted in the article calls it a bit like "The Hunt for Red October." It's like submarine warfare, where you're pinging out into the dark, trying to find out where the other trades are, what the other algorithms are, what they're doing. And they're trying to cloak themselves and discover each other and basically trying to get one up on each other.

It's a very, very complex, very, very high-speed, incredibly high-stakes game. And people can make millions at it if they're good at it.

GROSS: So we've been talking about high-frequency trading and how algorithms are being used in that. Let's talk about flash trading. Would you describe what flash trading is?

Mr. SALMON: In the stock market, it's a little bit like journalism in a way. You want to be faster than anyone, smarter, and smarter than anyone faster. And so one of the ways that firms compete in the stock market is they try just simply to compete on speed. They want to be able to make trades a fraction of a millisecond faster than anybody else.

And so what they do is they take their computers, and they literally place them right in the same room as the stock exchange, in the same racks as the stock exchange's computers so that when they place an order and it moves at the speed of light down the wire, that wire is shorter than some other wire, which might have to be a couple of miles long.

It's - you wind up having programs written specifically for the architecture of certain computer chips. And you get computer chip employees, company employees, being - acting as consultants for quants and stuff, trying to explain how these computer programs can be written so that the computer chip can make its decision just a tiny fraction of a millisecond faster than the other guy.

And so what they're - at this point, you're not trying to crunch enormous amounts of information and make big trades which might last for weeks or months. Instead, you're just trying to get into the market and do what traders have always done.

Human traders have always tried to be fast. They've always been trading back and forth very, very quickly. But these machines have moved that by orders of magnitude, many, many orders of magnitude. And you can get these trades just happening super, super fast, buying and selling stocks.

They don't really know where the stock is moving or care. They just want to be in there, right in the middle of the market, making these tiny little spreads on where the stocks are trading.

GROSS: So let me ask you, if computers are basically running a lot of the market now, making the decisions, what is happening to the people who used to make the decisions?

Mr. SALMON: There are many fewer traders on the floor of the stock exchanges than there used to be. You know the old visions of the men in bright jackets, all screaming at each other? That doesn't really happen anymore. It all happens over computers these days.

And in general, what you have is more hedge funds, fewer enormous brokerages and Wall Street shops trying to just stay on top of the mechanics of making trades and of clearing trades and of buying and selling stocks because all of that has become computerized.

It's, you know, a move - Wall Street becomes a slightly different business and, you know, it does - you get more computer wonks and fewer old-school traders and screamers in trousers. It's the evolution of the market.

GROSS: If you're just joining us, my guest is financial journalist Felix Salmon. He's a blogger for reuters.com and he has an article in the January edition of Wired called "Algorithms Take Control of Wall Street." Let's take a short break here, and then we'll talk some more. This is FRESH AIR.

(Soundbite of music)

GROSS: My guest is Felix Salmon. He's a financial journalist. He's a blogger for reuters.com, and he has an article in the current edition of Wired called "Algorithms Take Control of Wall Street."

GROSS: So let's look a little more closely at the flash crash from last May. Can you explain how this algorithmic approach to investing played a part in the market dropping 573 points in five minutes?

Mr. SALMON: What happened is there was one relatively obscure mutual fund company which decided that it wanted to hedge its positions in the market. It owned a lot of stocks and it wanted to protect against the eventuality that the stock market would fall.

And so one of the ways that you do that is you sell stock market futures, it's a natural hedge in the futures market. And they made a relatively large trade in the futures market and they used an algorithm to make that trade, like everyone always does these days. And when you use an algorithm, you can set a whole bunch of different parameters, including how quickly you want that trade made.

So if I'm selling a million shares of IBM, I might go up to my, you know, Wall Street bank and say, listen, use your algorithm to sell these shares and make sure that you do it in the next day.

What this guy did was he used his algorithm. He said, sell these futures and make sure you do it in the next 20 minutes. And that's a very short amount of time to do a trade that big. And so the fact that such a large trade went through the market so quickly is - that fact moved the market and it sent the stock market futures down substantially.

And that kind of move gets picked up on by all of the other computers. They see this sudden, unexplained drop in the market and they see the little uptick in volume and they say, ooh, we've got the signs of a panic here. We've got the signs of what could be a big drop.

They're looking at all manner of other technical indicators, as well, but they all seem to come to the same decision that what they should do is either get out of the market completely or start selling. And there was almost no one in the market buying.

And in that situation, you can get this massive plunge because you have pretty much the normal amount of sellers. Most people just stepped back and said, we don't want any part of this market. But you have no buyers at all. And when you have no buyers, the price of the market can just drop precipitously, and that's exactly what happened.

So it is hard to protect against. We have no real mechanism to be able to stop this from happening. And what we do have is very blunt instruments about just saying, well, every single stock market in the entire country should simply close down when the market or a single stock has moved more than five percent or 10 percent, these things called circuit-breakers.

They're very blunt instruments and they don't work particularly well, but for the time being, they're all that we have.

GROSS: Let's get back to the flash crash of last May, where the stock market lost 573 points. I guess it was the Dow Jones, lost 573 points in five minutes. And one North Carolina utility company lost 90 percent of its share price in less than five minutes. Apple share dropped nearly four percent in 30 seconds. And those two trades were cancelled because it was...

Mr. SALMON: Actually, in the flash crash, it was interesting. While everything else was crashing, there was a trade of Apple at $100,000 a share.

GROSS: Wow, okay. So crazy, right? That's, like, totally out of proportion.

Mr. SALMON: Insane.

GROSS: And that was canceled, right?

Mr. SALMON: Yes.

GROSS: So is it unusual to have a do-over in the stock market like that?

Mr. SALMON: Yes, it is. And a lot of people were quite unhappy about that, but it makes sense. When you get something which is so clearly nonsensical and where the stock market just broke, then you shouldn't be able to profit off someone else's misfortune.

For instance, let's say that you, Terry Gross, have a margin account at a stock brokerage, and I would recommend that you don't because it's a great way of losing money, but you might have a stop-loss order in there. You might say, I have a bunch of shares of IBM and if they fall below a certain price, then just sell them because at that point, something bad is going on and I don't want to lose too much money.

And so you say, okay, so if the stock falls below $30 a share, then I want to sell. But in something like the flash crash, that stock might straight from $35 a share to $1 a share with nothing in between. And then your market order to sell, when it drops below $30 a share, you suddenly only get $1 a share, and you thought you were protecting yourself.

You thought that you would just sell at 30 and protect yourself from any further losses, but in fact what you wound up doing is making all of those losses by selling at $1 a share instead of doing nothing and waiting for it to come back. And so - as it did in a matter of a few minutes.

So what the stock market did when it canceled all of those trades is basically protect people like that, who'd put in these orders and who would otherwise have made enormous losses.

GROSS: So are there rules in effect for when to do a do-over?

Mr. SALMON: No.

GROSS: I mean, now that all these algorithms, competing algorithms are ruling the market and it's hard for any human to make sense of what's happening, and there's all these, like, positive and negative feedback loops happening, like, who says when there's a do-over and when there's not, and when you're protected from kind of nonsensical behavior caused by these algorithms and when you're not protected?

Mr. SALMON: In the big picture, we're not protected. And it would be foolish for anyone to expect to be protected. There are no rules saying that there has to be a do-over if certain actions happen. It's entirely up to the discretion of the exchanges and the regulators.

And sometimes they will step in and say, you know what, that was a bad trade. Undo that trade, it never happened. At other times, they won't, and they'll let that trade stay. And you can't - it's fundamentally unpredictable and it's not something which people should really take any solace in.

So it's a good idea, as I say, not to play in the market. This is one of the good reasons why individual investors should probably avoid having these margin accounts and putting in these trades because if something crazy does happen in the market, they might wind up making some insane trade inadvertently and they might not have that trade rescinded. It's a very dangerous place, or it can be.

GROSS: When you look at the new shape of Wall Street now, what are some of the warning signs that you see, some of the dangers?

Mr. SALMON: The main danger about algorithmic trading is that we simply don't understand it. We don't understand how the stock market works or, to be precise, how the stock markets work because there's over a dozen of these things now.

We don't understand the feedback loops between them. We don't understand what causes individual stocks or entire market indices to move. We have an incredibly complex system with only the most rudimentary controls.

And we got a hint of what could happen last May, during the flash crash, but we have no idea what other things might happen. We don't have any ability to - we don't have a sort of flight simulator for stock markets where we can run a whole bunch of possible scenarios and see how the stock markets might react.

We really have no idea how these markets work or how these complex systems work or how they might just explode one day in a very unpredictable manner. And so the big problem here is uncertainty.

There's lots of what's known as tail risk. We - most of the time, it works great. Most of the time, computerized trading and algorithmic trading makes stock markets more efficient and it makes it easier and cheaper for investors, both large and small, to trade. And it's a good thing for everybody.

But every so often, things can go horribly wrong, and we don't know when, and we don't know how, and we don't know what the consequences might be. And that huge uncertainty is, I think, the biggest danger in the markets right now.

GROSS: Felix Salmon, thank you so much.

Mr. SALMON: Thank you very much.

Felix Salmon's article, "Algorithms Take Control of Wall Street," is published in the January edition of Wired magazine. He writes about the financial world for reuters.com.

I'm Terry Gross, and this is FRESH AIR.

Copyright © 2011 NPR. All rights reserved. No quotes from the materials contained herein may be used in any media without attribution to NPR. This transcript is provided for personal, noncommercial use only, pursuant to our Terms of Use. Any other use requires NPR's prior permission. Visit our permissions page for further information.

NPR transcripts are created on a rush deadline by a contractor for NPR, and accuracy and availability may vary. This text may not be in its final form and may be updated or revised in the future. Please be aware that the authoritative record of NPR's programming is the audio.

Comments

 

Please keep your community civil. All comments must follow the NPR.org Community rules and terms of use, and will be moderated prior to posting. NPR reserves the right to use the comments we receive, in whole or in part, and to use the commenter's name and location, in any medium. See also the Terms of Use, Privacy Policy and Community FAQ.

Support comes from: