What happened

There's no question that the primary driver of the stock market over the past year or so has been the state of the economy. High inflation, rising interest rates, various political dramas, and concerns about a potential recession have all weighed on the market.

Yet investor sentiment has been rising in recent weeks, as earnings season showed that the sky was not falling, contrary to popular belief. Furthermore, slowly but steadily improving economic conditions are fueling investor hopes for a so-called "soft landing," with the economy ultimately avoiding a recession.

With that as a backdrop, Cloudflare (NET -3.00%) rose 19.3%, Confluent (CFLT -2.55%) climbed 18.5%, and Splunk (SPLK) jumped 13.3% for the week, as of 11:11 a.m. on Friday, according to data provided by S&P Global Market Intelligence.

A person at a computer desk taking notes.

Image source: Getty Images.

A check of all the usual sources -- regulatory filings, earnings results, and changes to analysts' targets -- turned up little in the way of company-specific news driving these cloud stocks higher this week. This seems to suggest that the majority of investors are responding to incremental improvements in the state of the broader economy.

So what

The U.S. Department of Labor released its unemployment weekly claims report, which revealed that initial jobless claims decreased by 22,000 to 242,000 for the week ending May 13, which was well below economists' forecasts of 254,000. It also marked the largest drop in weekly jobless claims since November 2021. Continuing claims, or the number of people already collecting unemployment benefits, decreased by 8,000, largely unchanged at a total of 1.79 million. This suggests that unemployed workers are finding new positions quickly.

The strength of the labor market continues to defy concerns that a recession could be imminent. Further debunking those fears were better-than-expected results from Walmart, which points to resilient consumer spending -- the bedrock of the economy.

Now what

In the lone piece of company-specific news, regulatory filings confirmed that activist investor Starboard Value more than doubled its position in Splunk. For the quarter ending March 31, Starboard increased its stake by 2.7 million shares, bringing its total holdings to 4.6 million -- or roughly 2.8% of the shares outstanding.

Starboard has previously said it believes Splunk is undervalued, compared to its opportunity, and has a significant opportunity to drive operational improvements and expand its margins -- an opinion that's no doubt music to the ears of shareholders. 

But while investor sentiment saw the glass as half full this week, the market is just one negative report away from turning south, since challenges remain and stocks will continue to be volatile for the foreseeable future.

So what does all this have to do with cloud computing stocks? Software-as-a-service (SaaS) and other cloud-based businesses have been particularly hard hit by the downturn, as investors turned to the safety of profitable stocks.

A quick look at Confluent, Cloudflare, and Splunk show that they were, indeed, part of that illustrious group, with their stocks down 71%, 66%, and 26%, respectively, during 2022. It's no coincidence that all three were unprofitable over the past year.

However, as the specter of a recession dims, investors are increasingly willing to take chances on these stocks, as long as they have compelling growth prospects.

Then there's the matter of valuation. None of these stocks is cheap, though they are trading at a significant discount to their recent highs. Cloudflare, Confluent, and Splunk are currently selling for 12 times, 8 times, and 4 times next year's sales, respectively, when a reasonable price-to-sales ratio is generally between 1 and 2.

Valuation shouldn't be viewed in a vacuum, and investors frequently award higher valuations to businesses with continued strong revenue growth -- even unprofitable ones -- given the chance of strong future returns.

For investors willing to hold their shares for three to five years, these stocks represent an intriguing opportunity. While they aren't for everyone, this trio of companies could generate impressive gains over time, but they do carry a higher degree of risk.