What happened

Shares of cloud-based database platform MongoDB (MDB 7.69%) inched up a respectable 2.1% through 11:30 a.m. ET Tuesday, despite the fact that this morning, Swiss megabank UBS cut its price target on MongoDB nearly in half, according to ratings watcher The Fly. Ordinarily, you'd think that would be bad news for a stock -- not the kind of thing that would drive a 2% stock price gain.  

But here's the thing: In cutting its price target in half, UBS admitted that MongoDB stock is probably not worth the $390 a share it initially valued the stock at. But UBS does think MongoDB is worth about half that, or $200 a share.

And right now, MongoDB stock only costs about $146.

So what

Presto-change-o, what initially looked like bad news for MongoDB -- a 49% cut to its target price -- turns into an actually pretty positive assessment of MongoDB's chances: According to UBS, the stock could gain nearly 37% over the next 12 months.

As UBS explained in its note, an analysis of industry demand for database services reveals that business prospects are "steadier" than what most investors seem to think. As a result, while most investors are still selling MongoDB stock (down more than 70% this year alone), UBS thinks they should be buying instead.

Now what

And UBS may be right about that -- so long as investors have an incredibly long investing horizon, and a lot of patience to wait.

According to most analysts polled by S&P Global Market Intelligence, MongoDB -- which is not currently profitable -- will not become profitable for at least five more years. The company's first predicted GAAP profit won't arrive before 2027, says S&P. And indeed, MongoDB will probably see its losses grow next year -- and spend the next three years losing money at the rate of roughly $6 per share, per year, before losses begin to slow.

Granted, the good news is that MongoDB has a rock-solid balance sheet with more than $550 million in net cash and minimal cash burn measured in only a few tens of millions of dollars annually -- which means it has plenty of cash to keep it running until profits start arriving in 2027. If long-term forecasts prove correct, the company should end up being a pretty successful business ... eventually.

The only question is: Do you have the patience to wait another half decade to see that happen? Because if you don't, you're probably better off avoiding MongoDB for now and investing in something that's a bit more profitable today.