What happened

Thursday was a bit of a disappointment for investors as a stock market that spent the morning in the green ended the session in the red, with the S&P 500 down 0.8%.

It wasn't bad news for everyone, however. As of the close of trading for the day, cloud data services provider Snowflake (SNOW 2.53%) had managed to hang onto a modest 1.8% gain, while customer relationship management software giant Salesforce (CRM -0.18%) and database company MongoDB (MDB 0.81%) remained up by 2.5% and 3.4%, respectively.

A couple of big macroeconomic stories explain why the market at first moved higher Thursday. In the United Kingdom, the resignation of Prime Minister Liz Truss after less than two months in office may have given investors hope that the economic troubles her policies stirred up will start to settle down. Meanwhile, in the U.S., CNBC reported that the Federal Reserve's ratcheting up of interest rates is "beginning to slow the economy." That sounds bad, but it could mean the Fed's policy is working and that inflation might moderate -- which could be good news for tech stocks.    

Beyond the macroeconomic news, Salesforce, Snowflake, and MongoDB each got some (relatively) good news of their own, and all from the same source.

So what

On Thursday morning, StreetInsider.com reported that investment bank Piper Sandler had announced a whole series of price-target changes for tech stocks it covers. The price target on Salesforce was slashed by 12.5% to $175 per share while MongoDB's target got knocked down by 23% to $270. Snowflake took the kindest cut -- a trim of less than 1% to $218.    

As TheFly.com reported, Piper Sandler laid out one theory to explain all three cuts: "Software valuations might be nearing a bottom, but fundamentals are not."

By that, the investment bank means that it expects growth in revenue, billings, and free cash flow will slow down into next year as these companies' customers conserve cash and the software makers will have to work harder to make sales. Throw in the currency-exchange headwinds generated by the strong U.S. dollar, and Piper Sandler thinks near-term risks are elevated in the sector -- a situation that required the price target adjustments.

Now what

The good news, though, is that whether we're talking about MongoDB at a price target of $270, Snowflake at $218, or Salesforce at $175, all three of those lower targets are still comfortably above their current share prices. In the case of Salesforce, that's a 9% forecast upside; for Snowflake, it's 22%, and for MongoDB, it's a whopping 38.5%.

And Piper Sandler continues to rate all three software stocks as buys -- a fact that seemingly was not lost on investors Thursday as they bid them up. 

But I disagree with Piper Sander. From a valuation perspective, there are major differences between these stocks. MongoDB has negative free cash flow (FCF). Snowflake is FCF-positive, but it trades at 176 times trailing FCF.

With $5.7 billion in trailing FCF, a market capitalization of $160.7 billion, and very little net debt, Salesforce boasts the most attractive valuation of these three -- a relatively svelte 28 times FCF. Its projected long-term growth rate is only 20%, so it doesn't quite qualify as what I would consider a cheap stock. But out of these three, Salesforce is the closest one to a "bargain."

If you're in the market for a new tech stock right now, I think Salesforce is possibly the best place to start.