Stock market crash: Those are three of the scariest words you can hear as an investor. Unfortunately, downturns happen more often than you might think. Since 1928, the market has declined 10% or more on 54 different occasions, or about once every 1.7 years. With that in mind, here are three steps (including one stock recommendation) that will help you prepare for the next crash.

Step 1: Adopt a long-term mindset

A long-term mindset is the single most valuable tool an investor can possess. When you focus on short periods of time, the market is very volatile. For instance, going back to 1928, the S&P 500 has generated positive returns in the month of August in 54 years, or 58% of the time. And if we zoom out a little further, the index has been profitable in 62 out of the past 93 years, or 67% of the time.

Investor watching market prices as they fall.

Image source: Getty Images.

Now, if we zoom way out, the annualized return of the S&P 500 is roughly 10% since 1928. Put another way, holding a stock for a month or even a year is little more than a coin flip, but if you hold a stock for decades, the odds of it being a profitable investment are much higher. That's why long-term investors have an advantage over their nearsighted peers.

More broadly, this means you shouldn't sell just because the stock market crashes. Despite losing at least 10% of its value every 1.7 years, the S&P 500 has yielded strong returns in the past century.

Step 2: Invest regularly, but build a cash position

No one knows the future. So instead of trying to time the market, you're better off investing on a regular basis. To help with this, arrange to have funds automatically deposited into your brokerage account every payday. Thanks to commission-free trades and fractional shares, it doesn't need to be a large sum of money -- even $20 is a worthwhile contribution.

But here's the trick: Don't invest every penny. If you add $20 each month, buy $15 worth of stocks and keep $5 in cash. This will help you build a cash position over time, which will allow you to capitalize on any downturns.

Don't go too far in the other direction, though. Any uninvested funds will count against your total return. I tend to keep roughly 5% of my portfolio in cash, but that number will vary depending on your personal comfort level. Some great investors don't keep a cash position at all, and others prefer a cash position of at least 10%.

Step 3: Keep a watchlist of high-quality stocks

Some investors spend a lot of time looking for stocks that might fare well during market crashes. Unfortunately, a low tide typically sinks all boats, meaning that even the most resilient companies usually take a hit during a downturn. That's why I look for stocks with strong prospects for future growth and solid competitive positions. Shopify (NYSE:SHOP) is a great example.

Shopify helps merchants manage sales across physical and digital channels, integrating orders from marketplaces, social media, and online storefronts in a single platform. The company also offers a range of merchant services, including payment processing, discounted shipping, and financing. In short, Shopify simplifies commerce.

More broadly, its business model plays into two major trends: online shopping and digital payments. And its merchant-centric growth strategy has translated into incredible scale -- Shopify serves over 1.7 million merchants. In turn, that has helped the company build an extensive partner ecosystem, including 7,000 third-party apps that boost the functionality of its platform.

More importantly, Shopify is still executing on this growth strategy. The company is building an AI-powered fulfillment network across the U.S., which will further enhance its value to merchants. Once complete, Shopify will provide managed fulfillment services, leveraging vast amounts of data to help businesses better manage their supply chains and deliver orders more quickly. This will reinforce its value to both buyers and sellers.

Not surprisingly, Shopify has posted impressive financial results like clockwork. Year-over-year revenue growth averaged 100% in the first four quarters of the pandemic, while free cash flow has been consistently positive over the same period.

Looking ahead, the company is well positioned to maintain this momentum. Management estimates the size of its market opportunity to be $153 billion, but that figure only includes smaller businesses. However, Shopify Plus -- a more customizable commerce platform for larger enterprises -- is gaining traction with companies like McCormick and Netflix. In other words, Shopify has plenty of room to grow.

Here's the bottom line: This stock would almost certainly get hammered during a market crash. But will that make e-commerce or digital payments any less important? Unlikely. And will Shopify become any less valuable to the 1.7 million businesses that rely on it? Nope. It might take some time, but the stock would almost certainly recover and go on to hit new highs.

That's what makes Shopify a "high-quality" company -- it has a big market opportunity, a strong competitive position, and a history of excellent financial performance. Use this as an example, and fill your watchlist with companies of a similar caliber. Then, when the next market crash hits, you'll have your shopping list ready.

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.