"You can get in a whole lot more trouble in investing with a sound premise than with a false premise."

Those words come from a 2010 interview with Warren Buffett regarding the origins of the housing bubble and financial crisis. In that case, the sound premise that formed the foundation of the bubble was that home prices generally rise over time. That premise morphed into "home prices can only rise over time," which was reinforced by years of rapid price growth. It didn't end well.

Buffett also discussed the dot-com bubble of the late 1990s:

The Internet was the same thing. The Internet was going to change our lives. But it didn't mean that every company was worth $50 billion that could dream up a prospectus.

A man with a pin next to a rising chart in a bubble.

Image source: Getty Images.

Pandemic stocks

The novel coronavirus pandemic has ignited epic rallies in stocks that investors believe will benefit from trends created by measures put in place to slow the spread of the virus. These trends include increased working from home, an accelerated shift from physical retail to e-commerce, favoring exercise at home rather than at a gym, etc.

The premise is sound. It makes sense that people would opt for ordering stuff online instead of going to a store during a pandemic. It makes sense that people unable to visit their gym would buy pricey home exercise equipment. It makes sense that companies would be forced to pay for video conferencing software when most of their employees are working from home.

You can't know for sure whether something that looks like a bubble is actually a bubble until it pops. Leading up to that inflection point, you'll look like an idiot if you don't participate as the bubble inflates further. Valuations will go from crazy to insane, and so will the justifications for those valuations.

Pricier than Amazon

Shopify (NYSE:SHOP), a provider of an e-commerce platform that allows small businesses to easily sell online, currently trades at an enterprise value-to-sales ratio of nearly 70. The stock has soared 160% this year, and it's up 265% from its 52-week low. If there's a bubble in pandemic stocks, Shopify is the poster child.

The premise behind Shopify is sound – e-commerce sales growth has accelerated due to the pandemic, and many businesses need to turn to online sales to survive. If you forget about the fact that most of Shopify's customer base is comprised of exactly the kinds of businesses that fail at a high rate during an economic downturn, it's easy to justify paying a wild price for this fast-growing Internet stock.

SHOP EV to Revenues Chart

SHOP EV to Revenues data by YCharts

Let me put Shopify's nose-bleed valuation into context. During the dot-com bubble, Amazon.com, Microsoft, and Cisco were three tech stocks that caused a lot of pain for many years after the bubble burst, even though all three were ultimately success stories. It took just about a decade for Amazon stock to reclaim its dot-com bubble high, and even longer for Microsoft. Cisco still hasn't, even though it's the overwhelmingly dominant provider of networking hardware and a successful company by any measure.

Today, Shopify trades at a higher enterprise value-to-sales ratio than Amazon did at its dot-com peak. The story may turn out well for Shopify in the long run, like it has for Amazon. But don't let survivorship bias fool you. For every Amazon, there were many stocks with sound premises and sky-high valuations during the dot-com boom that crashed and burned, never to recover.

A nonsensical stock price can become more nonsensical – that's how bubbles work. But as Ben Graham said, the market is a voting machine in the short run and a weighing machine in the long run. Right now, Shopify is winning a popularity contest. It won't last forever.