Stocks climbed on Tuesday as natural resource shares rose alongside commodities and Kraft's bid for Cadbury buoyed hopes that more merger and acquisition activity was on the horizon.

Kraft Foods Inc said it was intent on pursuing Britain's Cadbury Plc , which rejected a $16.7 billion bid from the U.S. company. Kraft shares tumbled 4.7 percent to $26.77, limiting gains on the Dow.

M&A activity may signal investors that some shares are considered inexpensive, analysts said. The Kraft bid comes on the heels of Walt Disney Co's deal last week to buy Marvel Entertainment Inc for $4 billion.

It reinforces that M&A is not dead here by any means, said Tim Ghriskey, chief investment officer of Solaris Asset Management in Bedford Hills, New York. We'll see more of that as the rest of the year unfolds.

Although Kraft stock fell, other food companies rose, including Hershey Co , which gained 1 percent to $39.02. Some analysts point to the possibility of Hershey and Nestle mounting a joint bid for Cadbury.

The Dow Jones industrial average <.DJI> gained 53.96 points, or 0.57 percent, to 9,495.23. The Standard & Poor's 500 Index <.SPX> rose 8.09 points, or 0.80 percent, to 1,024.49. The Nasdaq Composite Index <.IXIC> put on 12.10 points, or 0.60 percent, to 2,030.88.

Energy shares led the S&P 500 higher as oil futures jumped 5 percent to top $71 a barrel on the back of the weakening dollar. Chevron Corp rose 2.7 percent to $70.52, while the S&P index of energy companies <.GSPE> was up 2.7 percent.

Newmont Mining Corp jumped 2.6 percent to $47.39 as spot gold rose above $1,000 an ounce to its highest level since March 2008 on a wave of technical momentum and dollar weakness.

Health insurance stocks <.HMO> sagged 1 percent ahead of U.S. President Barack Obama's address to Congress on Wednesday. He is expected to outline his proposed revamp of the healthcare system.

The sector had actually begun to stabilize with the belief that there would be gridlock in Washington over the issue. That is still the consensus view, but on the other hand, it's not the final view, said Solaris' Ghriskey.

Shares of General Electric Co advanced 5.1 percent to $14.57 after J.P. Morgan Securities upgraded the stock to overweight from neutral, saying it was one of the last equities for which a little good news could still go a long way.

Shares of iPod maker Apple Inc rose 1.5 percent to $172.77 after Morgan Stanley raised its price target to $200 from $195. The firm also raised the U.S. systems and PC hardware sector to attractive from in line.

(Reporting by Leah Schnurr; additional reporting Chuck Mikolajczak; editing by Jeffrey Benkoe)