Home Depot (HD 0.43%) has been one of the best-performing retail stocks since the recession. While much of the sector has struggled with the rise of e-commerce and a decline in store traffic, shares of the home-improvement retailer have surged over 650% over the last decade. The company has benefited from operating in a retail segment that's protected from e-commerce disruption, a strong housing recovery, and smart strategic decisions like resisting adding stores.

Let's take a look at why Home Depot's strong performance should continue into 2018.

The lumber aisle at Home Depot

Image source: Home Depot.

A booming housing market

As the nation's leading home-improvement retailer, Home Depot's fortunes are tied more closely to the domestic housing market than anything else. As the economy continues to grow, so does the housing market. Home prices have now topped previous records set during the bubble in 2006,l and sales of existing homes were at their highest at the end of last year since 2006. The National Association of Realtors' chief economist Lawrence Yun projected a repeat performance this year with about 5.5 million existing homes sold.

Home prices and existing home sales are key indicators for retailers like Home Depot as home-improvement spending, renovations, and remodels are most common after a purchase. The more homeowners spend on their new residence, the more money they're likely to spend on remodeling.

Meanwhile, housing starts, another key driver of Home Depot's business, increased 2.4% to 1.2 million last year, the highest it's been since the housing bubble. A shortage in available single-family homes means that the Nationall Association of Home Builders expects single-family housing starts to increase 5% this year, and there's still plenty of slack in the market.  

As long as the underlying housing market continues to grow, Home Depot's sales and profit should continue to track higher.

Tax reform

Even if Home Depot's sales were to stagnate this year, its profits would still spike thanks to the tax reform bill that passed last month. The new law is a boon for retailers, who benefit the least from tax breaks for things like research and development and manufacturing in the U.S. and therefore, can expect to see their corporate tax rates fall the most. Home Depot was on track to pay a 36.3% tax rate this year, but considering the federal corporate tax rate will drop from 35% to 21%, the company should expect its tax rate to fall about 14 percentage points to 22% next year. That alone would boost its net income about $2 billion.

Not only does that increase the value of the stock, but it also gives the company a lot of extra cash to reinvest in the business or return to shareholders through dividends and share buybacks. The law should also benefit Home Depot by putting more money in the pockets of most Americans, some of whom will surely use that windfall for home improvement projects.

Critics have pointed out that the tax law could hurt the housing industry as it lowers the cap on the mortgage interest deduction from $1 million to $750,000. However, the vast majority of homes in the country still sell for less than $750,000, meaning most of Home Depot's customers wouldn't be affected.

Overall, the retailer is a clear winner from the new tax law.

A winning formula

A decade ago, Home Depot shifted its strategy. With more than 2,000 stores nationwide, management decided it had saturated the U.S. market. Instead of investing in new stores, the company would spend to improve its current locations, build out its e-commerce infrastructure, and buy back stock to reward shareholders. That plan has paid off handsomely as the company has put up consistent growth in comparable sales and operating margin. Adding sales at current stores is more efficient than opening new locations. Meanwhile, shares outstanding have fallen by close to a third since 2010. Thus, Home Depot is able to grow earnings per share quickly even as revenue increases have been more modest. Earnings per share have more than quadrupled from the depths of the recession to $7.20 over its last twelve months while revenue has only increased about 50% in that time.

Looking ahead, the company announced at its investor conference in December a $15 billion dollar share buyback authorization plus fiscal 2020 goals, including operating margin of 14.4% to 15%, compound annual sales growth of 4.5% to 6% driven by same-store sales, and return on invested capital of 36.4% to 39.6%. 

CEO Craig Menear alluded to big investments ahead, saying, "The retail landscape is changing at unprecedented rates," and that the company "will accelerate our investments."

Later in the month, Home Depot said it acquired The Company Store , a leading online retailer of textiles and home decor products, for an undisclosed amount. Reports also emerged last month that management had discussed making a bid for XPO Logistics -- a specialist in last-mile delivery of heavy goods like furniture and appliances -- in part to prevent Amazon from acquiring it.

Home Depot's management has executed brilliantly over the last decade and has won investors' trust to make a big potential acquisition if it believes that's in the company's best interest. With a strong housing market, a falling tax rate, and a proven formula for growing profits, the stock looks primed for more gains this year and beyond.