Decades-high inflation and rapidly rising interest rates crushed the market in 2022 as investors soured on speculative stocks in favor of safer assets. The S&P 500 and Nasdaq Composite index were down 19% and 33%, respectively, last year -- their worst performances since 2008. This type of drop can cause even the most mentally strong investors to reassess their strategies. 

In times like these, it may be worth taking a closer look at value stocks to protect your portfolio. Many of these businesses are trading well below their peaks -- among them, home improvement retailer Home Depot (HD -1.77%). Should you buy this magnificent value stock right now? 

Selling at a discount 

Home Depot shares hit an all-time high price of $403.11 in December 2021, but since then, the stock is down 32%. As of this writing, Home Depot shares are trading at a price-to-earnings (P/E) ratio of 17, a sizable discount to its trailing-five-year average of 22. Home Depot is not only cheaper than its rival Lowe's, which trades at a P/E of 19.2, but it is slightly lower than the S&P 500's P/E of 17.6.

Yet an easy argument can be made that Home Depot is better than the average company out there. Over the past decade, Home Depot has seen its revenue increase at a faster rate than what Lowe's has posted, with better trailing-10-year average gross and operating margins. This should make one scratch their head at the discrepancy between the P/E ratios of these two home-improvement giants. 

To be fair, Home Depot has been facing some challenges recently, most notably softness in the housing market. Thanks to the Federal Reserve aggressively hiking interest rates throughout 2022 and into 2023 to fight inflation, mortgage rates are at levels not seen in about 15 years. This has caused housing prices to cool down. The result is that as homeowners see their most prized financial asset stop appreciating in value as they would like, they are less inclined to take on expensive renovation projects. 

And the management team called out a pronounced shift in consumer spending toward services, which is hurting companies that sell physical goods. In fact, Home Depot's customer transaction count dropped 6% year over year in the latest quarter. Executives expect no sales growth in the current fiscal year, highlighting the bleak near-term outlook. 

Favorable characteristics 

It's not all bad news, however. Home Depot does possess some very attractive characteristics that investors can appreciate. For starters, the business is massive with fiscal 2022 revenue of $157.4 billion. This cements the company's importance to the U.S. economy and housing market. But because the industry is still so fragmented, with Home Depot commanding a relatively small 17% share, the growth runway remains sizable for the market leader. 

Supporting Home Depot's prospects are some key underlying trends. According to CEO Ted Decker, the U.S. doesn't have enough homes to satisfy the population. In other words, there is a housing shortage. Moreover, he mentioned that more than half of the homes in this country are 40 years old or older. Renovations will be vital to addressing these issues, placing Home Depot in an advantageous spot. 

An overlooked advantage that Home Depot benefits from is that it operates in an industry that doesn't have much technological disruption. This isn't a fast-moving software business. At its core, Home Depot is still a retailer. Investments made in recent years to bolster the omnichannel experience have also helped to boost store-level volume. Sales per square foot continue climbing higher over the years. And in the most recent quarter, 45% of online orders were picked up at a store, showcasing how well Home Depot is positioned to serve its customers in ways most convenient for them. 

With these positive traits in mind, it might be an easy decision for investors to scoop up the stock at its current valuation.