Stocks rose Tuesday as investors welcomed a plunge in the price of oil, easing concerns that high energy costs will drag on the economy, and digested  Fed chief Alan Greenspan (search)'s pledge that the central bank would do "what is required" to curb inflation.

The  Dow Jones industrial average (searchclosing up 41.44 points, or 0.40 percent, at 10,432.52. The Standard & Poor's 500 Index (searchended up 1.76 points, or 0.15 percent, at 1,142.18. The technology-focused Nasdaq Composite Index (searchrose 2.91 points, or 0.14 percent, to 2,023.53. Major indexes set new highs for the last four weeks.

Stocks hovered around the unchanged mark most of the session, but popped firmly into positive territory in the last hour of trading as investors watched crude oil futures drop to below $37 a barrel. That is a far cry from early June highs above $42, which sent the market into a flurry of doubt over the sustainability of the economic recovery.

Traders pinned the decline on OPEC quota increases and growing U.S. oil and gas inventories, lessening the likelihood of summer shortages.

The gains were led by IBM (IBM), Microsoft (MSFT) and Procter & Gamble (PG). However, home builders retreated after Dominion Homes Inc. forecast quarterly home sales well below a year ago due to rising interest rates.

"It's heartening that the gains from yesterday are being held and profit-taking did not ensue," said Michael Sgro, equity manager for Chase Personal Financial Services. "I really expected that the no-news of yesterday, and the no-news of today on the economic front, was going to cause some nervousness in the market."

Trading was very light in what will be a shortened week, as the New York Stock Exchange (search) and Nasdaq will be closed on Friday in honor of former president Ronald Reagan.

Greenspan said the Fed was prepared to abandon a gradual, measured series of rate hikes in favor of larger increases should higher oil prices trigger a more general rise in inflation.

While the prospect of larger and faster rate hikes unnerved Wall Street in the past — and did so again in the early part of Tuesday's session — many investors were cheered by Greenspan's uncharacteristically straightforward statement, and noted that rate hikes in response to a strong economy fit past patterns of bull markets.

"I think because this statement was so crystal clear and unambiguous, we aren't seeing the major selling that we saw in the past," said Hugh Johnson, chief investment officer at First Albany Corp. "He really hit this on the head, and there's no need to parse or interpret this. That makes it a lot easier for the markets to digest and account for."

Speaking in London, Greenspan may have signaled that the Fed might raise rates by a half percentage point at the end of the month, instead of the quarter-point raise Wall Street had been expecting.

Although such a warning would have sent stocks skidding a month ago, Wall Street would now welcome a curb on inflation, given that oil prices are still near record-high levels. And analysts noted that even with a series of rate hikes through the rest of the year, interest rates would still be low compared with past bull markets.

Computer giant International Business Machines Corp. (IBM) led the Dow higher, rising $1.40 to $90.04. Procter & Gamble Co. was the S&P 500's biggest support, adding 79 cents to $110.29. Microsoft Corp. led the Nasdaq higher, rising 17 cents to $26.60.

On the Nasdaq, Dominion Homes Inc. (DHOM)was one of the biggest percentage losers, a day after it said April and May unit sales were down 15 percent from year-ago levels. Its shares gave up $4.50, or 15.3 percent, to $24.83.

The Dow Jones Home Building Index slid 2.7 percent.

Texas Instruments Inc. (TXN) was among the New York Stock Exchange's most actively traded issues, a day after it narrowed its earnings outlook to the high end of its previous range, which disappointed investors counting on bigger gains. TI shares fell 19 cents to $26.04.

Oracle Corp. (ORCL) gained 17 cents to $11.59 as its antitrust trial over its potential acquisition of PeopleSoft Inc. got under way. The database software maker said the deal would make the market for database software more competitive, not less. PeopleSoft was up 57 cents at $19.03.

Microsoft Corp. (MSFT) continued its own antitrust battles, filing an appeal of a European Union decision that would require the software giant to change its business practices. Microsoft climbed 17 cents to $26.60.

Tribune Co. (TRB) dropped $1.76 to $46.92 as it announced it will cut more than 200 jobs at its newspapers due to falling advertising revenue. It also lowered its revenue forecasts for the year.

Trading was light, with 1.2 billion shares changing hands on the New York Stock Exchange, below the 1.4 billion daily average for last year. About 1.5 billion shares were traded on Nasdaq, under the 1.7 billion daily average last year.

Decliners outnumbered advancers 17-to-15 on the NYSE and 17-to-13 on Nasdaq.

The Russell 2000 index of smaller companies was down 0.99, or 0.2 percent, at 577.91.

Overseas, Japan's Nikkei stock average rose 0.7 percent. In Europe, Britain's FTSE 100 closed up 0.3 percent, while Germany's DAX index and France's CAC-40 were both flat for the session.

Reuters and the Associated Press contributed to this report.