Many companies are experiencing major slowdowns, lowering financial guidance, and laying off employees as the economy starts to hit a rough patch amid soaring inflation and rising interest rates. Couple this with tough comparisons from a year ago, and it's no wonder that the S&P 500 had its worst first half of any year since 1970.  

But this situation shouldn't scare away investors. In fact, when the economy and markets look weak, like they do now, it could be the best time to put money to work because valuations are compressed and the potential for future returns is higher. This is how I view the investing landscape. 

I've zeroed in on the next stock that I'm going to buy. Here are three reasons why it's Home Depot (HD 0.93%). 

Home Depot has a history of success 

Since its initial public offering (IPO) in 1981, Home Depot shares have produced an outstanding total return of over 2,400,000%, crushing the S&P 500 during the same time period. Strong underlying fundamentals unsurprisingly deserve the credit here. From fiscal 2011 through 2021, Home Depot's revenue and earnings per share have increased 115% and 529%, respectively.  

What's remarkable is that this incredible financial performance was achieved without significantly expanding the store base. In fact, over the past decade, Home Depot's store count has only increased 2.7%. This means that the business has done a fantastic job at boosting the sales volume per location. And this has translated into burgeoning profitability over time. 

Home Depot has found great success by positioning itself as an important part of the U.S. economy, particularly when it comes to supporting the housing market. Buying a home is the biggest financial decision consumers will likely make in their lifetimes, so keeping this asset up to date will always be a focus. I don't see any reason to believe that this perspective will change, supporting ongoing demand for Home Depot far into the future. 

Home Depot possesses competitive advantages 

No business can succeed for long periods of time without having a competitive advantage. In Home Depot's case, I can identity three that should continue keeping rivals at bay. 

First, the company benefits from its strong brand recognition. Customers would much rather shop at Home Depot for all of their renovation needs, as opposed to a lesser-known store that likely doesn't have the same level of service or the wide assortment of merchandise. There's a level of trust involved from a consumer perspective. 

Additionally, Home Depot's massive scale, with trailing 12-month sales of $155 billion, affords the company better negotiating power with its vendors, resulting in better prices for customers. What's more, Home Depot's size means favorite site location for new stores, as well as the ability to hire the best retail and corporate talent in the industry. 

And lastly, the business has switching costs, at least for its professional customers. For contractors, plumbers, electricians, and the like, Home Depot can be viewed as a mission-critical partner to help them get the right tools and supplies and get back to the job site as quickly as possible. Offering features like a loyalty program, discounted pricing, and multi-destination delivery make shopping at Home Depot a no-brainer decision for professionals, unless they want to disrupt the functioning of their own small businesses. 

All three of these competitive advantages are key for the company's long-term prospects, and they make the stock attractive to buy and hold. 

Home Depot's growth runway is massive 

According to the management team, the total addressable market is approximately $900 billion, meaning that Home Depot's market share today is 17.2%. Lowe's, a major competitor, commands approximately 10.6% of the market. So there's still a sizable portion of the fragmented industry that consists of smaller retailers, making the expansion opportunity for Home Depot ripe for the taking. 

The recipe for continued success includes delivering the best customer experience, maintaining its low-cost position in the marketplace, and allocating capital well, which is basically what Home Depot has done its entire operating history. There's no reason to believe that management can't keep things going in the same direction regardless of what is happening with the economy in the near term. And this should excite shareholders. 

As Home Depot continues to grow its market share in the gigantic industry, its sales, earnings, and share price are set to rise.