Stocks closed higher Friday after a quiet, preholiday session that turned the S&P 500 index positive for the year.

Traders were relieved by news that Congress extended a payroll tax holiday for workers and emergency unemployment benefits. The programs were set to expire at the end of the year. Letting that happen would have reduced economic growth by about 1 percent, analysts said.

The final business day before Christmas also was the slowest full day of trading so far this year. Traders exchanged just 2.2 billion shares, about half of the recent average. The market will be closed on Monday because Christmas falls on a Sunday this year.

A series of mixed economic reports Friday failed to derail that optimism. The Standard & Poor's 500 index added 11.33 points, or 0.9 percent, to 1,265.33. It started the year at 1,257.

The Dow Jones industrial average rose 124.35 points, or 1 percent, to 12,294. Bank of America Corp. was the Dow's biggest gainer, adding 2.4 percent. All but two of the 30 Dow stocks, Alcoa Inc. and Boeing Co., rose

The Dow has risen 527.74 points, or 4.5 percent in the past four days. It was the first four-day winning streak for the Dow since mid-September.

The Nasdaq composite index gained 19.19 points, or 0.7 percent, to 2,618.64.

Earlier Friday, the government said that consumer spending and incomes barely grew in November. The weak gains suggest that consumers may have trouble sustaining their spending into 2012.

Rambus Inc. jumped 12.2 percent after the technology licensing company said it reached a patent license deal with Broadcom Corp. and settled a lawsuit with the chip maker.

TripAdvisor Inc. rose 6.1 percent, the most in the S&P 500, as traders reassessed the value of the newly spun off travel review website. The stock had fallen sharply since it officially started trading on Wednesday. It recovered some losses on Friday as analysts weighed its rapidly growing revenue and market share.

Eastman Kodak Co. rose 9.5 percent after the struggling photography company said its general counsel, Laura Quatela, would become copresident on Jan. 1.