NEW YORK (Reuters) - U.S. stocks advanced on Tuesday after the long holiday weekend and a seven-week winning streak for the S&P 500 as merger activity buoyed investor optimism, but health insurer shares muted gains.

Office Depot Inc surged 21.6 percent to $5.58 after a person familiar with the matter said the No. 2 U.S. office supply retailer is in advanced talks to merge with smaller rival OfficeMax Inc . A deal could come as early as this week.

OfficeMax shares jumped 28.8 percent to $13.85 while larger rival Staples Inc shot up 15.1 percent to $14.91 as the best performer on the S&P 500.

"M&A is providing an enormous amount of enthusiasm in pockets and it is really a function of the cost of money, the cost of borrowing. It is a sign there is a shift going on in the economy that is very, very positive," said Peter Kenny, managing director at Knight Capital in Jersey City, New Jersey.

"At the same time, if you take the M&A activity out of the picture, you will see that many on the Street are expecting a pullback.

The Dow Jones industrial average rose 59.94 points or 0.43 percent, to 14,041.7, the S&P 500 gained 6.62 points or 0.44 percent, to 1,526.41 and the Nasdaq Composite added 12.01 points or 0.38 percent, to 3,204.04.

U.S. markets were closed on Monday for the Presidents Day holiday.

Health insurer stocks tumbled, led lower by a 9 percent drop in Humana Inc to $70.98 after the company said the government's proposed 2014 payment rates for Medicare Advantage participants were lower than expected and would hurt its profit outlook.

UnitedHealth Group lost 2.9 percent to $55.68 as the biggest drag on the Dow. The Morgan Stanley healthcare payor index dropped 2.8 percent.

The benchmark S&P index is up 7 percent for the year and is coming off its longest weekly winning streak since January 2011.

The strong start was fueled by legislators in Washington temporarily averting automatic spending cuts and tax hikes as well as by stronger-than-expected earnings and economic data. The Federal Reserve's stimulus policy has also been a major factor.

But further gains for the S&P 500 have been a struggle as investors look for new catalysts to lift the index, which hovers near five-year highs.

The compromise by lawmakers on across-the-board spending cuts, known as sequestration, only postponed the matter, and Democrats and Republicans have until March 1 to resolve differences or the cuts, which are predicted to damage the economy, will take effect.

The uptick in merger and acquisition activity, a sign of optimism about the outlook on Wall Street, has resulted in more than $158 billion in deals announced so far in 2013.

Last week, deals were reached for the acquisition of H.J. Heinz Co by Berkshire Hathaway and the sale by General Electric of its remaining stake in NBCUniversal to Comcast Corp .

Economic data showed the NAHB/Wells Fargo Housing Market index edged down to 46 in February from 47 in the prior month and below expectations of 48 as builders faced higher material costs.

According to the Thomson Reuters data through Monday morning, of the 391 companies in the S&P 500 that have reported results, 70.1 percent have exceeded analysts' expectations, compared with a 62 percent average since 1994 and 65 percent over the past four quarters.

Fourth-quarter earnings for S&P 500 companies are estimated to have risen 5.6 percent, according to the data, above a 1.9 percent forecast at the start of the earnings season.