If the stock market takes a fast dive, it might not be because of panicked traders. It might be panicked robots.

In the last few years brokerage firms have relied more on autonomous software agents to manage trades, which do most of the routine work. A group of researchers at the University of Miami has found a dark side, though: the trading can be too fast and such programs aren't smart enough to know when to stop following their instructions. That can cause crashes in a single stock, or market-wide swings like the 2010 "Flash Crash" which resulted in a 1,000 point drop in the Dow Jones Industrial Average, representing 9 percent of its value. Their study, which looked at trading between January 2006, through February 2011, appears in the latest issue of the journal Scientific Reports.

Hack a Twitter Account, Rake In Stock Profits

The study notes that competition between financial firms has driven the development of ever-faster trading programs. Some can prepare a trade in 740 nanoseconds. By comparison a human being can react to danger in about a second – more than 1,000 times slower.

The group, led by Neil Johnson, a physicist, studied what they called "ultrafast extreme events" in the markets over the past several years. "Ultrafast" means any spike or drop of more than 0.8 percent in a stock price over a period of a 1.5 seconds or less.

They found there was an explosion of such events, 18,520 in fact, after 2006 with most of the event rising rapidly between late 2006 and early 2009.

Such price movements couldn't have been driven by the news of the day, which is what typically cause human traders to get nervous, because the trades happened much too quickly.

What is the Value of Money?

Johnson's team also came up with a model of why computer programs and markets behave this way. The issue, they said, is similar to what happens in an ecosystem when a new predator is introduced. Ordinarily the predators and prey - the buyers and sellers - are in relative balance. But add a new factor, in this case, traders who can execute an order in a second, and that balance is disrupted. A tiny price movement in less than a second might sound benign, but there's always a chance that the markets will not regain their equilibrium. The Flash Crash was only one example of what might happen.

Knowing how and why the trading ‘bots behave has applications outside of finance. The patterns for trading programs might also be applicable to analyzing cyber attacks. "Our math model is able to capture this collective behavior by modeling how these cyber mobs behave," Johnson said in a press release.

Credit: REUTERS/Lucas Jackson/Files