What happened

Shares of Dollar General (NYSE:DG) jumped 22.1% over the first six months of 2020, according to data from S&P Global Market Intelligence, versus a 3% loss for the S&P 500 index. 

Considering that the deep discount retailer posted a gain of 44% across all of 2019, it would seem Dollar General was simply maintaining the pace of growth it had previously set.

Dollar General cashier checking out a customer

Image source: Dollar General.

So what

That might have been the case had not the world fallen apart in the first quarter due to the global coronavirus pandemic. Businesses were ordered closed, employees were furloughed, and stay-at-home orders became the norm. Even Dollar General's stock dipped from around $165 a share down to $125, a 24% decline.

Yet it quickly became apparent that with millions of people out of work and the uncertainty of when there would be a return to normalcy, dollar stores like Dollar General were essential to consumers needing to stretch the limited amount of money they had available to them. Moreover, with the retailer expanding its assortment of consumables and fresh produce, it became an indispensable destination for consumers.  

Dollar General has actually gained over 50% from those initial dark days in March.

Now what

While Dollar General goes from strength to strength, the pandemic is masking the weaknesses of others. Struggling rival Dollar Tree (NASDAQ:DLTR), for example, gained 55% since its March lows, but its year-to-date performance is essentially breakeven.

Dollar General has logged 30 consecutive years of comparable-store sales growth, and its first-quarter performance shows that that trajectory is intact, as comps grew 22% compared to a year ago. They were up another 22% over the first few weeks of the second quarter, indicating this retailer is a go-to business in good times and bad.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.