Stocks rose for a third day yesterday as the Standard & Poor's 500-stock index overcame higher oil prices to close at a three-month high.

Benchmarks, down for most of the day, staged an afternoon rally as crude oil retreated from the day's highs. Investors also were encouraged by government reports showing an increase in industrial production and a drop in consumer prices. Energy and raw-material producers such as Exxon Mobil and U.S. Steel led the advance.

"With low inflation, low interest rates and productivity still strong, the market looks undervalued to us," said John Calamos Sr., who manages $38.9 billion as chief executive of Calamos Asset Management in Naperville, Ill.

The S&P 500 rose 2.67, or 0.2 percent, to 1206.58, its highest since March 14. The Dow Jones industrial average gained 18.80, or 0.2 percent, to 10,566.37, the best since March 18. The Nasdaq composite index climbed 5.88, or 0.3 percent, to 2074.92.

Movers

Exxon advanced 70 cents, to $59.25, as an S&P 500 index of energy shares increased 1.2 percent, the best performance among 10 industry groups. Chevron gained 71 cents, to $56.84.

U.S. Steel gained $2.50, or 6.5 percent, to $40.71. A gauge of materials stocks climbed 0.8 percent, the second-biggest increase in the S&P 500. Industrial production increased more than expected last month in China, the world's biggest steel consumer.

Napster rose 10 cents, to $4.43. The company agreed to start an online music service in the coming 12 months with Ericsson, the world's top maker of cellular phone networks, to compete against Apple Computer and Motorola.

Chiron tumbled $2.48, or 6.5 percent, to $35.47, for the steepest decline in the S&P 500. The drugmaker will produce fewer flu shots this year than estimated after struggling to reopen a plant in Britain, where a closure last year caused a vaccine shortage in the United States.

Royal Philips Electronics' U.S. shares dropped $1.14, to $25.95. Europe's biggest maker of televisions and coffee machines said consumer demand is lower this quarter.

Indexes

New York Stock Exchange composite index rose 21.25, to 7256.39.

American Stock Exchange index rose 15.41, to 1550.55.

Russell 2000 index of smaller-company stocks rose 18.54, to 652.93.

Volume

NYSE: 1.39 billion shares, up from 1.32 billion on Tuesday. Advancers outnumbered decliners 3 to 2.

Nasdaq: 1.71 billion shares, up from 1.43 billion. Advancers outnumbered decliners 9 to 7.

Commodities

Crude oil for July delivery: $55.57, up 57 cents.

Gold for current delivery: $429.10 a troy ounce, up from $427.50 on Tuesday.