The difficult times for IBM shareholders are over, according to one Wall Street firm.
RBC Capital Markets raised its rating for the technology company to outperform from sector perform, citing the stock's inexpensive valuation.
"We think IBM is an attractive large-cap value stock for investors in 2018 as the potential for revenue and margin stability should enable a re-rating," analyst Amit Daryanani wrote in a note to clients Wednesday. "A return to gross margin stability coupled with revenue growth in 2018 should set-up the stock for a year of outperformance especially considering the depressed valuation."
IBM underperformed the market in 2017 with its shares down 8 percent versus the S&P 500's 19 percent return. IBM shares rose 1.7 percent in premarket trading Wednesday.
Daryanani said IBM generates roughly half its revenue from "annuity-like" services contracts and software licenses. He said the company's valuation of 11 times price to earnings and more than 3 percent dividend yield are "very attractive.
He increased his price target for IBM shares to $180 from $160, representing 17 percent upside to Tuesday's close.
"IBM represents the best mix of technology businesses in the enterprise segment," he wrote. "We think IBM has cultivated the preeminent technology portfolio."
— CNBC's Michael Bloom contributed to this story.