Since the start of the month, the S&P 500 and the Nasdaq have seen their ups and downs. But overall, we're looking at losses of 7.3% and 10.5%, respectively, since their recent highs on Sept. 2. The continuation of the coronavirus crisis and uncertainty about the presidential election have fueled the declines.

This turbulent market means one thing: It's time to load up on stocks that we know will weather the next market crash.

Now the question is how to find a crash-proof stock. I like to look at how a stock fared during other crashes -- and, more importantly, why the company has been successful during the past crashes, or why it will be successful in the future. Considering this, which stock should you buy right now? Amazon (AMZN -0.29%). Let's take a closer look at why this online retail giant is the ideal stock to protect your portfolio well into the future.

Man's hand holds out  red downward arrow.

Image source: Getty Images.

Not just a stroke of luck

From late February through mid-March, Amazon's stock fell along with the rest of the market. The coronavirus outbreak had begun its deadly trek around the world, and at the same time, it shook markets. While major indexes took a while to recover, Amazon shares recouped their losses by mid-April. Today, they're up 76% since their March lows and 60% for the year.

Some might say that during the market crash, Amazon just got lucky. Stay-at-home orders meant people were shopping online more and stocking up on essentials. Naturally, many would turn to this market-leading seller of groceries and general merchandise. More than a third of 2019 U.S. e-commerce sales happened on Amazon, according to a Digital Commerce 360 analysis. Consumers also had more time to watch movies and read books -- a perfect reason to sign up for the Amazon Prime program and enjoy unlimited entertainment.

But Amazon's success this spring wasn't just a stroke of luck. The stock has proven resilient in other market crashes, too -- when consumers weren't compelled to stay home and shop online. The 2015-2016 sell-off is a good example. Amazon slid along with the rest of the market in August 2015, but by October it had already recovered its losses and was on its way to what would be a 117% annual gain. Amazon rose 11% the following year.

AMZN Chart

AMZN data by YCharts

One more example: The Great Recession. When markets tumbled in September 2008, Amazon followed. But the shares began to rebound two months later. And by the end of 2009, the stock had gained 42% from its pre-crisis level.

AMZN Chart

AMZN data by YCharts

The big breadwinner -- and 2 other key factors

So, why is Amazon resilient? One reason is the company's ability to sustain revenue growth (and, in more recent times, earnings growth) regardless of economic downturns or the stock market's movements. Annual revenue has been climbing for more than a decade, and annual net income has been on the rise since 2015.

It helps that Amazon is in the right business. U.S. online retail sales totaled more than $343 billion last year and are expected to climb 39% by 2024, according to Statista. But what I like about Amazon is that it diversifies -- in retail and beyond. Amazon is the go-to place for general merchandise, but also has been ramping up its position in the grocery market ever since the acquisition of Whole Foods in 2017. The coronavirus crisis represented an opportunity to make further gains in grocery delivery. In the second quarter, Amazon increased its capacity in this area by more than 160%. And online grocery sales tripled in the quarter year over year. The effort in grocery and essential items will insulate Amazon at times when consumers are spending less on general merchandise.

Finally, Amazon's big breadwinner is Amazon Web Services (AWS). The business's operating income accounts for 57% of the company's total operating income. And as a leader in the global cloud infrastructure services market -- with a 33% share, according to Synergy Research -- AWS will continue to drive profit.

The biggest breadwinner of all

All of these elements -- growth of the online retail market, Amazon's expansion in grocery, and the strength of AWS -- explain Amazon's success in past market crashes. And they make me confident Amazon will be a winner in the next market crash as well.