It seems like stock market investors have never been more optimistic. Major indices are hitting fresh all-time highs, and companies that were left for dead by shareholders are bouncing back.

Take Uber (UBER -0.38%). The growth tech stock was underwater for early investors until the business posted better-than-expected fourth-quarter results on Feb. 7. As of this writing, shares are up 29% this year alone.

Should you buy Uber stock hand over fist with $100 right now? Let's consider some bull and bear cases for this ride-hailing and delivery enterprise.

Riding strong momentum

You wouldn't be able to tell based on the ongoing macro uncertainty, but Uber continues to benefit from strong momentum. Gross bookings on the platform totaled $37.6 billion in the last three months of 2023, up 22% from a year ago. This was driven by a 24% increase in total trips and a 15% rise in monthly active platform customers.

Uber generated revenue growth of 15%, indicating that this is a company still in full-on expansion mode. But I think what caught the market's attention was the fact that in 2023, the business posted its first annual profit since 2018. Uber reported net income of $1.9 billion, a huge improvement from the $9.1 billion loss in 2022.

One obvious sign of a quality business is the consistency of the bottom line. Perhaps this is a major financial turning point for Uber. Investors will certainly want to make sure that the company produces ongoing profits on a quarterly basis going forward.

This might be the case. Management just announced a $7 billion share buyback program. This tells me that they feel extremely confident in the company's financial position.

Uber's services are available in 10,000 cities worldwide. Consequently, the company has tremendous scale advantages. Its research and development budget, as well as its marketing expenditures, can have a more profound positive effect in terms of driving engagement from consumers.

I think Uber's most compelling attribute is its network effects. More riders, drivers, and restaurants on the platform makes Uber more valuable to each and every stakeholder. This makes it almost impossible for a new rival to successfully compete in the industry. It's difficult to see Uber losing its dominant position.

Reason to avoid the stock

Uber shares have skyrocketed 283% in just the last 19 months. This fantastic gain outpaces the tech-heavy Nasdaq Composite. Investors are impressed with the company's underlying fundamentals and stellar financial results.

This means the stock isn't as cheap as it once was. It currently trades at a price-to-sales ratio of 4.4. This is about in line with the stock's historical average. I view this as there being no margin of safety, as the market is fully aware of how good a business this is now.

What Uber has done up to this point is nothing short of amazing, but I think there is also a huge terminal risk. I'm talking about the possibility of autonomous driving technology becoming a reality one day. Uber did have its own autonomous vehicle division, but it sold that off a few years ago. At the moment, Uber has a partnership with Alphabet's Waymo to provide driverless rides, but that's just in the Phoenix, Arizona area.

Should Tesla or Alphabet finally introduce this technology on a major scale, launching their own full self-driving taxi services, this could completely upend Uber's current business model. It's hard to tell what the probability of this happening is, but it should certainly be on shareholders' minds.

Combining this risk factor with the current valuation, bullish investors might want to only take a tiny starter position in Uber stock right now.