Investors are in a celebratory mood right now. The S&P 500 recently hit a new high after crossing the 5,000-point mark. The index is up a blazing 22% in the past year as fears of an impending recession have given way to optimism that the economy will log another year of strong growth in 2024.

Wall Street has reacted by stampeding back into tech stocks and pushing the Nasdaq Composite nearly 40% higher in the past year. But there are other stocks that stand to benefit from declining interest rates and a quickly expanding economy.

Let's take a closer look at a potentially big winner in this bull market: Home Depot (HD 0.94%).

The recent results

The bad news is Home Depot has been posting unusually weak sales through most of the last two fiscal years. Customer traffic levels declined in 2022 and 2023 after soaring during the height of the pandemic. Spending rates slowed, too, as do-it-yourself shoppers canceled or delayed big projects. The chain's expansion rate was also pressured by the slumping price of lumber in recent quarters.

Still, Home Depot's rising market share reflects its premium industry position and should support great long-term returns for patient investors. Comparable-store sales are only on pace to drop by 3% in fiscal 2023 compared to rival Lowe's Companies (LOW -0.04%) expected 5% slump. These metrics suggest the chain is primed for a rebound when the housing market recovers during the next big economic expansion.

Cash and profits

In the meantime, Home Depot is cranking out higher profits and ample cash flow, making it likely that shareholders' returns will be amplified by a rising dividend and more stock buyback spending in 2024. Operating cash flow hit a cool $16 billion in the past nine months, up from $10 billion a year ago. The retailer's profit margin is holding steady at nearly 15% of sales, consistently above the 13% rate at Lowe's.

HD Operating Margin (TTM) Chart

HD Operating Margin (TTM) data by YCharts

These wins help explain why investors can expect a significant dividend hike this year even after earnings fall by a projected 10% in 2023. It's true that Home Depot's record of steady dividend growth isn't as long as Lowe's, which has raised its payout for more than 25 consecutive years. The industry leader paused its annual boosts during the worst of the Great Recession in the mid-to-late 2000s. But Home Depot's higher profitability and cash flow give management plenty of room to keep hiking that payout.

No need to wait

Investors don't have to wait until the economic rebound begins in earnest to start generating good returns from Home Depot's stock. The retailer's shares have underperformed the market in the past year and are priced at 23 times earnings, down from the pandemic-era high of 25 times earnings.

Investors should brace for more volatility in the short term, because it is anyone's guess how the economy will perform over the next few quarters. Yet the long-term outlook is bright for the home improvement industry. Home prices have room to keep rising, demographics are favorable as younger generations move into their homebuying years, and the aging stock of current housing means there's lots of need for higher investment levels.

Home Depot shareholders might not immediately benefit from these trends, but they are highly likely to boost your returns over multiple years.