The S&P 500 has climbed about 24% in 2023, hovering right around its all-time high. The Nasdaq Composite is up 44%, although the tech-heavy index still has some ground to cover before it starts carving out new all-time highs of its own.

This rally has made stocks generally more expensive, but there are still some good deals for investors looking for a bargain. Here's why investors should consider International Business Machines (IBM -1.05%) and DigitalOcean (DOCN 3.30%) as 2023 comes to a close.

International Business Machines

A start-up building something from scratch is free to run all its workloads on public clouds and use whatever generative artificial intelligence (AI) service it wants. But for a large enterprise that's been around for decades or longer, things are more complicated.

A large, storied company may be running workloads on a mix of its own hardware and public cloud platforms. It may depend on legacy software or have on-premise databases that back mission-critical processes. And with reams of proprietary and customer data, sending that to an untrusted AI service is a recipe for disaster.

IBM plays the role of trusted advisor to enterprises looking to modernize their infrastructures and adopt AI technology. Using its software platforms and its vast consulting business, IBM provides solutions for clients that cut costs, reduce complexity, and boost productivity. In the AI realm, IBM's watsonx platform enables clients to deploy cutting-edge AI models while minimizing compliance, regulatory, and data privacy concerns.

IBM's revenue should grow by 3% to 5% this year excluding the impact of currency, and the company plans to generate about $10.5 billion of free cash flow. With a market capitalization closing in on $150 billion, IBM trades at a price-to-free-cash-flow ratio of 14.

While IBM stock has risen about 16% in 2023, it remains well below its all-time high reached more than a decade ago. If the company can produce consistent revenue and free-cash-flow growth in the years ahead, the market may finally be convinced that IBM's turnaround is for real. A combination of free-cash-flow growth and a loftier valuation multiple should then drive solid returns for investors.

DigitalOcean

The world's biggest companies are almost certain to use Amazon Web Services, Microsoft Azure, or another major platform for their cloud computing needs. With complex requirements and armies of IT workers, navigating a vast and complicated cloud platform isn't an issue.

For individual developers and small businesses, it's a different story. Simplicity is valuable to a sizable chunk of the cloud computing market. A small business may only need a virtual server and a database. With AWS and the other major cloud platforms having such steep learning curves, the upfront costs of using those platforms are high.

DigitalOcean keeps its platform simple, in more ways than one. The company's catalog of services is short, and it's been increasingly branching out into managed cloud services that remove much of the administrative burden for developers. Pricing is also simple and predictable, with little chance of a surprise cloud bill when something goes awry.

DigitalOcean is facing some headwinds as customers pull back on spending, but recent acquisitions set the stage for long-term growth. The acquisition of Cloudways brought high-value customers and managed cloud servers to DigitalOcean's platform, and the acquisition of Paperspace gives the company a user-friendly AI platform.

DigitalOcean's growth has slowed, but the company is churning out an increasing amount of cash. Free cash flow should work out to 21% to 22% of revenue in 2023, or about $150 million. With DigitalOcean valued at about $3.2 billion, the price-to-free-cash-flow ratio sits at 21.

Given that DigitalOcean expects its total addressable market to more than double to $195 billion by 2026, that valuation seems not only reasonable, but downright cheap. DigitalOcean's growth rate in the near term may be volatile, but the company should be capable of double-digit annual revenue growth for many years to come.