A programming error on a massive trade by a broker-dealer on Friday nearly caused a "disastrous" set of events at market close that could have cost millions, but was caught by a person overseeing end of day trading, the exchange, owned by NYSE Euronext (>> NYSE Euronext), said.

The event illustrates the difference in market structure between a fully electronic exchange and the Big Board, which has a hybrid system where the open and close are monitored by flesh and blood "Designated Market Makers" (DMMs), said Lou Pastina, executive vice president of operations at NYSE.

The U.S. Securities and Exchange Commission has been taking a deep look into market structure issues ever since the May 6, 2010 flash crash. Its sanctioned electronic exchange Direct Edge Holdings LLC in October, saying weak internal controls led to millions of dollars in trading losses and a systems outage.

The SEC is now considering forcing Nasdaq OMX Group (>> NASDAQ OMX Group, Inc.) to upgrade its trading systems following Facebook's (>> Facebook Inc) May 18 market debut, which was marred by technical glitches that led to losses estimated in the hundreds of millions, according to a Wall Street Journal report.

WRONG MONSTER

At 3:59:59 p.m. Eastern time on Friday, a broker-dealer placed an order for 17 million shares of Monster Worldwide (>> Monster Worldwide, Inc.), which was trading at $8.50 a share, with no offers in site.

Typically, when an order comes in at the close, NYSE has a procedure to go out and solicit contra-side interests to fill the order, but given the thin book for Monster Worldwide, something smelled off this time, said Pastina.

The DMM saw it, alerted the operations staff, the stock was halted, and the broker-dealer was contacted. It turned out the broker-dealer did not want to buy Monster Worldwide. Rather, it was looking to buy an unspecified amount of Monster Beverage Corp (>> Monster Beverage Corp), the Sara Lee coffee and tea spinoff that was a new entrant to the S&P 500.

"They had a programming error, so we were able to prevent a disastrous situation," said Pastina.

Total trading volume on Friday in online job firm Monster Worldwide did not even hit 1 million shares.

Had the 17 million share order gone through, the stock, which had a share buy imbalance of 17,000, would have soared as the buy orders - there were about 60 of them - would have continued to automatically execute until there were no more offers.

It would have clearly been an erroneous execution.

"Anybody who would have sold that stock would have thought, 'hey, this is terrific,' but it would have been subject to a clearly erroneous trade," said Pastina.

"That may have come later and they may have sold that stock and turned around and used that money to buy something else, and it would have been a compound error for the sellers."

(Reporting By John McCrank)

By John McCrank