What happened

Shares of Dollar General Corporation (NYSE:DG), a discount retailer offering food, health products, and cleaning supplies, among other consumer goods, jumped over 10% Thursday morning after the company released better-than-expected second-quarter results.

So what

Net sales increased 8.4% over the prior year to $7 billion, just ahead of analysts' estimates calling for $6.9 billion. The strong top-line growth was driven partially by a solid 4% increase in same-store sales, which was better than analysts' estimates of 2.5%. The better-than-expected top-line figure trickled down to a stronger bottom-line result: Adjusted earnings per share were $1.74, well ahead of the $1.57 per share analysts had expected.

Aisle of a consumer goods retailer

Image source: Getty Images.

"We are pleased with our second-quarter results, driven by strong performance on both the top and bottom lines," said Todd Vasos, Dollar General's chief executive officer, in a press release. "Our results this quarter were fueled by solid execution across many fronts, including category management, merchandise innovation, store operations, and continued progress with our strategic initiatives."

Now what

The strong second-quarter result gives investors confidence that management is making the correct decisions in terms of cost control and merchandise strategy. Dollar General also raised its fiscal 2019 guidance to reflect the strong second quarter: It now expects 8% sales growth, up from its 7% guidance, and 3% same-store sales growth, up from its 2.5% guidance. Dollar General is up a staggering 42% year to date, but part of that run-up could be caused by the fact that the company tends to perform well during recessions, and fears of a recession in the near term have increased recently. Whether those fears are realized or not, investors should keep a long-term investing strategy.