Image source: The Motley Fool. 

Home Depot (HD 0.02%) has been one of the big winners in retail in recent years.

Riding the recovery in the housing sector and Americans' penchant for spending on home improvement, Home Depot has put up steadily increasing profits and same-store sales over the past five years, crushing the broader market in the process.

HD Chart

HD data by YCharts

In addition to benefiting from trends in homebuying, Home Depot's surge has come from strategic choices such as essentially not building new stores since 2008 and instead investing the money that would have gone into new locations into things such as improved in-store experience, e-commerce, and capital returned to shareholders through dividends and share buybacks. 

Over the past five years, the company's total shares outstanding have fallen by 20%, giving a 25% lift to earnings per share.

This year, that pattern has continued as the home-improvement retailer has repurchased 20 million shares, or about $2.6 billion worth, reducing the total number of shares outstanding by 1.6%. The formula has been a success for Home Depot as the stock's recent performance shows and the company's goals for 2018 should propel the stock further if it can reach them.

The retailer sees revenue increasing to $101 billion from $88.5 billion, with operating margin improving to 14.5% up from 13%, and return on invested capital up to 35% from 27%.  Shareholder return was one component of its plan to continue driving earnings growth as it also plans to boost productivity and customer service and focus on select growth areas.

Diminishing returns

While buying back shares has been a winning strategy for Home Depot in recent years, as the stock has surged, the gains from enacting share buybacks have faded. Buybacks, of course, work best when a stock is cheap and undervalued and the company can take advantage of it by repurchasing, helping to boost earnings per share and raise the stock price. 

However, as the stock has risen, it's become harder to argue that it's undervalued. Five years ago, the stock's P/E was less than 15, but today it's near 23 as the stock has outpaced its still-strong earnings growth. The stock's fatigue seems evident this year, as shares are up just 2% year to date even though the retailer has continued to perform well, raising its full-year guidance for both of its 2016 quarterly reports. While raising guidance would be enough to lift most stocks, the market now seems to expect such outperformance for Home Depot.

The upshot may be that share buybacks become less potent as the stock's valuation has increased. It's not a surprise, then, that Home Depot has slowed down its pace of repurchases. After buying back about $7 billion in stock last year, the company is on pace to complete only about $5.2 billion in repurchases this year.

Still, share buybacks have been an important part of the company's growth plan, along with robust increases in the dividend. If management can execute on its 2018 goals, while continuing to repurchase shares at today's price, the stock should continue to deliver for investors