Should tax reform legislation pass, investors could be in for an even bigger -- and pleasant -- surprise than they first thought, 

According to UBS analysts, the market has only priced in about half of the potential upside for stocks that would follow if tax reform were signed into law.

"We believe markets are pricing in about a 4% increase in S&P 500 profits, rather than the 8% increase that we expect," UBS wrote. "This would come on top of the healthy market gains we expect in 2018."

Analysts said they forecast a 3% to 5% rally in S&P 500 stocks on tax reform, should valuation multiples remain unchanged. Overall economic growth could get a 0.2% to 0.5% boost on tax legislation, too.

The S&P 500 index has gained about 17% since the start of the year.

More of What's Trending on TheStreet: