Home Depot (HD 0.94%) isn't firing on all cylinders right now. In fact, the business is on track to post a second consecutive year of declining customer traffic for fiscal 2023. Sales are set to fall for the year, and profits might decline by as much as 10% compared to 2022.

Investing is all about the future, though, which remains bright for this leading retailer. Let's look at some reasons to be extremely bullish about Home Depot's stock going forward.

The big picture

It's no surprise that Home Depot's stock has been a big beneficiary of the wider market rally these past few months. The U.S. economy is expanding at a solid clip, defying expectations that rising interest rates would cause a recession heading into 2024. Slowing inflation is pointing to an impending end to those interest rate hikes, and perhaps even a few cuts ahead.

These factors helped support a new bull market as the S&P 500 recently set an all-time high, rising 20% from late November through late January. That's great news for Home Depot's business as well, as the company made clear in its annual report.

According to management, "Our financial performance depends significantly on the stability of the housing and home improvement markets as well as general economic conditions, including changes in gross domestic product." GDP was up a healthy 3.3% in Q4, according to the government's late-January estimate.

Winning market share

Home Depot entered the Q4 period with solid momentum, given the sluggish retailing environment. Comparable-store sales (comps) fell 3% in the core U.S. market last quarter, outpacing Lowe's Companies (NYSE: LOW) 7% slump.

Home Depot's market share gains are also clear from its updated outlook. In November, the chain confirmed its forecast for annual comps declines of about 3.5% this year. "Our quarterly performance was in line with our expectations," CEO Ted Decker said. Compare those comments to Lowe's, which reduced its outlook to call for comps losses of 5% in 2023, down from the previous range of between 2% and 4% declines.

Still, investors will want to watch customer traffic trends for signs of stabilization over the next few quarters. Traffic fell 5% in 2022 and is down 3% through the first three quarters of 2023. Ideally, the retailer can show further improvement here as it enters the 2024 fiscal year.

Profits and cash

In the meantime, shareholder returns in 2024 should be bolstered by Home Depot's stellar financial trends. The retailer is maintaining its industry-leading profitability, for example, as operating margin holds near 15% of sales compared to Lowe's 13% rate.

The even better news is that free cash flow is soaring toward new highs at about $18 billion. These gains make it likely that Home Depot will boost its dividend in its upcoming earnings announcement, even though profits declined in 2023.

You'll have to pay a premium to own the market leader today. Shares are priced at 2.3 times sales and 23 times earnings, compared to Lowe's valuation ratios of 1.4 and 16, respectively.

That's a premium that should seem well worth it in a few years after the home improvement market returns to its more normal expansion patterns following the pandemic spike and subsequent lull. Home Depot enjoyed solid growth and earnings trends through these ups and downs, and investors have every reason to expect further successes like these over the next multiyear period.