The U.S. is adjusting to the difficult circumstances in which many people cannot go to work and are essentially forced to stay indoors in an effort to contain the spread of COVID-19. There's a continuing impact on the country's economy as 3.3 million Americans filed for unemployment benefits in the week ended March 21, according to the Labor Department. And many economists expect that figure to go up in the coming weeks with restaurants, bars, and other nonessential businesses closing down or reducing their hours.

It is hard to stay optimistic, but there are still attractive investments out there. One is Dollar General (NYSE:DG), which can thrive even in a down economy. The company opened its first Dollar General store 65 years ago and has since then built a remarkable track record of consistency. For the last 30 consecutive years, it has posted an annual same-store sales (comps) increase. This obviously encompasses some challenging periods, including the Great Recession in the 2007 to 2009 period.

Clearly, Dollar General is doing business the right way to generate consistent sales growth. Here are three reasons the shares are an attractive investment right now.

A woman at a store holding a basket while looking at an item.

Image source: Getty images.

1. In tough times, it attracts customers

The Dollar General slogan, "Save time. Save money. Every day!" shows why customers flock to the stores, particularly during tough economic times. Although the company's name is a misnomer, it does offer most of its merchandise at or below $10. Those prices, on a variety of everyday items like cleaning products, towels, toilet paper, trash bags, and laundry detergent, exert an even stronger pull when people have lost their jobs or fear they are going to get laid off.

Dollar General also sells packaged foods like cereal and canned goods. Broken out, these consumable items represented 78% of fiscal 2019 sales.

These necessities are all good things to sell when the economy hits a rough patch. Turning to the last downturn to use history as a guide, in fiscal 2008 (ended Jan. 30, 2009), same-store sales grew 9.0% year over year, and the company followed up that strong performance with 9.5% growth the following year.

2. Driving traffic through the current illness

During the most recently reported quarter, comps were up 3.2%, and accompanying the top-line growth was expanding profitability as operating margin increased 47 basis points from the prior-year period to 10.07% of revenue.

Though the quarter ended well before the coronavirus caused businesses to shut down and forced people to stay at home, CEO Todd Vasos stated on the earnings call in mid-March that he didn't expect the outbreak to have a "material impact" on fiscal 2020 results.

In fact, people are still going to Dollar General stores during the pandemic to stock up on supplies. The stores are generally in small towns with populations up to 20,000, where residents aren't likely to have too many choices. This, along with its range of necessities, should pull customers into its stores.

In fact, Dollar General recently announced that its offerings were selling so well that it's hiring 50,000 additional employees to help respond to the surge in demand.

3. Growth opportunities remain

Over the last few years, Dollar General has been opening new stores, and there is room for even more. Last year, its 908 new stores (net of closures) raised the total to nearly 16,300. Management expects to open another 1,000 this year while remodeling 1,500.

CEO Jeff Owen said on the fourth-quarter earnings call, "Of note, we continue to see very consistent performance across these metrics [new store productivity, actual sales performance, average returns, cannibalization, and payback period], and with average returns of 20% to 22%, we continue to believe new store growth is the best use of our capital."

I like the company's careful and thoughtful approach to store openings. With these returns, who can argue that it hasn't been successful?

So far this year, Dollar General stock has declined about 12%, providing investors with an opportunity to pick up shares at an attractive price. The pandemic has created a lot of uncertainty, but so far, people are still shopping at Dollar General.

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.