What happened

In 2022, shares of home-improvement retailer Lowe's (LOW -0.04%) underperformed the S&P 500, dropping nearly 23% for the year compared to the market's 19% decline. However, returns in the second half of 2022 were far more promising, with Lowe's stock up 14% whereas the S&P 500 was only up 1%. 

So what

Lowe's did report some encouraging news in the back half of 2022. Specifically, the stock jumped after reporting financial results for the third quarter. And the company updated some long-term financial targets, which also modestly contributed to its market-beating performance in the second half of the year.

In Q3, Lowe's net sales were only 2.6% year over year. However, the company's same-store sales were up 3% and better than expected. And its sales to professional customers were up a whopping 19%. Moreover, e-commerce sales jumped 12%.

When Lowe's management updated its long-term financial outlook in December, it specifically talked of the importance of pro sales and e-commerce sales. Therefore, to see double-digit growth for both of these important pillars of its long-term strategy was very encouraging.

Now what

One thing to note for Lowe's going into 2023 is home prices. Over the past 20 years, there's been a modest correlation between the company's earnings per share (EPS) and the S&P CoreLogic Case-Shiller Home Price Index -- a measure of home prices across the U.S. -- as the chart shows.

Case-Shiller Composite 20 Home Price Index YoY Chart

Case-Shiller Composite 20 Home Price Index YoY data by YCharts

The general takeaway is that Lowe's business tends not to perform as well when home values are coming down. This could be because consumers are able to fund more pricey home-improvement projects when values are high by tapping into the equity in their homes. And this source of cash goes away when values drop.

As the chart shows, average home values in the U.S. have started to come down, a trend that could continue and impact business for Lowe's in 2023.

That said, home-improvement spending isn't going away, and I expect Lowe's to remain extremely relevant for decades to come. Moreover, Lowe's is taking advantage of what could be a modestly undervalued stock. In December, management added $15 billion to its $6.4 billion remaining share repurchase authorization. Therefore, with a market capitalization of $120 billion, management can repurchase a substantial amount.

Perhaps most encouraging is why it authorized an extra $15 billion. Lowe's management likes what is happening right now with its business from a pro customer and e-commerce perspective. Spending and margins could theoretically be hurt in the coming year or so if home values fall. But long term, the business is solid, and management believes it has more than sufficient cash flow to do what needs to be done.

In other words, $15 billion is excess capital for Lowe's after its needs are met. 

To directly answer the headline, the worst may not be over for Lowe's stock because home prices could slightly hold its business back for a time. But longer term, this is still a great buy-and-hold opportunity.