New York - A bit of positive data on the US economy gave stocks a boost on Tuesday, as traders brushed off new figures showing stalling European economic growth.
The Dow Jones Industrial Average eked out a gain of 17.18 points to close at 12 096.16.
The broad-based S&P 500 gained 6.03 points to 1 257.81, while the tech-heavy Nasdaq Composite rose 28.98 points to 2 686.20.
"Instead of focusing on lacklustre gross domestic product growth in the eurozone, or soaring Italian and Spanish bond yields, traders took the glass-half-full approach and celebrated a round of home-grown economic reports," said Andrea Kramer at Schaeffer's Investment Research.
US data released on Tuesday showed that retail sales continued to rise in October, helped by a jump in electronics and appliances, while inflation was muted at the wholesale level.
A key manufacturing index for New York also surged to its first positive reading in six months in November, suggesting an upturn in business conditions.
That all trumped data from Eurostat showing growth for the 17-nation eurozone at a meagre 0.2% in the third quarter, which sent European stocks tumbling.
Hewlett-Packard led the 30 Dow blue chips up with a 3.4% gain.
Shares in Walmart, the world's largest retailer, lost 2.4% after the company reported a drop in third-quarter profits despite an 8.1% climb in sales.
IBM shares gained 0.75% a day after investment guru Warren Buffett disclosed his Berkshire Hathaway had built up a 5.5% stake in the tech giant.
Shares in BlackBerry maker Research In Motion jumped 4.6% after it launched two new smartphones which use its BlackBerry 7 operating system.
Bond prices fell. The yield on the 10-year Treasury rose to 2.06% from 2.04% on Monday, while the 30-year rose to 3.10% from 3.09%.
Bond prices and yields move in opposite directions.