(REUTERS) -- Stocks opened sharply higher on Tuesday as better-than-expected Chinese and German data boosted optimism about the global economy after the S&P 500 index ended flat in 2011.

The Dow Jones industrial average gained 201.17 points, or 1.65 percent, to 12,418.73. The Standard & Poor's 500 Index rose 22.01 points, or 1.75 percent, to 1,279.61. The Nasdaq Composite Index climbed 54.85 points, or 2.11 percent, to 2,660.00.

(Reporting By Chuck Mikolajczak)