International Business Machines (IBM 1.87%) hasn't seen much in the way of analyst upgrades over the past few years. The majority of analysts covering the stock rate it a hold, according to Yahoo! Finance. That's not too surprising, given that IBM has suffered from more than five years of declining revenue.

But IBM's transformation has been making progress, and the company expects to break its revenue decline streak in the fourth quarter. At least one analyst is taking notice. On Wednesday, RBC Capital's Amit Daryanani upgraded shares of IBM to "outperform," boosting his price target to $180. He sees 2018 as "a year of out-performance." That's music to longtime investors' ears.

IBM's Global Center for Watson IoT in Munich, Germany.

Image source: IBM.

What drove the upgrade

There are a few factors contributing to Daryanani's upgrade. First, IBM launched its latest mainframe system, the z14, in July of last year. These beastly computers began shipping toward the end of the third quarter, providing a boost to IBM's hardware business. Mainframe sales jumped 62% year over year during the third quarter, and they should see a similar increase during the fourth quarter.

Daryanani sees the z14 leading to a revenue tailwind for three to four quarters following the launch. That should help IBM have a strong first half of 2018, before it laps the launch during the third quarter.

Another factor for Daryanani is hybrid IT spending. IBM is a leader in hybrid cloud computing, where a customer mixes on-premise private cloud and third-party public cloud in a seamless way. This is opposed to a heavy focus on public cloud by market leaders Amazon Web Services and Microsoft. IBM's large base of existing customers puts it in prime position to help those customers transition to the cloud with a hybrid strategy.

Cloud computing is included in what IBM calls its "strategic imperatives," comprised of the company's key growth businesses. These businesses accounted for 45% of total revenue over the past 12 months, and Daryanani expects them to finally begin to drive gross margin higher this year.

On top of these tailwinds, IBM still sports a bargain valuation. The company expects to produce adjusted earnings of at least $13.80 per share in 2017, which puts the price-to-earnings ratio at about 11.5. Meanwhile, the S&P 500 trades for 26 times trailing-12-month earnings. IBM also pays a world-class dividend, yielding about 3.7%.

Daryanani summed up his view of IBM: "IBM represents the best mix of technology businesses in the enterprise segment. We think IBM has cultivated the preeminent technology portfolio."

Not too late to buy the stock

After five years of declining revenue, it makes sense that IBM sports a beaten-down valuation. But as IBM turns the corner and returns to growth, the market should start giving the company more credit. Combine earnings growth with the potential for multiple expansion, and you have a recipe for outperformance.

IBM is not a growth stock, and it probably won't become a growth stock anytime soon. The company's long-term financial model calls for low single-digit revenue growth, mid-single-digit pre-tax income growth, and high single-digit earnings-per-share growth. That's certainly enough to justify a higher valuation, but don't expect the frothy valuations of other tech companies to find their way to IBM.

But because the valuation is so low, the stock can appreciate at a much faster rate than earnings grow, even if the P/E ratio remains below the level of the broader market. If IBM can hit its targets in 2018 and beyond, double-digit stock gains are not out of the question.

It's not too late to bet on IBM. With Wall Street starting to wake up to the IBM story, now is the time to buy the stock.