Stocks reversed most of an earlier selloff, helped by rumors that the Federal Reserve would soon cut the discount rate.
"There are rumors in the market, which are unsubstantiated, that there is potentially a Fed discount rate cut coming imminently," said Bobby Harrington, head of block trading at UBS. "That seems to be a strong speculative situation going around the Street. You saw the Dow rally nearly 200 points. It wouldn't be out of the question, given the news we've had from the credit side of the equation today."
The Dow Jones Industrial Average erased a 1.5% drop to close little changed, while the S&P 500 ended down 0.2% after erasing most of a 2% decline. The Nasdaq finished off 0.9% after erasing most of a 2.8% loss.
"It was a rollercoaster ride and I didn't buy a ticket," said Christopher Ailman, chief investment officer of Calstrs.
The earlier selloff was prompted by disappointing earnings reports from Merrill Lynch and Amazon.com as well as more bad news on the housing slump.
Merrill Lynch , the world's largest brokerage, reported its first quarterly net loss in six years, blaming bad bets on risky subprime mortgages and related securities.
The broker reported a per-share loss of $2.85, widely missing the consensus analyst forecast of 45 cents in earnings. Merrill attributed to write-downs of $7.9 billion due to subprime mortgages, higher than the $4.5 billion write-down it previously expected.
Standard & Poor's lowered their credit ratings on Merrill Lynch following the earnings report, accelerating the market downturn.
"I think what you're seeing here is just the beginning," said Sarat Sethi, portfolio manager with Douglas C. Lane. "You're seeing the market not react positively to the write-downs like they did two weeks ago because they really don't know.
Online retailer Amazon.com posted third-quarter earnings above Wall Street estimates but shares plunged due to concerns about the company's profit growth outlook.
"Clearly, the weakest area of the credit market is the mortgage space," said Michael Darda, chief economist at MKM Partners. "It's clear we're having the second leg in the housing drag, which is going to last well into 2008."
The semiconductor sector suffered its worst drop in three years as chipmaker Broadcom reported late on Tuesday a 75 percent fall in profit, sending the stock plunging by more than 15 percent. Shares of chip bellwether Intel were also trading sharply lower.
Boeing said third-quarter profit rose more than expected, helped by higher deliveries of commercial planes, but Boeing scaled back its revenue forecast for next year due to delays on its 787 Dreamliner.
ConocoPhillips offered investors an early glimpse at how the major oil companies are faring. The company's third-quarter profit fell as lower refining margins outweighed higher crude oil prices but results beat Wall Street estimates, sending shares higher.
Oil prices raced higher following an unexpected fall in weekly inventories, which added to fears that supplies are shrinking ahead of winter demand. Light sweet crude futures rose on the New York Mercantile Exchange.
U.S. Treasuries gained more ground on Wednesday after data on existing home sales for September came out weaker than expected, supporting expectations of a bond-friendly rate cut at next week's Federal Reserve meeting.
In the health care sector, GlaxoSmithKline posted lower third quarter profit, sending shares lower. The company said it was hampered by poor sales of its Avandia diabetes drug along with generic competition, and reported it would cut an unspecified number of jobs and close sites to reduce costs.
Genzyme said third-quarter earnings soared from a year earlier, when it took an acquisition-related charge, and the company beat estimates.