There's no denying it: This year's been a pretty lousy one for the market. The S&P 500 (^GSPC 0.02%) is down 23% year to date, and is sitting within easy reach of a new 52-week low. Blame the rout suffered by several key technology stocks, mostly, paving the way for most other equities.

There's a curious exception to this market-wide and tech sector weakness that's worth noting. IBM (IBM 1.05%) is holding up surprisingly well in the otherwise miserable environment. And it's arguably doing so for all the right reasons despite the specter of a recession. Here are the top three reasons.

1. Diversified business lines that are perpetually in demand

If the economy sours enough, it will take a toll on all businesses, with corporations being forced into extreme austerity. That's a worst-case scenario that doesn't seem a likely threat to IBM, though.

The company might not be positioned for significant growth, but it is positioned to generate revenue in almost any economic environment. Around one-third of its revenue stems from consulting work, while more than one-third comes from software sales. 

These aren't your typical consulting and software businesses, however. Much of it is contractual, meaning its client companies have pre-arranged access to employees or software for a specified period of time. Its annualized recurring software revenue, for example, now stands at $12.9 billion, making up roughly half of its current yearly software sales. Moreover, its software includes cybersecurity, data analysis, artificial intelligence, hybrid cloud computing, and transaction processing. These are service-based software suites that most of its customers rely on in a big way.

The kicker: CFO James Kavanaugh said a couple of years ago, "[For every $1 worth of business on a hybrid cloud platform], another $3 to $5 is
spent on software and another $6 to $8 on the cloud services." In other words, sales of hardware drive long-term software and consulting revenue, yet IBM's unique software and consulting offerings also drive hardware sales. It's a self-powering virtuous cycle.

IBM's solutions aren't something major enterprises can easily replace or simply stop using. In fact, the company argues that technology becomes an even more important growth driver when stagflation stifles traditional growth efforts.

2. IBM is making smart business-building acquisitions

Many companies make acquisitions to increase their revenue without much thought about where or how they fit in. But IBM's deals are made with purpose rather than rooted in status and stature. For instance, in July, the company announced its purchase of Databand.ai, adding the ability to spot errant digital data to the company's data-management arm. Earlier this year, it bought Neudesic, which operates a hybrid cloud consulting business specializing in Microsoft's Azure cloud platform.

None of the six deals the company has made this year have been particularly high-profile acquisitions. Neither have any of the other 20-plus acquisitions CEO Arvind Krishna has directed since taking the helm from Ginni Rometty in early 2020. IBM hasn't made any large-scale deals since buying Red Hat in 2019, in fact. But the smaller companies it's scooping up make its products more marketable.

While the recent acquisitions have been relatively small, analysts at Evercore ISI (EVR -4.85%) suggest IBM could be mulling an acquisition worth as much as $30 billion, potentially pushing the company into an all-new line of business that creates synergy with its existing ones.

3. A little something is better than a lot of nothing

Lastly, IBM might never dish out enormous organic growth again, but it offers something even more valuable to investors amid economic weakness: a healthy dividend. It currently yields 5.2%, and given the consistent recurring revenue of much of its business as well as how well its payouts are covered, there's no reason to fear this dividend is in jeopardy.

Investors in tune with the company's fiscals might not completely agree. Last fiscal year, IBM dished out $6.55 per share in dividends, but the company only earned $6.41 per share. That's clearly not sustainable.

But it was a year complicated by COVID-19 and more corporate restructuring. In November, IBM completed the spinoff of its managed infrastructure business now called Kyndryl (KD -1.41%). While spinoffs don't technically incur direct operational costs, they can often take an indirect toll on a company's focus and ability to adapt to changing market conditions. IBM hasn't exactly escaped inflationary pressures and the fallout from broken supply chains, either.

Regardless, the company's bottom line is growing again. Analysts collectively expect per-share earnings of $9.34 this year, followed by an improvement to $10.05 next year. That's far more than enough to continue funding the dividend and extend its 27-year streak of annual dividend growth.

Dividends may not be your thing. Amid economic uncertainty, though, collecting good income becomes a pretty big deal.