For the better part of a decade, International Business Machines (IBM 0.82%) has been working to remake itself as IT budgets increasingly shifted to the cloud. The company landed on a hybrid-cloud strategy. Large enterprises, IBM reckoned, would favor a mix of public cloud and on-premises hardware. Moving to a hybrid-cloud architecture would require specialized software, hardware, and expertise, all of which IBM could deliver.

While IBM's cloud business has been growing swiftly for many years, slow-growing legacy businesses were dragging the company down. The spinoff of the managed infrastructure-services business, now known as Kyndryl, removed billions of dollars of largely stagnant revenue, leaving behind a leaner, more focused IBM.

A strong performance

The most surprising thing about IBM's third-quarter report was that the company raised its revenue guidance and maintained its free cash flow guidance, despite macroeconomic headwinds and major shifts in currency-exchange rates. So far, IBM isn't seeing any real impact from sky-high inflation or economic uncertainty.

Revenue rose by 6% but soared 15% when currency fluctuations were backed out. About 5 percentage points of this growth came from sales to Kyndryl, which was still part of IBM during the prior-year period.

At constant currency, software revenue rose 14%, consulting revenue jumped 16%, and infrastructure revenue soared 23%. The new z16 mainframe is selling well, a sign that IBM's mainframe customers are not pulling back.

Mainframe revenue nearly doubled, while the rest of the infrastructure segment enjoyed 21% growth. Hybrid-cloud revenue, which spans all of IBM's segments, reached $22.2 billion over the past 12 months. That's up 20% year over year at constant currency.

The fourth quarter tends to be seasonally strong for IBM, so most of its free cash flow for the year has yet to be generated. This introduces some risk that business slows down in the coming weeks, but so far, IBM hasn't seen any signs of trouble. The company now expects its constant-currency revenue to grow faster than mid-single digits, with currency imposing a negative impact of 7 percentage points.

IBM still expects to generate $10 billion of free cash flow this year. That's a little surprising, given that a strengthening U.S. dollar acts as a headwind to IBM's free cash flow. But business is strong enough that the company still believes it can hit that target.

The case for IBM in a recession

No company is entirely recession-proof. As businesses cut costs where they can, IBM will certainly see some softening of demand if economies enter a recession. The good news is that IBM is in a great position to weather the storm for a few reasons.

First, the company has almost no exposure to consumers. Essentially all its revenue comes from businesses, and many of its customers are large organizations that aren't going anywhere. Second, IBM's hardware and software products are mostly mission critical, and many of them are aimed at improving efficiency or productivity. That's a story that sells when times are tough.

IBM CEO Arvind Krishna pointed out during the earnings call that technology spending typically beats GDP growth by 3% to 4%. Even during a mild global recession, IBM's portfolio of mission-critical products that deliver cost savings or productivity for its customers should hold up reasonably well. More than half of IBM's revenue is now recurring, which should help smooth things out a bit, compared to the past.

In the face of economic uncertainty, IBM's business is doing just fine. The stock trades at just 11 times that $10 billion free cash flow target and sports a dividend yield that tops 5%. IBM still expects to generate $35 billion of free cash flow over the course of 2022, 2023, and 2024, so free cash flow should grow meaningfully in the coming years.

If IBM can continue to put up solid results, the market may finally start valuing the company a little more optimistically.