Home Depot's (HD -0.55%) stock has trounced the S&P 500 over the last five years, generating a total return of 168% compared to 120% for the broader index. Even with this outperformance, Home Depot's stock finds itself trading at a significant discount to the S&P 500 when comparing P/E ratios. 

After a historic performance in fiscal 2020, you'd think that stock for the world's largest home improvement retailer would be priced at a premium. But clearly, that's not the case. This dislocation provides investors the rare opportunity to buy shares of this competitively advantaged business. 

If you've got $1,000 you want to put to work, look no further than Home Depot.

man holding $1000 in cash

Image source: Getty Images.

The housing market is strong 

During the fiscal year that ended Jan. 31, Home Depot's revenue, comparable sales, and income soared 19.9%, 19.7%, and 14.4%, respectively. It was a record-breaking year, but Wall Street is worried about decelerating growth starting this year due to the gradual reopening of the economy, giving consumers more options to spend again. 

While this is certainly warranted in the near term, the tailwind behind Home Depot's back is the strong housing market. The median home sales price in the U.S. increased 18% in the four-week period ended April 18 compared to the same time last year, driven by a major supply shortage. 

Home Depot will benefit for two reasons. First, as people prepare to sell their homes and when people move into new homes, they are likely to take on home improvement projects. Second, as we slowly get past the coronavirus pandemic, those Americans who have the luxury of working from home will reassess their housing needs. This will boost demand for home office spending. 

Further supporting the business is the fact that millennials currently make up the largest share of homebuyers in this country at 37%. Oh yeah, and historically low interest rates don't hurt either. 

Help from the pro customer 

Home Depot's pro customer cohort (think renovators, private contractors, and property managers) showed weakness last year. This is not surprising given homeowners' reluctance to let people inside to work on big projects. But this segment's growth accelerated in the most recent quarter, and backlogs are rising. 

Any drop off in the DIY business this year could be more than offset by performance from the pro segment. These customers are very valuable to Home Depot. Because they are commercial accounts, they have higher average ticket sizes than do-it-yourself customers. Additionally, delivering on contractors' specific needs and helping them grow their own businesses allows Home Depot to build long-term relationships.

man and woman working on a home improvement project

Image source: Getty Images.

Although management isn't providing guidance for this fiscal year, it's safe to expect pent-up demand for larger home improvement projects in the next few quarters, bolstering the pro segment this year. 

A favorable setup 

Home Depot's stock currently trades at a cheap multiple of 27 times trailing-12-month earnings (compared to 42.6 for the S&P 500). In an economic environment characterized by ultra-low interest rates and unprecedented levels of monetary stimulus, this valuation is extremely attractive.

The company's past expenditures to upgrade its supply chain and create an integrated omnichannel experience have resulted in increased efficiency in its stores, which has led to operating and profit margin expansion over the years. Home Depot's ability to lean on these advantages will keep expanding the top and bottom lines in the years ahead, making shareholders happy. 

Boosting returns for investors is a 2.04% dividend yield that will be paid for the 136th consecutive quarter this March. Management also expects to resume share repurchases during the quarter as well. 

A $1,000 investment in Home Depot would buy you about three shares. This will prove to be a fruitful endeavor for investors.