US stocks gained on Wednesday, with the S&P and Nasdaq reaching four-year highs late in the day, after Federal Reserve Chairman Alan Greenspan made optimistic remarks about the US economy and oil slipped below $57 a barrel. After the closing bell, shares of eBay Inc jumped to $38 in after-hours trading following the Internet auctioneer's announcement that profit soared 53 percent. eBay had dropped 1.4 percent in the regular session to $34.87.
Greenspan, in one of his last semi-annual reports on the economy to Congress as Fed chief, said the US growth outlook was solid and the Fed should keep raising interest rates.
"I think he's right the economy is percolating, which is good," Simpson said. "He said he's going to raise rates and that scares the Street, but overall, it's bullish."
The Dow Jones industrial average 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 rose 5.85 points, or 0.48 percent, to close at 1,235.20. The technology-laced Nasdaq Composite Index climbed 15.39 points, or 0.71 percent, to end at 2,188.57.
The Dow Jones Transportation Average had its best day in two years as package shipping and trucking companies benefited from the pullback in crude prices and Greenspan's remarks.
Big gains in biotech stocks like Amgen Inc, up 15 percent on strong earnings, boosted both the S&P 500 and the Nasdaq, reflecting investors' belief that these shares still have room to rise.
US August crude oil futures settled at $56.72 a barrel, down 74 cents, after government inventory data showed crude stocks declined last week far less than expected, indicating import disruptions due to Hurricane Dennis were not as severe as thought. The August crude contract expired at the close of regular NYMEX trading on Wednesday.
"Truckers will move off a downtick in oil and on good economic news because they are one of the sectors most sensitive to the economy," said Warren Simpson, managing director at Stephens Capital Management in Little Rock, Arkansas.
In the transport sector, United Parcel Service Inc jumped 3.8 percent to $72.82 on the New York Stock Exchange, while J.B. Hunt Transport Services Inc shot up 6.6 percent to $20.21 and Yellow Roadway Corp climbed 5.2 percent to $55.70, both in Nasdaq trading.
Shares of Alcoa rose 1.6 percent to $28.54 on the New York Stock Exchange. Honeywell, which also reported better-than-expected earnings, climbed 3 percent to $38.73.
The world's largest biotechnology company, Amgen Inc, soared 15.1 percent to $81.17 on Nasdaq after reporting a 38 percent jump in second-quarter profit. Amgen's advance helped push the Amex biotech index up 4.2 percent to 635.55 - its highest in more than four years.
But some bellwether technology stocks slumped on Wednesday after reporting earnings that fell short of some expectations.
Intel Corp, the world's largest maker of computer chips, fell 4.4 percent to $27.44 after it reported higher earnings but production constraints prevented the results from exceeding expectations.
Internet media company Yahoo Inc dropped 11.5 percent to $33.40 a day after it reported revenue that was below analysts' expectations.
In more earnings news, General Motors Corp, the world's largest automaker and a Dow component, slipped 0.7 percent to $36.58 after it posted an unexpected loss.
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.02 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.