When considering where to place your hard-earned capital in this kind of market environment, investors should seek out companies that are successfully managing the current economy, have competitive advantages, and sell for attractive valuations. I believe these are key ingredients for a recipe that will boost anyone's portfolio over the long term. 

Home Depot (HD -0.36%) checks all of these boxes. The stock deserves a closer look if you have $100 you're ready to invest. 

Handling a weaker economy 

In its third-quarter (ended Oct. 30), the leading home improvement chain increased revenue 5.6% year over year to $38.9 billion. Same-store sales rose a healthy 4.3%, and diluted earnings per share of $4.24 were 8.2% higher than Q3 2021. The business handily beat Wall Street analysts' expectations for both the top and bottom lines. 

Higher interest rates across the economy are certainly having a negative effect on all businesses in a range of industries, but some could argue that because of Home Depot's connection to the important U.S. housing market, it is affected even more. 

Higher mortgage rates make financing a home more expensive, and as a result, housing prices have cooled off. According to data from real estate brokerage firm Redfin, the median home sales price in the U.S. was up just 2.9% year over year. And it has trended downward since hitting a high of over $430,000 in May. 

Because the majority of the average consumer's wealth is tied up in a home, when housing prices stay flat or even start to decline, people are less inclined to take on expensive renovation projects. This controlled spending can trickle into other parts of the economy. This is why experts follow the housing market so closely. 

But to see Home Depot continue posting sales growth in this environment is an extremely encouraging sign. 

Additionally, inflationary pressures are affecting the business. While the average ticket size in the latest quarter was up 8.8% year over year to $89.67, the number of customer transactions dropped 4.3%. And the company's gross margin of 34% showed a slight decline from a year ago thanks to increased investments to bolster the supply chain. 

Despite these challenges, Home Depot isn't really struggling to navigate the situation."Both our Pro and DIY customers grew again in this past quarter," CEO Ted Decker said on the Q3 2022 earnings call. "Project demand, in particular, is very strong."

A sizable opportunity 

Considering Home Depot's consistent profitability and industry-leading position, I see no reason why it can't make it out of the current macroeconomic scenario stronger on the other side.

Thanks to its massive scale, demonstrated by trailing 12-month revenue of $157.3 billion, Home Depot is able to leverage its negotiating power with its thousands of suppliers to receive favorable terms. These lower costs lead to lower prices for customers, while helping to expand the company's margins over time. It's hard for smaller rivals to compete on this front.

What's more, Home Depot only commands approximately 17% of the home improvement market right now. Management estimates the industry to be worth $900 billion, so there is a huge runway for expansion as we look toward the next decade. 

Also working in Home Depot's favor is its robust omnichannel platform. The business has renewed its focus on improving the customer experience by providing convenience and better shopping tools and features. It's working. Digital sales were up 10% year over year, and 50% of online orders were fulfilled through a store, showcasing how seamless the process is. 

Current valuation 

Home Depot shares are down 23% on the year, a bigger decline than the S&P 500's 18% drop. As a result, the stock currently sells for a price-to-earnings ratio of 19.2, lower than its trailing 10-year average of 22.6. This looks like a good entry point for investors to buy in. 

Plus, Home Depot has paid a dividend for 143 straight quarters, and the stock current yields 2.39% -- higher than the 1.66% offered by the S&P 500. Investors looking for extra income from their holdings should be even more intrigued to buy the home improvement giant. 

While many investors flock to tech stocks with the hope of huge returns, Home Depot has a proven business model that has increased sales and profit over time, with promising growth prospects ahead. A $100 investment in the stock could help provide the foundation your portfolio needs today.