After watching the benchmark S&P 500 index lose about 20% of its value in the first half of 2022, investors are understandably hesitant to buy any stocks. This is a mistake.

There are reasons to be nervous about a possible global economic slowdown on the horizon. That isn't a reason to avoid scooping up shares of these beaten-down cloud stocks while they're trading at attractive prices. Gartner expects global spending on cloud services to soar another 20% in 2022, bringing the total up to a whopping $495 billion.

Stock market gains are determined, at least in part, by the amount you pay up front for the stocks in your portfolio. After falling 66% or more in the first half of the year, these two look ripe for the picking. 

Veeva Systems

Shares of Veeva Systems (VEEV 1.06%) surged in 2020 along with general interest in the biopharmaceutical industry that its serves. Before COVID-19, about one biotech IPO per week was a normal pace. In 2021, there were 104, but the massive inflows didn't last long.

So far this year, just 14 new biotech companies managed to raise capital in the public markets. Pre-IPO start-ups have had a hard time getting investors to answer their calls as well.

Now that interest in drugmakers has fallen off a cliff, Veeva's stock price is around 39% below the peak it reached last summer. This is a great stock to buy now because increasing demand for biopharmaceutical products is a long-term trend you can count on.

Veeva Systems provides biopharmaceutical companies large and small with cloud-based services tailored to businesses that discover, develop, and market drugs, medical devices, and other highly regulated products. The company started out in 2007 with customer relationship management (CRM) services adapted from the already popular Salesforce CRM platform. Veeva Systems still markets CRM solutions, but it's made itself indispensable to the companies it serves with services that help track every piece of data related to experimental drugs, or devices in development.

The company expects decelerating investments into biotech start-ups to reduce its growth rate this year. Despite the challenge, the company expects about 9% more revenue this year than it reported last year. Without any meaningful competitors in its steadily growing niche market, it's probably just a matter of time before its growth rate to returns to double digits.

DigitalOcean

Amazon, Microsoft, and Alphabet already dominate the market for enterprise cloud services. For individual developers, start-ups, and small businesses, though, accessing the services these industry giants provide isn't always an option. This is where DigitalOcean (DOCN -3.52%) comes in.

Hobbyists, individual developers, data scientists, and students use DigitalOcean to build, deploy, and scale their own software applications. With a growing range of simple, one-click deployment tools, small to medium-size businesses are signing up, too. At the end of March, this company was making the benefits of cloud computing easily accessible to over 600,000 individual and business customers.

Individuals can start building their own applications for $0 per month, and most configurations cost less to manage than a Netflix subscription. Despite offering services at prices anyone can afford, the company expects adjusted earnings from operations to equal between 13% and 15% of total revenue this year.

DigitalOcean expects total revenue to land in a range between $564 million and $568 million this year. This is a tiny drop in the bucket compared with an addressable market the company expects to reach $145 billion in 2025. 

With room to grow, and increasingly popular services that sell themselves, this stock could go a long way to push up your entire portfolio in the years ahead.