With Home Depot's (HD -0.75%) stock up a dazzling 700% over the past decade, it's understandable that some investors might think the retailer's days of market-beating returns are behind it.

Yet these skeptics are likely to be proven wrong. Even today, with its stock trading near all-time highs, Home Depot is poised to deliver strong gains to investors in the years ahead. Here's why.

Rising home prices

Much has been made about the low supply of homes for sale in the U.S. Builders are struggling to keep up with demand, as labor shortages and rising raw material costs are making it more difficult to build new homes. 

Bears argue that fewer home sales will dent Home Depot's revenue and profits. The typical buyer spends about $3,500 on home goods and services after purchasing a new house, according to Home Depot, and many of these purchases are made at home improvement stores like Home Depot. So it stands to reason that fewer home sales would mean fewer sales for the retailer.

That is, until we also factor in that a low supply of homes for sale is causing home prices to rise in many areas of the country. Homeowners tend to spend more on home improvement as their houses rise in value, and this is having a direct and significantly positive impact on Home Depot's sales. 

The shortage of homes on the market seems unlikely to ease significantly in the foreseeable future. As such, home prices should continue to climb, boosting Home Depot's sales and profits along the way.

Rising stacks of gold coins with toy houses on top

Rising home prices are a boon for Home Depot. Image source: Getty Images.

Strong in-store and online results

Amazon.com (AMZN -2.91%) and e-commerce in general have wiped out a huge swath of physical retail. Yet Home Depot has largely been immune to this threat.

Heavy materials that are difficult and expensive to ship are a significant portion of Home Depot's sales, which helps to insulate it from online competition. The expertise of its employees and its strong relationships with professional contractors also help to widen its competitive moat.

Moreover, Home Depot has resisted the temptation to open new stores, focusing instead on upgrading its existing store base with better technology and e-commerce fulfillment capabilities. This has both improved the sales productivity of its physical stores and made Home Depot a powerful force in online retail. Comparable-store sales were up 8% in its most recent quarter, while online sales jumped 26%.  

More profits equal more dividends for investors

Strong online and in-store sales growth is helping to drive Home Depot's profits sharply higher. Earnings per share surged 35.6%, to $3.05, in the second quarter. 

With Home Depot targeting $120 billion in annual revenue and a 15% operating margin by 2020 -- up from $101 billion and 14.55%, respectively, in 2017 -- the retailer's EPS should continue to climb in the coming years. And management plans to pay out much of these profits to shareholders via a steadily rising cash dividend.

Better still, Home Depot's shares can currently be had for only about 20 times forward earnings estimates. That's a fair price for a competitively advantaged business that's projected to grow earnings by about 15% annually over the next half-decade. As such, investors might want to consider buying Home Depot stock today.