Shares of home-improvement retail chain Lowe's (LOW -0.04%) are trading near 52-week highs as of this writing. And considering that the company's earnings per share (EPS) are also at all-time highs, it seems appropriate that its stock would be up like it is.

However, it's fair to wonder if this will continue in 2024. On Feb. 27, Lowe's reported financial results for 2023 and gave its financial outlook for 2024. The company expects its sales to drop between 2% and 3% year over year in the coming year. And management expects full-year EPS of $12 to $12.30, which would represent a 7% to 9% drop.

In light of Lowe's guidance for 2024, here's what investors need to know and how they should respond.

The year ahead for Lowe's

For home-improvement companies such as Lowe's, sales often correlate with home values. To measure changes in home values, investors can look at the Case-Shiller Home Price Index. You don't necessarily need to understand anything more than the basics here: Up means higher home prices; down means lower home prices.

The chart below shows quarterly sales growth for Lowe's compared to the Case-Shiller index. Over the last 20 years, it's often been true that sharp upturns or downturns with the index correlate to sales growth or declines for Lowe's.

Case-Shiller Composite 20 Home Price Index YoY Chart

Case-Shiller Composite 20 Home Price Index YoY; data by YCharts. YoY = year over year.

It's not perfect. But there's a connection between Lowe's and the housing market.

CEO Marvin Ellison started the earnings call for the fourth quarter of 2023 by saying, "[Do-it-yourself] customers continue to remain cautious with their home improvement spend."

Ellison didn't leave room for doubt for why DIY customers are cautious: "Existing-home sales are at levels we've not seen in almost 30 years, and even as mortgage rates decline, two-thirds of homeowners remain locked in at rates below 4%, which may keep many on the sidelines. Due to these factors, we expect DIY demand to remain under pressure."

Looking at Lowe's competitors confirms a problem with the entire sector. Home Depot expects its same-store sales to drop by 1% in 2024. Flooring specialist Floor & Decor expects a more pronounced decline in same-store sales of 2% to almost 6%.

Lowe's stock was up about 14% in 2023 (when reinvesting dividends), but this underperformed the S&P 500. With the company expecting its sales and profits to drop in 2024, I wouldn't be surprised to see it underperform again in the coming year. Shares could head sideways for a while.

LOW Total Return Level Chart

LOW total return level data by YCharts.

Thinking bigger picture

Many financial advisors recommend budgeting between 1% and 2% of a home's value annually on repairs and maintenance. There might be years where not as much needs to be done and homeowners won't spend this much. But repairs and maintenance are part of homeownership. And renovations are frequent as well.

This is the case for resilience and longevity for home-improvement spending. Lowe's might be looking at slumping sales in 2024. But the business isn't being disrupted or being left in the past. Lowe's and others will enjoy consumer demand for decades to come.

When looking for a stock to buy and hold, the resilience of the home-improvement category is a good reason to not move on from Lowe's stock too hastily.

Turning to the valuation for the stock, it trades at a price-to-earnings (P/E) ratio of about 18. The chart below shows that this is a meaningful discount to its 10-year average valuation.

LOW PE Ratio Chart

LOW PE ratio data by YCharts.

Due to its 2024 forecast, Lowe's stock isn't my strongest candidate to beat the market in the coming year. That said, its cheaper valuation already reflects its lackluster guidance. And the cheaper valuation mitigates further downside risk.

Given that the business should continue to enjoy long-term consumer demand, Lowe's stock isn't one to abandon today -- shareholders should feel good about continuing to hold for the long term.

There will be periods when the housing market is sluggish. But it's an indispensable part of the economy, and Lowe's is a player that should profit from it for years, if not decades, to come.