NEW YORK — A day of broad swings in the stock market ended with modest gains Tuesday as investors balanced strong U.S. retail sales with Europe's lingering debt crisis. The Dow Jones industrial average gained 17 points.
The Dow ping-ponged between gains and losses for much of the day. It had been down as many as 78 at noon and up as much as 86 points during a late afternoon rally that fizzled just before the market closed.
Technology stocks had the biggest gains. Hewlett-Packard rose 3.4 percent, the most among the 30 stocks in the Dow Jones industrial average. Chevron Corp. fell the most, 2.9 percent.
Americans spent more on autos, electronics and building supplies in October, raising retail sales for a fifth straight month. Sales increased 0.5 percent from the previous month, a faster rate than economists expected.
In Europe, higher interest rates on government debt issued by Italy, Spain and other countries rattled stock markets. The market rate for Italy's 10-year bond jumped back above 7 percent. When rates crossed the 7 percent threshold last week, it raised worries about the country's ability to manage its debts. Greece, Ireland and Portugal were forced to seek financial lifelines when their borrowing rates crossed the same mark.
The retail sales report helped the U.S. stock market "show a certain degree of resilience in the wake of the negative headlines out of Europe," said Todd Salamone, director of research at Schaeffer's Investment Research.
The Dow rose 17.18 points, or 0.1 percent, to 12,096.16. The S&P 500 gained 6.02, or 0.5 percent, to 1,257.81. The Nasdaq added 28.98, or 1.1 percent, to 2,686.20.
Traders remained cautious. The prices of assets investors use as havens from market turmoil, like U.S. government debt and gold, held steady. The yield on the benchmark 10-year Treasury note edged up to 2.05 percent from 2.04 percent late Monday. The yield has been below 2.10 percent all month, a sign of strong demand. Gold rose $3.80 to $1,782.20 an ounce.
In corporate news, sales at Staples Inc. fell short of analysts' expectations, and the company also cut its earnings forecast for the year. Its stock dropped 3.6 percent. Department store chain Saks Inc. rose 1.7 percent after reporting stronger sales
Two stocks rose for every one that fell on the New York Stock Exchange. Volume was below average at 3.5 billion shares.