Updated

Stocks turned positive Wednesday after oil prices fell below $57 a barrel and as investors focused on the positive aspects of Federal Reserve Chairman Alan Greenspan's comments about the U.S. economy.

The Dow Jones industrial average (search) gained 42.59 points, or 0.40 percent, to end at 10,689.15, marking a reversal from the morning's declines. The Standard & Poor's 500 Index (search) rose 5.85 points, or 0.48 percent, to close at 1,235.20. The technology-laced Nasdaq Composite Index (search) climbed 15.39 points, or 0.71 percent, to end at 2,188.57.

After the closing bell, shares of eBay Inc. (EBAY) jumped 14 percent to $39.87 following the Internet auctioneer's announcement that profit soared 53 percent. eBay had dropped 1.4 percent in the regular session to $34.87.

The market opened lower as investors punished Intel Corp. (INTC) and Yahoo Inc. (YHOO) after their earnings reports, issued following the close of regular trading Tuesday, fell below analysts' expectations. Stocks briefly slid further after Greenspan told Congress that the economy should enjoy sustained growth with low inflation in coming months, a sure sign incremental interest rate hikes would continue.

But the selloff didn't stick — additional rate increases have long been expected. The market tends to fall when Greenspan starts talking and gain when he's done, said Todd Leone, managing director of equity trading at SG Cowen Securities.

"It's the uncertainty" that pushes stocks down, Leone said. "You never know what he's going to say, but today he said what everyone expected."

Investors also reconsidered the flow of earnings, which have been positive aside from a few high-profile disappointments.

Crude oil prices dropped more than $1 a barrel at one point after the Energy Department's weekly data on petroleum reserves was better than expected. A barrel of light crude settled at $56.72, down 74 cents on the New York Mercantile Exchange (search).

In his last monetary report to Congress before he retires, Greenspan's assessment of the economy was largely upbeat, although he listed three threats to the economic outlook. First, the possibility that wage pressures, which have been dormant, will intensify. Then, the threat posed by surging energy costs and finally, the dangers posed to the housing market if long-term interest rates rise considerably.

"The significant rise in purchases of homes for investment since 2001 seems to have charged some regional markets with speculative fever," Greenspan said.

He also said the increased use of exotic mortgages, such as interest-only loans, were of "particular concern." He said these types of mortgages left homeowners "vulnerable to adverse events" if home prices begin to fall.

Economically sensitive stocks like aluminum producer Alcoa Inc. (AA) and conglomerate Honeywell International Inc. (HON), both Dow components, helped lift blue chips. Shares of Alcoa rose 1.6 percent, or 44 cents, to $28.54 on the NYSE. Honeywell, which also reported better-than-expected earnings, climbed 3 percent, or $1.13, to $38.73.

The world's largest biotechnology company, Amgen Inc. (AMGN), soared 15.1 percent, or $10.65, to $81.17 on Nasdaq a day after reporting a 38 percent jump in second-quarter profit. Earlier in the session, Amgen's stock hit a lifetime high of $83.10, a gain of 17.8 percent.

Amgen's advance helped push the Amex biotech index up 4.2 percent to 635.55 -- its highest in more than four years.

Investors sold off General Motors Corp. (GM) after the automaker missed earnings forecasts by a wide margin. Its stock fell 25 cents to $36.58. The company reported a $286 million loss in the second quarter, dragged down by a $1 billion-plus loss at its North American automotive operations.

Traders punished other stocks that didn't live up to their expectations. Intel Corp. (INTC) fell $1.27 to $27.44 after it failed to increase its gross margin forecast when it reported earnings after the close of regular trading Tuesday. Investors also ignored Yahoo Inc.'s (YHOO) stellar earnings, reported after Tuesday's close, instead focusing on how the results missed analysts' lofty expectations. The stock dropped 11.5 percent to $33.38 .

"Tech stocks have had big rallies recently, and so you are seeing a pullback. With regards to Yahoo, not meeting revenue expectations is a 'no no,"' said Al Goldman, chief market strategist at A.G. Edwards. "GM also posted an unexpected loss and the market hates surprises."

In the transport sector, United Parcel Service Inc. (UPS) jumped 3.8 percent, or $2.67, to $72.82 on the New York Stock Exchange, while J.B. Hunt Transport Services Inc. (JBHT) shot up 6.6 percent, or $1.25, to $20.21 and Yellow Roadway Corp. (YELL) climbed 5.2 percent, or $2.75, to $55.70, both in Nasdaq trading.

Rick Applegate, president of First Commonwealth Financial Advisers, said he believed the transport sector's strong day indicated that many of these stocks, which recently took a beating on concerns about high oil prices and rising interest rates, may now be getting some analysts' attention because they offer good value.

Eastman Kodak Co. (EK) fell 64 cents to $28.10 after it suffered its second straight quarterly loss. The struggling photography company also announced as many as 10,000 additional job cuts on top of 12,000 to 15,000 already planned layoffs.

Trading was heavy on the NYSE, with about 1.58 billion shares changing hands, above last year's daily average of 1.46 billion, while on Nasdaq, about 2.03 billion shares traded, above last year's daily average of 1.81 billion.

Advancing stocks outnumbered declining ones by a ratio of about 2 to 1 on both the NYSE and Nasdaq.

The Russell 2000 index of smaller companies rose 8.70, or 1.30 percent, to 677.56.

Overseas, Japan's Nikkei stock average rose 0.21 percent. In afternoon trading, Britain's FTSE 100 was up 0.26 percent, Germany's DAX index was up 0.29 percent, and France's CAC-40 was down 0.13 percent.

Reuters and the Associated Press contributed to this report.