What happened

Shares of Home Depot (HD 0.94%) have been sluggish so far this year, retreating 1.7%, according to S&P Global Market Intelligence. The company's last two earnings reports showed a combination of no growth, rising expenses, and a gloomy outlook. Recent economic data was helpful, but not enough to erase damage done earlier in the year.

So what

Home Depot stock has endured some ups and downs throughout the year so far, but its worst stretch came in February and March. The stock dropped roughly 15% during those months after a disappointing quarterly earnings report. The retailer fell short of analyst estimates, suffering declining same-store sales and lower transaction volume. It only scraped by with 1% sales growth thanks to new store openings and increased average ticket size, which was likely related to inflation.

Importantly, the company's outlook was just as uninspiring as its earnings. Due to difficult economic conditions, Home Depot's forecast called for stagnant sales and lower profits. The company expects higher employee expenses to squeeze margins. Those predictions were confirmed as all the same trends continued in the subsequent quarter.

Hardware store employee discussing paint shades with a customer.

Image source: Getty Images.

The retail stock was able to claw back some of those gains thanks to economic data. The stock performed well in June thanks to the Fed's decision to pause interest rate hikes. While future rate hikes remain likely, this was a bullish sign for the housing sector -- high interest rates discourage home improvements, residential construction, and existing home sales. The Fed's pause was welcome news that the worst-case scenario might be avoided.

That optimism was solidified by surprisingly strong economic indicators. New housing construction starts and building permits came in above expectations, suggesting strength in that sector. The Consumer Sentiment Index also charged higher, suggesting that people's expectations and security are improving, despite remaining shaky. That's an important indicator for retailers and demand for big-ticket items, so it sent Home Depot's stock higher.

Now what

Home Depot's dividend yield has risen from 2.41% to 2.57% so far this year. Meanwhile, its forward P/E and enterprise-value-to-EBITDA ratios have dropped slightly.

HD PE Ratio (Forward) Chart

HD PE Ratio (Forward) data by YCharts

Investors have revised their expectations downward, and the stock's valuation has also retreated modestly relative to its fundamentals. Those combined factors create a potential entry point for investors who are bullish about Home Depot's long-term catalysts, as the stock is relatively cheap at the moment. The company's wide economic moat positions it to capitalize on housing demand over the next few decades, but macroeconomic uncertainty could generate volatility in the short term.