Scorching inflation and quickly rising interest rates sent the stock market into a nosedive this year. The S&P 500 dropped into a bear market in June, and the broad-based index has now declined in value for three consecutive quarters. That hasn't happened since the tail end of the Great Recession.

During the present downturn, Amazon (AMZN -0.17%) stock lost more than 50% of its value, marking its worst performance in the past decade. Many other stocks suffered a similar fate, and some will never recover. But Amazon has survived far worse, and it's well positioned to rebound again.

Founder and former CEO Jeff Bezos took the company public in 1997 at a split-adjusted price of $0.075 per share. Amazon quickly got swept up in the internet stock frenzy, and its share price climbed more than 7,000% by the end of 1999. But little more than a year later, those astonishing gains evaporated when the dot-com bubble burst, triggering a monumental market crash. By the autumn of 2001, Amazon had lost 94% of its value, and it took more than eight years for the stock to recover.

Insight from Warren Buffett

Warren Buffett once said, "Widespread fear is your friend as an investor because it serves up bargain purchases." That insight hits on an oddity of human behavior: People tend to act irrationally. It happens in good times, and it happens in bad times. The dot-com bubble was caused by unbridled enthusiasm, and the slow recovery was caused by unchecked pessimism.

Those same forces are at play again today. Stocks soared during the early days of the pandemic, driven to outrageous heights as stimulus checks and loose monetary policy created a "buy at any price" mentality. But the collapse of the bull market left some investors so consumed by fear that they fail to see bargains like Amazon.

Not surprisingly, Buffett hasn't sold a single share of Amazon since he started buying the stock through Berkshire Hathaway in 2019, and I wouldn't be surprised to see Buffett add to his position during the current downturn.

Three tailwinds for Amazon

The bull case for Amazon is straightforward: It operates the most-visited online marketplace on the planet, and it cemented its leadership with a logistics network that rivals the volume of FedEx and UPS. Those assets have made the Amazon brand synonymous with e-commerce, creating a powerful network effect that should keep the company at the forefront of the retail industry for years to come.

Meanwhile, Amazon is also the clear leader in cloud computing. According to IT research company Gartner, Amazon Web Services (AWS) offers "the greatest breadth and depth of capabilities of any provider in the market," and it makes twice as much money as the next closest competitor, Microsoft Azure. Better yet, Gartner says AWS often sets the pace for innovation in cloud computing, meaning the company is well positioned to maintain its leadership.

Finally, Amazon is quickly gaining share in digital advertising. In fact, it nearly led the world in total ad revenue growth last year, according to eMarketer. That success is built upon the popularity of its marketplace. U.S. consumers are more likely to start a product search on Amazon than on a search engine like Alphabet's Google, making the marketplace a valuable advertising venue for brands.

The future looks bright for Amazon

In a nutshell, Amazon is a powerhouse in three different markets -- e-commerce, cloud computing, and digital advertising -- and all three are growing quickly. Global e-commerce sales are forecast to increase at 13.6% annually to reach $15 trillion by 2030, according to Ameco Research. Cloud computing spend is projected to increase by 15.7% annually to reach $1.5 trillion by 2030, according to Grand View Research. And digital ad spend is forecast to rise 9.2% annually to reach $1.3 trillion by 2030, according to Precedence Research.

To that end, investors can realistically expect Amazon to report double-digit sales growth through the end of the decade. That makes its current price-to-sales ratio of 1.8 look quite cheap, and it's certainly a bargain compared to the five-year average of 3.8 times sales.

That is why this Warren Buffett stock is a screaming buy.