Home Depot (HD 0.94%) shareholders have certainly experienced a forgettable 2022 so far. The stock was down 22% through mid-December, making it a worse performer than the S&P 500. Home Depot also unperformed its smaller rival, Lowe's Companies (LOW -0.04%).

Strong investing returns aren't measured in such short time frames, though. With that wider focus in mind, let's look at where Home Depot might be leading shareholders over the next several years.

Growth through challenges

Home Depot's operating performance to date in 2022 suggests that it will achieve solid growth even through a rocky period for the housing market. Sales rose 4% in the most recent quarter, after all, on top of huge gains a year ago.

The retailer's popularity among professional contractors has helped keep revenue rising at a brisk pace, even as consumers pulled back their spending on home improvement projects. Lowe's, which has less pull with professionals, has seen weaker sales through the current slowdown.

Yet both companies are struggling with falling customer traffic, meaning slower growth is likely through most of 2023. Home Depot's long track record of market share gains means it should lead the industry during the next upswing, though.

Financial wins and losses

Home Depot's prime position in the industry translates into higher earnings growth compared to peers, which should support better investor returns. The company is targeting an operating profit margin of nearly 15% this fiscal year, compared to Lowe's roughly 13%.

But there's some bad news on this score, too. Home Depot's industry-leading return on invested capital (ROIC) has been supported in recent years by access to cheap cash.

With interest rates rising, that era appears to be over. As a result, investors might expect to see pressure on ROIC, which has soared to over 40% of sales from 9% of sales, where it landed during the worst of the housing market crisis.

HD Return on Invested Capital Chart

HD Return on Invested Capital data by YCharts

Weaker results here would show up most directly in slowing cash returns. Home Depot might not spend as aggressively on stock buybacks, which were a whopping $15 billion last fiscal year.

The next upcycle

Investors shouldn't let that short-term rockiness keep them away from an otherwise stellar business. Yes, Home Depot's sales would take a hit during any recession that develops in the housing market. And earnings growth might be weaker even if the economy continues expanding at a slow pace, thanks to rising interest rates.

But the home improvement giant has a great shot at winning market share through whatever selling environment characterizes the next several years. Its stellar finances also make it likely that the dividend will continue rising, just as it has for more than a decade.

Keeping your eye on those trends will help you focus on the big-picture outlook rather than the volatility that is likely over the next few quarters. That long-term focus is the surest path toward market-thumping returns for investors -- whatever the coming months might bring for Home Depot's business.