Bank of America Merrill Lynch strategists say this could be a record year for merger activity and corporate spending should help continue to fuel stock market gains.

The strategists Tuesday raised their target for the S&P 500 and said the long-awaited 'great rotation' of funds out of bonds and into stocks that would signal the end of the bull market has yet to occur. Stocks valuations are elevated but are relatively cheap by a wide margin, compared to bonds, they say.

The strategists, among a few in CNBC's survey at the low end of Wall Street's range, have raised their S&P 500 target to 3,000 from 2,800, and are now in line with the median, which had been at 2,975.

"While 2017 saw building optimism, 2018 may be the year of euphoria. While valuations have overshot fair value, sentiment is likely to be the most important driver of returns — typical of late stage bull markets," they wrote. They put fair value for year end 2018 at 2,636, and they have a long-term S&P target of 3,500 by year end 2025.

Since the start of the year, stocks have been hitting new highs, while bonds have been weaker. The 10-year yield was as high as 2.66 percent last week, the highest since 2014. On Tuesday, it was at 2.61 percent.

The tax bill has helped, leading to strong above-average earnings revisions. "With a strong pickup in earnings from repatriation and a lower corporate tax rate amid a sales recovery, we expect corporations to accelerate spending across all categories in 2018," they wrote.

They see two big potential surprises in corporate spending. They said merger activity could create a record year for mergers and acquisitions, and companies could spend excess cash to pay down their debt to reduce high debt levels as interest rates rise. They also expect debt reduction to be the biggest item that companies spend repatriation proceeds on, as a result of the tax law change requiring corporations to pay U.S. taxes on past profits kept overseas.

Buybacks will be a top area, but there is also a strong case for capex.

The strategists note that the BofA monthly global fund managers' survey shows cash positions dropped to a five-year low of 4.4 percent, a contrarian indicator. They also point out that their own sell-side indicator, which reflects Wall Street strategists' jump in equity allocation recommendations, has risen by 5 points, also a contrarian indicator.

"But no need to panic yet — these indicators are still not at the extreme levels of bullishness that typically coincide with the end of bull markets," they wrote. They do expect more volatility, however, and recommend buying high-quality stocks.