The S&P 500 has been performing exceptionally well over the past 18 months or so, rising 94% since mid-March of 2020 when coronavirus pandemic fears first escalated the U.S. Even more remarkable is that the index has returned a 16% annualized rate following the Great Recession about a decade ago. Understandably, you're probably wondering if a market crash is likely given this strong run. 

For long-term investors, what the stock market does next month or next quarter is irrelevant. The primary objective should be to buy shares in high-quality companies with the intention to hold for at least five years. 

Keep reading for a stock that will alleviate any worries you have today. 

Parent and child high-fiving while working on home renovation project.

Image source: Getty Images.

How to view the stock market's valuation 

While it's difficult to say with any level of certainty if the market is going to begin a correction or not, there's a key indicator that investors can look at as a guide to better understand its valuation. The Shiller price-to-earnings (P/E) ratio, which takes the average of the past 10 years' earnings and adjusts for inflation, stands at 38 today. It hasn't been this high since the dot-com bubble in 1999 and 2000, a time characterized by market exuberance and tremendous speculation.

That should give you some perspective on where the S&P 500 is right now. And even if we take into account the massive government stimulus and falling interest rates, the stock market's level is still notable. 

Investors are right to have some fears about what will happen next. 

A smart stock to buy 

You can prepare for the possibility of a correction by taking a look at Home Depot (HD 0.77%). The leading home-improvement chain has increased quarterly sales and profit 103% and 253%, respectively, over the past 10 years. And its stock price has followed, soaring more than 900% during the same time. Home Depot now operates a total of 2,298 stores and sports a stellar return on invested capital of 44.7%. This is a reliable business that not only boosts your portfolio but will also let you sleep well at night. 

In addition to serving do-it-yourself (DIY) customers, the company's bread-and-butter strategy of catering to professionals (or Pros) is its competitive strength. Representing 45% of revenue and just 5% of the customer count in the most recent quarter, Pros are extremely valuable and lucrative for the business. These contractors count on Home Depot as a mission-critical partner to help them run their own small businesses and complete projects in a timely manner. 

Home Depot's massive scale and robust distribution network allows the business to get the right tools, supplies, and equipment to customers. Dubbed the One Supply Chain, the company has made huge investments in its fulfillment capabilities, with the ultimate goal of same-day or next-day delivery to 90% of the U.S. population sometime in 2022. This initiative, coupled with the immediacy with which customers need products, has and will continue to defend Home Depot against e-commerce behemoth Amazon. 

The strong domestic housing market, supported by low interest rates, short housing supply, and the popularity of remote work thanks to the pandemic, all support Home Depot's prospects in the years ahead. For many people, buying a home is the single biggest financial decision of their lives, and spending on ongoing renovation projects is seen as an investment in that asset. This perspective isn't likely to fade anytime soon. 

Home Depot is a safe, reliable, and historically successful business that's a proven winner in both good and bad economic times. It's the smartest stock to buy if a market crash happens.