Investing in money-losing companies growing revenue rapidly was a winning strategy last year. Not so much in 2021. Even good quarterly results have been punished as investors start to question sky-high valuations.

It was a bad omen when tech giants like Tesla, Apple, and Amazon saw their stocks slump in the days following solid earnings reports. Tesla beat analyst expectations across the board, although selling some Bitcoin helped; Apple reported a blockbuster quarter as demand for gadgets soared; and Amazon reported a huge earnings beat as e-commerce and cloud sales boomed. All three stocks have headed lower since those reports.

If that's what's happening to profitable companies when results are positive, you can imagine what's happening to profitless companies when there's any reason to be disappointed.

A man with head on table in front of a declining chart.

Image source: Getty Images.

Fastly eviscerated on weak guidance

Shares of edge computing specialist Fastly (NYSE:FSLY) were down around 23% soon after the market opened Thursday following a first-quarter report that did not sit well with investors. Revenue jumped 35% and matched analyst expectations, but the company's adjusted loss per share doubled and missed estimates. On a GAAP basis, the company more than tripled its net loss from the prior-year period.

Fastly actually raised its full-year revenue guidance a bit to a range of $380 million to $390 million, but that wasn't good enough for investors. The company expects revenue between $84 million and $87 million in the second quarter, up just 14% year over year. That's a big slowdown.

I called Fastly drastically overvalued last November. At the time, the company was worth around $7 billion, and the stock was trading at around 23 times annual sales. The stock soared in the following months, but those gains have now been completely erased. Accounting for Thursday morning's plunge, Fastly is now worth just over $5 billion, with a price-to-sales ratio closer to 13. That's still too expensive in my opinion, given Fastly's slowing growth and worsening profitability.

Along with its report, Fastly announced that its CFO was stepping down. That's not exactly a good sign.

Twilio drops as losses pile up

Cloud communications provider Twilio (NYSE:TWLO) had a great quarter in terms of sales. Revenue soared 62% year over year to $590 million, the company added 45,000 active customers, and Twilio managed an impressive dollar-based net expansion rate of 133%. Twilio beat analyst estimates for both revenue and earnings.

But Twilio's bottom line worsened substantially. The company reported a GAAP net loss of $207 million, worse than a $95 million net loss in the first quarter of 2020. Costs soared, with sales and marketing spending up 80%. The stock was down around 9% Thursday morning.

Twilio's guidance for the second quarter calls for revenue growth between 47% and 50%, a bit of a slowdown. The company also expects an adjusted net loss as high as $0.16 per share, compared to a profit of $0.05 in the first quarter. Twilio's adjusted earnings figures back out stock-based compensation, which totaled $137 million in the quarter.

Twilio is growing much faster than Fastly, but its valuation is also much richer. Based on the average analyst estimate for 2021, Twilio trades at a price-to-sales ratio of about 22. With real profitability nowhere in sight, that seems excessive to me.

Remember that price matters

It's hard to go wrong in the long run if you buy good companies at reasonable prices. It was easy to forget the second part in 2020 as growth stocks, good and bad, put up incredible gains.

Both Fastly and Twilio are still up substantially over the past year, but the post-earnings declines may be a sign that investors are starting to question the stocks' nosebleed valuations. Neither company looks close to turning a true profit any time soon, and profits are ultimately what drive stocks higher in the long run.

Of course, either stock has the potential to be a long-term winner from here. But buying whatever is growing fast without regard for the bottom line no longer appears to be a viable strategy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.