Rising commodity prices and stirrings of corporate takeovers are making investors more optimistic about the economy.
Stocks rose for the third straight day Tuesday following gains among materials and energy stocks.
Gold topped $1,000 an ounce for the first time since February and oil jumped more than $3 a barrel as investors look for more ways to profit from an improving economy. A weaker dollar also helped push commodity prices higher.
Talk of a revival in corporate dealmaking also lifted investors' confidence.
A takeover bid from Kraft Foods Inc. for rival Cadbury -- even though Cadbury rejected it -- combined with a big phone deal in England lifted hopes that takeover activity could be picking up. Deutsche Telekom and France Telecom said they planned to combine their British mobile phone units to form that country's biggest mobile operator.
A weekend pledge by the world's 20 biggest economies to support the global recovery with stimulus efforts also helped keep the market's tone positive.
George F. Shipp, chief investment officer at Scott & Stringfellow in Virginia Beach, Va., said U.S. markets are advancing in part to catch up with overseas trading after the Labor Day holiday in the U.S. He also said the takeover talk surrounding Cadbury underscores the fact that some companies are faring better than others.
"Some companies are doing reasonably well," Shipp said. "Chocolate is less susceptible to whatever is going to happen in mortgages and banking and unemployment."
According to preliminary calculations, the Dow Jones industrial average rose 56.07, or 0.6 percent, to 9,497.34. The broader Standard & Poor's 500 index rose 8.99, or 0.9 percent, to 1,025.39, and the Nasdaq composite index rose 18.99, or 0.9 percent, to 2,037.77.
Bond prices fell, pushing yields higher. The yield on the 10-year Treasury note rose to 3.48 percent from 3.45 percent late Friday.
The dollar fell against other major currencies and gold -- which is typically bought as a safe haven asset -- at times topped $1,000 an ounce before settling just short of that mark.
Crude oil rose $3.08 to settle at $71.10 a barrel on the New York Mercantile Exchange.
Tom Phillips, president of TS Phillips Investments in Oklahoma City, said investors are buying gold because they are nervous about the economy and rising deficits but don't want to miss more gains in the stock market. The S&P 500 index has jumped 50 percent from a 12-year low in early March.
"It is a flight to safety. It's kind of like everyone is hedging their bets. They want to be in the market because they don't want to miss out, but they're spooked," he said.
Freeport-McMoRan Copper & Gold Inc. rose $2, or 3 percent, to $68, while oilfield services company Schlumberger Ltd. rose $2.23, or 4 percent, to $58.10.
Meanwhile, General Electric Co. led the 30 stocks that make up the Dow industrials, rising 63 cents, or 4.5 percent, $14.50, after J.P. Morgan upgraded the company's shares saying that the market had already priced in most problems with the conglomerate's lending arm.
Among stocks moving on takeover talk, Cadbury jumped $14.42, or 38.5 percent, to $51.88. Kraft fell $1.65, or 5.9 percent, to $26.45.
The Russell 2000 index of smaller companies rose 5.88, or 1 percent, to 576.38.
Three stocks rose for every one that fell on the New York Stock Exchange, where volume came to 1.3 billion shares compared with 1 billion traded Friday.
Britain's FTSE 100 and Germany's DAX index rose 0.3 percent, while France's CAC-40 advanced 0.2 percent. Japan's Nikkei stock average rose 0.7 percent.