Investors bought attractively valued shares Wednesday, sending the Nasdaq composite index up 2 percent ahead of Google's much-anticipated initial public offering of stock. The Dow Jones industrial average rose more than 110 points.
Fear of terrorism and the premium it has added to oil prices have rattled investors, exacerbating the volatility usually associated with late-summer trading.
Analysts remained upbeat about the market's underlying fundamentals.
"People have a tremendous capacity to adapt," said Ken Tower, chief market strategist for Schwab's CyberTrader. "No story stays in the news forever. So it's just possible that the market has now fully discounted higher prices of oil and is poised to move higher."
The Dow gained 110.32, or 1.1 percent, to close at 10,083.15.
The broader gauges also finished higher. The Nasdaq climbed 36.12, or 2 percent, to 1831.37. The Standard & Poor's 500-stock index rose 13.46, or 1.2 percent, to 1095.17.
Despite the strong performance of tech shares, some analysts questioned the conviction behind the buying. Valuations within the sector, which has been badly bruised, have fallen to appealing levels, but that may not be enough to sustain the rally.
"I wouldn't take today's move as a change in sentiment, or any positive sign at all," said Neil Massa, equity trader at John Hancock Funds. "I think we're still stuck in this trading range. I think investors are truly worried about third- and fourth-quarter profits. They were expecting a robust recovery . . . and it just doesn't look like that's happening."
Investors have grown increasingly worried about inflation in the face of rising energy prices, and a stream of lowered earnings forecasts for the second half of the year has added to that anxiety.
Applied Materials finished up 9 cents, at $16.16, after reporting better-than-expected revenue and earnings that beat Wall Street estimates by a penny a share. Executives described a climate of healthy chip spending, but the company's forecast for the next quarter was somewhat disappointing, giving investors a mixed impression.
BellSouth fell 5 cents, to $27.15, after saying a new medical benefits plan for its retirees will dent earnings by 3 to 4 cents a share in the fourth quarter.
Mylan Laboratories added 22 cents, to $15.58, after saying it would appeal a federal court ruling that found the Food and Drug Administration violated no law when it rejected the company's application for a generic pain patch treatment.
* The New York Stock Exchange composite index rose 66.48, to 6386.73; the American Stock Exchange index rose 8.01, to 1216.66; and the Russell 2000 index of smaller-company stocks rose 11.61, to 541.61.
* Advancing issues outnumbered declining ones by 7 to 2 on the NYSE, where trading volume rose to 1.28 billion shares, from 1.26 billion on Tuesday. On the Nasdaq Stock Market, advancers outnumbered decliners by 109 to 1 and volume totaled 1.54 billion, up from 1.36 billion.
* The price of the Treasury's 10-year note fell $3.75 per $1,000 invested, and its yield rose to 4.24 percent, from 4.20 percent on Tuesday.
* The dollar fell against the Japanese yen and rose against the euro. In late New York trading, a dollar bought 109.34 yen, down from 110.02 late Tuesday, and a euro bought $1.2324, down from $1.2344.
* Light, sweet crude oil for September delivery settled at $47.27, up 52 cents, on the New York Mercantile Exchange.
* Gold for current delivery rose to $404.30 a troy ounce, from $404.00 on Tuesday, on the New York Mercantile Exchange's Commodity Exchange.