Buying shares of great companies and holding them for a long time is an investment strategy that works. Time is an individual investor's biggest advantage. It's not easy to hold on during big drawdowns, like what's happening now with tech stocks, but it often pays off in the long run.

There's a caveat, though: The price you pay must be rooted in reality. Certainly, the best and fastest-growing companies deserve a premium valuation. It makes sense to pay up for a company you think will grow at double-digit rates for decades. But if the price you pay is too high, even the best-case scenario playing out for the company may not lead to market beating returns.

A man looking at computer screens.

Image source: Getty Images.

Soaring expectations

Things got weird with tech stocks during the pandemic. Cash poured into the fastest-growing stocks. Price-to-sales ratios of 50 or more became a thing. Profits didn't matter. Investors were achieving incredible gains.

Take e-commerce leader Shopify (SHOP 3.45%). Shopify's subscription software enables anyone to set up an online store. It was the ideal thing to sell in the early days of the pandemic. Brick-and-mortar stores were operating under restrictions, and consumers were flush with stimulus cash. Spending shifted hard online.

Shopify's sales soared 86% in 2020 and 57% in 2021. Free cash flow turned strongly positive. What soared even more than sales were expectations. Shopify's price-to-sales ratio had been hovering around 20 before the pandemic, which seemed expensive back then. At one point in 2020, that ratio topped 60. The stock nearly quadrupled from the start of 2020 through the end of October 2021.

Since peaking late last year, Shopify stock has been a disaster. Shares are down nearly 80%, and the price-to-sales ratio has now fallen below 10. Revenue growth has slowed way down, up just 22% in the first quarter of this year. Shopify CEO Tobi Lütke took to Twitter to complain about financial analysts, which is never a good sign.

It can be tempting to view Shopify as a clear-cut bargain after falling so much. The stock is as cheap as it's been relative to sales in a long time. Shopify's pandemic gains have been entirely wiped out. Surely, Shopify should be worth more today than right before the pandemic?

This might be another dot-com bust

One thing is very clear: Market sentiment has changed dramatically over the past six months. Many companies that were reporting incredible results during the first two years of the pandemic, with the wind of trillions of dollars of stimulus at their backs, are now seeing substantial slowdowns. Rock-bottom interest rates and easy money have given way to decades-high inflation and a Federal Reserve that's going to do what it takes to bring that inflation under control.

No one is going to want to pay 60 times sales, or even 20 times sales, for an e-commerce company with rapidly decelerating growth in this environment. The idea that the pandemic years were the new normal for the e-commerce industry is dead. Even Amazon is struggling to grow sales in its retail business. And costs are a huge problem in the industry as shipping and logistics get more expensive.

This crash in tech stocks is starting to look like the dot-com crash in the early 2000s. That bubble was driven by the idea that the Internet would be a life changing technology. It was, but expectations got out of hand. Similarly, the pandemic pushed expectations far too high.

Great companies with fantastic growth prospects can be terrible investments if the price you pay is too high. A good example from the dot-com bust is Cisco Systems (CSCO -0.22%). Cisco dominates the market for enterprise networking hardware, and it's more than tripled revenue since 2000. Profits have soared. Cisco has been resilient to a never-ending stream of lower-priced competitors over the past two decades. It has durable competitive advantages, in other words.

CSCO Chart

CSCO data by YCharts

Despite all of this, Cisco stock has still not exceeded its dot-com bubble high. If you bought at the top in 2000, you're still down substantially. Here's the kicker: If you bought at the absolute post-crash bottom, you've achieved an annual return of about 7.8%, excluding dividends. That's not a terrible result, but it's clear that Cisco was not a bargain after bottoming out. You would have done a little worse than the broader market.

That's the risk with all these beaten-down tech stocks. Yes, once in a blue moon you get a company like Amazon. But most companies are not Amazon. Most companies aren't even Cisco. Even if Shopify does well, growing faster than the e-commerce market as a whole and maintaining its status as the go-to for online selling tools, outperformance is far from guaranteed. Be careful out there.