It's been a rough start to 2024 for the stock market. Some of the biggest drivers of 2023's rally have taken hits in the first few days of the year, including some of the so-called "Magnificent Seven" stocks.

There's no telling what the market will do throughout 2024, but investors can put the odds in their favor by avoiding stocks with stretched valuations. I'll be staying away from DoorDash (DASH -0.72%) and MongoDB (MDB -2.12%) this year for that reason.

DoorDash

Restaurant delivery stock DoorDash is down about 60% from its pandemic-era high, but it's been rallying over the past year. Shares of DoorDash doubled in 2023, delivering a market-beating performance that pushed up the company's market value to about $37 billion. Based on the average analyst estimate for 2023, DoorDash trades for more than 4 times annual sales.

DoorDash continued to grow at a solid double-digit rate throughout 2023 despite an economic environment that should have been working against it. Revenue jumped 27% year over year in the third quarter on a 24% rise in order volume. DoorDash isn't profitable on a GAAP basis, but it's inching closer with each passing quarter.

I'll admit that I was surprised by the robustness of DoorDash's growth last year. Sky-high inflation, rising interest rates, and tightening household budgets did little to slow demand for the company's convenient services. I may have been wrong about the timing, but I'm convinced that the economic environment will eventually catch up with DoorDash. The convenience that DoorDash offers is so expensive, with layers of fees and marked-up prices, that I just don't see how these trends persist.

The other issue is that DoorDash's business model is dependent on the status quo relating to its contract delivery drivers remaining intact. The company is reportedly planning to raise its already-high fees in New York City in response to a delivery driver minimum wage law, and ongoing legal battles over the status of gig workers pose an existential risk to the third-party restaurant delivery industry.

I expect some sort of reckoning for DoorDash in 2024 as consumer behavior catches up with economic reality.

MongoDB

MongoDB has done a great job positioning its database software as an attractive alternative to the market leaders. While MongoDB isn't as widely used as a handful of other leading databases, it's become a go-to for enterprises building modern applications.

The big problem I have with MongoDB is its valuation. With a market capitalization of $27 billion, MongoDB trades for about 16 times the average analyst estimate for fiscal 2024 sales. If MongoDB were the next Oracle, this valuation could make sense. But I don't think it is. Cloud computing has made it much simpler to switch database providers. There are still meaningful switching costs, but not to the same degree as in the past.

That's not to say that MongoDB can't succeed in the long run, but it probably won't dominate the industry. Revenue is still rising swiftly, up 30% in the third quarter. MongoDB Atlas, the company's managed cloud database service, grew at a faster 36% rate. The cost of achieving that level of growth, however, is high. MongoDB has yet to turn a GAAP profit, and it spent 45% of its revenue in the latest quarter on sales and marketing. In other words, this is not a product that sells itself.

MongoDB is becoming a major player in the database market, but the valuation looks far too optimistic to me.