You know it's bound to happen sooner or later. The stock market is going to crash. It's likely to take a huge toll on most stocks. But there are some stocks that should be relatively resilient even if the market nosedives.

We asked three Motley Fool contributors to identify stocks to buy ahead of the next market crash. Here's why they picked Dollar General (NYSE:DG), Franco-Nevada (TSX:FNV), and Yum! Brands (NYSE:YUM).

Stock charts trending downward with a map in the background

Image source: Getty Images.

Back to basics 

Keith Speights (Dollar General): The most likely reason for a market crash is an economic recession. When times get tough, many people cut back on spending. They focus on the basic items that they must have and turn to stores where they can get those items at a low price. That makes Dollar General a pretty good stock to buy before the next market crash.

Dollar General wasn't publicly traded during the last recession. But its stock performed really well in the subsequent years, soaring more than 520% since late 2009. A major factor behind Dollar General's huge gains is that the company has been expanding more rapidly than any other retailer

The discount retailer's DG Fresh initiative to bring the distribution of frozen and refrigerated goods in-house should help Dollar General reduce costs. If the economy tanks, those are the kinds of products that consumers are likely to keep on buying.

Dollar General is also enhancing its mobile apps. In particular, the company's digital coupons have been a huge hit with customers. Again, if financial conditions deteriorate, this feature should make Dollar General more appealing to cash-strapped households.

The stock isn't exactly a discount itself right now, with shares trading at nearly 20 times expected earnings. But with solid growth prospects, I think Dollar General should be a winner in bad times and good times.

Diversification on top of diversification

Reuben Gregg Brewer (Franco-Nevada): Precious metals are a great investment to own when markets are crashing, because Wall Street tends to flock to assets seen as stores of wealth. That's pretty much the claim to fame for gold and silver. But owning bullion isn't a great option because it lacks growth potential -- an ounce of gold will always just be an ounce of gold. And commodity bear markets can kill financial results at miners because it takes time to adjust to a changing price environment. That's why a streaming and royalty company like Franco-Nevada is a better option.

Streamers provide cash up front to miners in exchange for the right to buy precious metals at set prices in the future. This allows for wide margins in both good and bad times. And it helps companies like Franco avoid the complications of mining while still benefiting from the growth that miners get from expansion efforts. To highlight the consistency the streaming model offers, Franco has increased its dividend annually every year since its IPO over a decade ago. 

FNV Chart

FNV data by YCharts

That said, Franco-Nevada is more than just a gold and silver stock. It also gets between 10% and 20% of its revenue from oil and natural gas investments. This provides a little extra diversification to its portfolio, potentially helping to soften the blow when gold and silver prices are relatively weak. For investors looking to add some diversification to their portfolio in advance of the next market crash, Franco-Nevada is a well-balanced choice. It should benefit from a move toward hard assets like gold and silver and get a little boost from its oil and gas efforts while you wait for the inevitable downturn to arrive. 

Mickey D's isn't the only recession-beating play in fast food 

Keith Noonan (Yum! Brands): Investors looking for crash-resistant companies might be aware that McDonald's was one of the best-performing stocks during the Great Recession, but the fact that the fast-food industry performed pretty well as a whole is sometimes overlooked. That's not to downplay The Golden Arches' potential for resilience whenever the next crash hits. The fast-food giant's technology initiatives and other advantages put it ahead of the competition in many respects, but investors may also want to narrow in on other stocks in the field.

Yum! Brands, a conglomerate that includes Taco Bell, Pizza Hut, KFC, and other chains, is also set up to be a solid performer and deserves a look. If the next market crash corresponds with a recession, it's likely that many of the trends that helped the food industry outperform during the last one will be replicated. Purse strings may get tighter, but people will still be eating meals on the go and dining out to cut down on cooking-and-cleaning time. That dynamic could benefit Yum! Brands and drive customers to its relatively budget-friendly restaurants. The company also pays a dividend, with shares currently yielding roughly 1.5%.

Yum! Brands' stock managed to significantly outperform the S&P 500 during the Great Recession, dipping just 8.6% from 2008 to 2010 while the market index's level fell roughly 24% across the stretch. Shares might not look conservatively valued with a forward P/E of roughly 30, but the company has been putting up a strong performance, making impressive progress on its international expansion efforts, and its business looks sturdy enough to continue outperforming. The combination of being a worthwhile growth play and also relatively crash-resistant looks attractive in today's market. 

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.