Dollar General (DG 0.41%) investors have underperformed the S&P 500 by a wide margin in recent weeks. The retailer is generating strong sales and earnings results, even as consumer spending patterns shift. Its winning merchandising and store expansion strategy has helped boost returns in 2022, and management is projecting another strong year ahead.

But investors are worried about a softening earnings outlook, which helped push the stock price down nearly 20% from recent highs last October. Let's look at whether Wall Street is overreacting to that short-term earnings challenge.

Hits and misses

Dollar General's preliminary earnings announcement in late February revealed that Q4 sales trends were slightly worse than expected. Its full update in mid-March added context around that headline result.

Comparable-store sales (or comps) rose 5.7% in the period that ran through early February, but that growth was entirely driven by higher average spending. Dollar General posted a modest decline in customer traffic. These results don't look especially strong compared to industry leader Walmart, which posted an 8% comp boost in Q4 thanks to 2% higher traffic and 6% higher spending.

Still, Dollar General managed 11% higher sales on the year, partly thanks to a quickly expanding base of stores. "We are pleased with continued market share gains in both consumables and nonconsumables," CEO Jeff Owen said in a press release.

Warning signs

There were a few other warning signs that implied a tougher operating environment into early 2023. Inventory levels jumped to $6.8 billion from $5.6 billion a year ago. Management credited the boost to cost inflation and Dollar General's push into new categories like home furnishings. But the increase could add pressure to cut prices if merchandise doesn't sell as well as projected.

DG Operating Margin (TTM) Chart

DG Operating Margin (TTM) data by YCharts

Profitability took a small step backwards, too. Gross margin fell to 30.9% of sales from 31.2% of sales a year ago. Management was able to offset most of that pressure with cost cuts, keeping operating margin roughly steady at 9% of sales.

Looking ahead

Dollar General didn't reduce its initial 2023 outlook, which was good news, given the slowdown that impacted the business in Q4. Executives are calling for comps growth of between 3% and 3.5% on top of the 4.3% increase from the 2022 fiscal year. More than 1,000 new store openings are scheduled, allowing overall sales to rise by about 6%.

Yet, shareholders are likely to see volatility throughout the year. Dollar General warned that the first half of 2023 will show weaker profits before a rebound lifts results into the holiday period. "We are confident in our full-year plans," CFO John Garratt told investors.

That optimistic tone contrasts with the recent forecasts from a few peer retailers, which have issued wide sales outlooks for 2023 to reflect the potential for a recession to hurt consumer spending.

Investors might want to favor that more conservative approach on this stock right now. Dollar General's earnings growth seems likely to slow at least into mid-2023, and the potential for further deceleration suggests shares aren't an obvious deal even following the recent discount.