Home Depot's (HD -0.61%) stock hardly budged last year even as the Dow soared higher by 13%. The performance gap meant that the retailer was one of the worst stocks on the blue chip index in 2016.

HD Chart

HD data by YCharts.

That weak outing came even as revenue, earnings, and profitability all set record highs and as Home Depot widened its market share lead over its biggest national competition, Lowe's (LOW -1.11%). Still, investors chose to discount those operating and financial wins and to focus almost exclusively on the company's slowing growth pace.

High expectations

It didn't help that Home Depot entered the year burdened by high expectations. The stock soared 26% in 2015, trouncing the market's slight decline. Comparable-store sales were 7% or better in all periods that year except for the retailer's second quarter. The final two quarters showed accelerating gains, too, as comps improved from 5.7% to 7.3% -- to an incredible 8.9%. For the full year, Home Depot enjoyed a market-thumping 4.1% customer traffic jump as it passed 1.5 billion transactions.

The 2016 fiscal year didn't include the same blowout growth trends. Customer traffic rose 2.9% in the nine months ended in October and comps growth ticked lower as well. In fact, Home Depot's best comps quarter of the year barely matched its worst quarterly performance in 2015.

Those lower figures still kept the company well ahead of the competition; Lowe's trailed its larger rival every step of the way. In the most recent quarter, Home Depot trounced Lowe's on comps growth (5.9% vs. 3%) and on profitability (14.5% vs. 8.3%).

Earnings and outlook

Even as its sales expansion pace slowed, Home Depot made big strides at improving its earning power last year. The company reached new milestones in operating margin and in sales per square foot. It passed $10 billion of operating income through the past nine months, and its 14% profit spike over the prior-year period was almost double the pace of sales growth.

Image source: Getty Images.

CEO Craig Menear and his executive team spent heavily on share repurchases over that time, too, which supercharged per-share earnings growth. EPS jumped 17% to over $5 through the third quarter and is projected to see similar growth for the full fiscal year.

Executives see the potential for continued growth in the home improvement market at least through 2018, when the company expects to pass $100 billion of annual revenue. Its operating margin should rise to a new high, as well, which will translate into operating earnings of $15 billion. Home Depot is also likely to post return on invested capital that's approaching 35% by then, improving on its already market-beating 28%.

Valuation

Home Depot is on track to earn $6.33 per share for the 2016 year, which translates to a valuation of about 21 times profit. That represents a big discount to Lowe's price-to-earnings ratio of 26, but on a price-to-sales basis, Home Depot enjoys the type of premium that you'd expect to see for an industry leader. Investors must pay 1.8 times revenue for Home Depot shares today, compared to just 1 time for Lowe's.

HD PE Ratio (TTM) Chart

HD PE Ratio (TTM) data by YCharts.

Yet Home Depot's stock has gotten cheaper on both an earnings and sales basis this past year, which lessens the risk that you'll overpay in buying this high-performing business right now. Sure, its growth rate has declined from 2015's blockbuster gains, and a further slowdown could be on the way. But the company is still posting some of the strongest operating results in the retailing industry. In my view, Home Depot has a good shot at soaking up more market share in its core business while expanding into high-growth areas like e-commerce and maintenance, repair, and operations, making it an attractive option for long-term investors.