What happened

Home Depot (HD 0.94%) handily outperformed the market last year. Its stock jumped 41%, or about double the 19% gain in the S&P 500, according to data provided by S&P Global Market Intelligence.

^SPX Chart

^SPX data by YCharts.

The rally kept the home improvement giant's shares ahead of rival Lowe's (LOW -0.04%), whose stock was up 32% in 2017.

So what

Home Depot delivered tons of good news to investors last year. It kicked 2017 off by announcing a 29% dividend hike, and it followed that financing win with several quarters of improving operating trends.

Comparable-store sales jumped 6% in the fiscal second quarter and managed a blistering 7.9% improvement in the third quarter.

A customer buying lumber.

Image source: Getty Images.

Through it all, Home Depot's business outshined Lowe's on core metrics including customer traffic, profitability, and return on invested capital.

Now what

Home Depot executives are targeting full-year comps of 6.5% in 2017 to mark a healthy acceleration over the prior year's 5.6% boost. This forecast implies hefty market share gains since Lowe's is on pace for just a 3.5% comps increase.

The short-term boost from hurricane rebuilding efforts will taper off as the business moves deeper into the new year. However, when they issue their 2018 forecast in February, CEO Craig Menear and his executive team are likely to cite a strong economy and healthy housing market as support for their optimistic sales and profit predictions.