NEW YORK (CNNMoney) -- U.S. stocks closed higher Tuesday as a batch of better-than-expected U.S. economic data temporarily overshadowed ongoing fears about the eurozone debt crisis.
The Dow Jones industrial average () added 17 points, or 0.1%, to close at 12,096. The S&P 500 ( ) gained 6 points, or 0.5%, to 1,258, The Nasdaq ( ) rose 29 points, or 1.1%, to 2,686.
Stocks opened lower as investors were rattled by rising bond yields in Europe. But shares regained ground in the afternoon as the focus shifted to upbeat reports on the U.S. economy.
"The U.S. data continues to surprise to the upside," said Paul Zemksy, head of asset allocation at ING Investment Management in New York. "The market is paying more attention to U.S. fundamentals, though that could change in a heartbeat."
Investors have been quick to react to signs of strain in the market for European sovereign debt, including bonds issued by Italy, Spain and France.
Italy's 10-year bond yield topped 7% following a lackluster reading on third-quarter eurozone economic growth. That level, which the Italian bond yield spiked above for the first time last week, is a benchmark that makes traders nervous because it eventually led to bailouts for Greece, Portugal and Ireland.
Meanwhile, the 10-year bond yield for Spain, one of several troubled economies in Europe, jumped as high as 6.3%. French bonds were also moving higher, raising worries that the debt crisis is spreading to eurozone's core.
On Monday, U.S. stocks slid, as investors grew wary over whether political transitions in Greece and Italy will help resolve Europe's debt crisis.
"Nothing has changed other than the names of the helmspersons of the sinking ships," said Carl Weinberg, chief economist at High Frequency Economics, in a note to investors.
Economy: In the United States, retail sales rose 0.5% in October, boosted by strength in electronics and home improvement, the government said Tuesday. The increase beat expectations of a 0.4% rise, but was lower than the 1.1% gain in the previous month.
Meanwhile, the Empire State manufacturing index returned to positive territory after five months in the red, indicating that manufacturing activity has been expanding in November in New York. The index edged up to 0.6, from negative 8.5 last month. Economists were expecting the index to come in -0.8.
A separate government report showed that producer prices slipped 0.3% in October, following a 0.8% rise in September. Analysts polled by Briefing.com expected producer prices to have dropped by 0.2%.
World markets: European stocks ended mixed on Tuesday. Britain's FTSE 100 ( ) gained 0.4%, but the DAX ( ) in Germany slid 0.3% and France's CAC 40 ( ) fell 1.7%.
A report showed a 0.2% rate of economic growth for the countries in the eurozone in the third quarter -- in line with expectations. That was also the same rate of growth reported in the previous quarter.
Asian markets ended mixed. The Shanghai Composite () finished barely above breakeven, the Hang Seng ( ) in Hong Kong lost 0.8% and Japan's Nikkei ( ) slipped 0.7%.
The PC maker earned 54 cents a share, up from 45 cents a year ago. Analysts were looking for 47 cents a share. Sales were $15.4 billion, just below what analysts had anticipated.
Wal-Mart (Fortune 500) reported a 1.3% increase in third-quarter same-store sales Tuesday, but posted earnings per share that missed expectations by a penny. Shares of the retail giant dipped 2.3%.,
Shares of Dick's Sporting Goods (Fortune 500) jumped 5.2% after the retailer reported stronger earnings than analysts had been expecting, and said same-store sales rose 4.1% for the quarter.,
Staples (Fortune 500) cut its full-year earnings forecast, and posted quarterly results that fell short of expectations. Shares of the company fell 3.7%.,
Oil for December delivery rose 34 cents to close at $98.48 a barrel.
Gold futures for December delivery slid $8.20 to end at $1,770.20 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury edged higher, pushing the yield down to 2.03% from 2.04% late Monday.
|Stocks finish higher for fourth straight week|
|Oil-price manipulation: the next Libor?|
|Prison exclusive: Bernie Madoff can't sleep|
|Signs of new housing bubble in several areas|
|Google says you'll know when Glass is sketchy|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.66%||3.58%|
|15 yr fixed||2.79%||2.72%|
|30 yr refi||3.64%||3.57%|
|15 yr refi||2.79%||2.72%|
Today's featured rates: