Hewlett-Packard helped pull the Dow Jones industrial average to a slight gain Thursday, giving the index only its fourth gain this month. Stocks flipped between gains and losses throughout the day after a meeting of European leaders failed to deliver new steps to ease the region's debt crisis.
The Dow rose 33.60 points, or 0.3 percent, to 12,529.75.
The Standard & Poor's 500 index edged up 1.82, or 0.1 percent, to 1,320.68.
The Nasdaq composite index fell 10.74 points, or 0.4 percent, to 2,839.38.
For the week so far:
The Dow is up 160.37 points, or 1.3 percent.
The S&P 500 is up 25.46 points, or 1.9 percent.
The Nasdaq is up 60.59 points, or 2.2 percent.
For the year so far:
The Dow is up 312.19 points, or 2.6 percent.
The S&P 500 is up 63.08 points, or 5 percent.
The Nasdaq composite is up 234.23 points, or 8.9 percent.