Aug 2 (Reuters) - The software glitch that cost KnightCapital Group $440 million in just 45 minutes revealsthe deep fault lines in stock markets that are increasinglydominated by sophisticated high-speed trading systems. But WallStreet firms and regulators have few easy solutions for suchproblems.

Automated trading can handle massive volumes of transactionsin milliseconds, something human traders could never do. But the benefits come at a cost: stock markets have become a jumbleof exchanges, market makers, high-frequency traders, andinvestors using different systems that can interact inunexpected ways.

The May 2010 'Flash Crash', in which U.S. stocksinexplicably sank in a matter of minutes, illustrated howtechnological problems can cascade. These sorts of problems maybe more likely given that many market participants are underpressure to cut costs - including technology spending - astrading margins narrow and regulation costs increase.

Since April, a series of embarrassing and costly technologyissues have rocked markets and shaken the confidence ofinvestors.

BATS Global Markets, an exchange, was unable tocomplete its own initial public offering because of a technicalproblem. Nasdaq botched the market debut of Facebook due to technical glitches, costing it tens of millions ofdollars, while UBS AG lost more than $350 million intrading Facebook shares and is blaming Nasdaq.

"The structure just may be too complicated to work," saidLarry Tabb, founder of Tabb Group, a consulting firm thatfocuses on capital markets.

"We may need to think about changing the structure of themarket to simplify this," Tabb added.

'DARK POOLS'

Others argue that regulators can continue to take relativelysimple steps, such as creating more finely tuned mechanisms tohalt stock trading when trading volumes or prices move too much.

Bernard Donefer, who teaches at the NYU Stern GraduateBusiness School and CUNY's Baruch College, said that new,broader limits on stock swings that are slated to be tested byregulators in February would have helped.

If the latest cars can sense approaching objects and stopautomatically, "we need those kinds of controls" in the marketsas well, he added.

In the old days, it was simpler: human traders known as"specialists" worked on the floors of stock exchanges, such asthe New York Stock Exchange, to match buyers with sellers andcomplete trades themselves if matches couldn't be made.

But over the past decade, those specialists have beenreplaced by automated trading systems, and much trading volumehas moved away from exchanges and into other venues, such as"dark pools" - trading systems that let investors anonymouslybuy or sell larger blocks of stock without tipping their hand toa wider market.

Knight Capital, which makes most of its money by executingtrades for other brokerage firms, said that a new trading systemit installed sent a flood of bogus trades to the market. Theloss means that the firm is now fighting for its survival.

BETTER TESTING

Outsiders questioned why Knight did not pre-test the newsoftware more assiduously, and why the bad trades continued tobe generated for more than half an hour, instead of being shutdown by internal systems almost immediately.

New York quantitative hedge fund owner Roy Niederhoffer saidthat there was "no excuse" for Knight failing to act sooner.

"This is like a nuclear reactor or aircraft," saidNiederhoffer, whose R.G. Niederhoffer Capital Management usesKnight. "There has to be some way of seeing the state of thewhole system."

Trading system glitches often arise with the installation ofnew systems or computer code. But experts said that marketparticipants constantly need new systems to accommodate newrules and changing customer demands - particularly fromhigh-frequency traders.

For example, many trading systems were modified this week toconform with a new retail order-taking system introduced at theNew York Stock Exchange and to accommodate a French securitiestransaction tax that took effect on Wednesday.

The U.S. Securities and Exchange Commission has beengrappling for years with ways to create a national market systemthat uses technology to ensure that orders to buy and sellshares are sent to the best possible exchange, dark pool, orother venue. After the shock of the 2010 Flash Crash, it alsobegan exploring fail-safe mechanisms to preventtechnology-induced disasters.

Some of those measures, including halting trading in a stockthat rises or falls beyond predetermined limits, k icked in onWednesday, protecting investors but not saving Knight fromlosing big.

To be sure, many experts pooh-poohed the wider significanceof Knight's problem.

"Coding problems happen, but it's not an industry issue,"said Matt Andresen, founder of proprietary quantitative tradingfirm Headlands Technology and a former trading head at a Knightcompetitor. "I don't know what happened at Knight, but they hada self-inflicted problem that only hurt them. That's the way themarket is supposed to work."

Maureen O'Hara, a finance professor at Cornell Universitywho sat on a special advisory panel that explored Flash Crashreforms, agreed. "I'm very worried people will take a look andsay there is something fundamentally wrong with the market, andthere isn't," she said.

Some traders and critics said that more details need to comeout before they could draw too many conclusions other than theimportance of software testing.

One thing that's clear: the financial system is much moreelaborate now than it was a decade ago, and finding solutions tomarket problems is not easy.

"We have a very complex financial system, bordering on thebaroque," said NYU's Donefer.