Associated Press

The stock market ended higher Monday, but a late fade kept it from closing at an all-time high.

The market marched broadly higher most of the day, helped by optimism about the economy and more corporate mergers, only to slowly lose momentum in the final half hour of trading.

The Standard & Poor’s 500 index ended up 11.36 points, or 0.6 percent, to 1,847.61 — just short of its record close of 1,848.38 set Jan. 15. The momentum helped the index set a new intraday high of 1,858.76 earlier in the day, however.

The Dow Jones industrial average rose 103.84 points, or 0.6 percent, to 16,207.14 and the Nasdaq composite rose 29.56 points, or 0.7 percent, to 4,292.97.

Investors had little in the way of economic data or corporate earnings to work through, so much of Monday’s focus was on another round of corporate deal making.

Chipmaker RF Micro Devices jumped $1.22, or 21 percent, to $7.03 after it said would buy a competitor, TriQuint Semiconductor, in an all-stock deal valued at about $1.56 billion. TriQuint soared $2.41, or 26 percent, to $11.64.

M&A has taken off this year. Last week, Forest Laboratories and Actavis announced a $25 billion merger and Facebook said it was buying WhatsApp for $19 billion. That’s on top of deals or offers announced this week.

Companies buying competitors, or buying up a company whose product interests them, should be seen as a positive for stocks, market watchers say.

“It shows that companies still see value in this market, even at these highs,” said Quincy Krosby, a market strategist at Prudential Financial.

In the last two-and-a-half weeks, the stock market has basically erased of the losses it experienced after a difficult start to the year.

The S&P 500 index was down as much 6 percent for the year as of February 3 as investors worried about emerging markets like China and Turkey. The U.S. economic recovery was also showing signs of slowing growth.

The U.S. stock market has recovered as turbulence in overseas markets calms down.