The stock market has come roaring back from the crash that occurred when the novel coronavirus first hit.

As of June 4, the S&P 500 was off just 8% from its all-time high back in February, while the tech-heavy Nasdaq was down just 1.4% from its record peak.

While the market may have recouped most of its losses from the coronavirus sell-off, that doesn't mean that opportunities are gone. The pandemic is still going to influence consumer behavior and the greater economy for the foreseeable future. With that in mind, keep reading to see why Dollar General (NYSE:DG)ANGI Homeservices (NASDAQ:ANGI), and (NASDAQ:JD) could all benefit in the coming months.

A man in suit pressing his finger on a digital stock chart.

Image source: Getty Images.

Dollar General: A recession rock star

Few companies seem better positioned for the COVID-19 pandemic and the concomitant recession than Dollar General, the nation's biggest chain of discount stores. 

Even before the crisis, the company was looking strong. It rapidly expanded across rural America while posting solid comparable sales and earnings growth. It occupies a unique niche in retail that is protected from e-commerce. Dollar General has more locations than any single retail banner.

As a discount-focused retailer of essentials like food, cleaning supplies, and paper products, Dollar General has thrived in the current moment. Same-store sales jumped 21.7% in its first quarter, driving overall revenue up 27.6% to $8.44 billion and earnings per share up 73% to $2.56. While the momentum from the lockdown is likely to fade, Dollar General said that comparable sales continued apace through May 26, the first month of the second quarter. It withdrew its guidance for the year, however, due to uncertainty around the pandemic. 

Two trends should support Dollar General over the coming months. First, the company's focus on savings and small pack sizes attracts consumers who are trading down during a recession, meaning that it should get a tailwind from the troubled economy. An unemployment rate in the teens could be a substantial boost to its business. Dollar General's same-store sales jumped 9% in 2008 and 9.5% in 2009, showing its ability to outperform in a recession. 

Second, the retailer is opening about 1,000 new stores a year. The fallout in brick-and-mortar retail should open up more opportunities for the company to expand. It should also lower average rents, enabling rapid growth. 

ANGI Homeservices: Home improvement comes into focus

Though much of the retail sector has suffered during the crisis, home improvement has been a surprising winner. Sales in the category were essentially flat year-over-year, according to the Census Bureau,  even as retail sales in a number of other categories plunged. Meanwhile, Home Depot and Lowe's reported strong comparable sales growth in the first quarter, showing that demand for home improvement products was up despite the crisis.

Shares of ANGI Homeservices initially plunged during the broader market sell-off, but the stock has rebounded rapidly and is now up 36% year to date. There could be more gains ahead for the online home improvement marketplace, which owns HomeAdvisor, Angie's List, and Handy.

Lockdown orders, social distancing protocols, and lack of discretionary income spending on travel could all be tailwinds for ANGI. Americans are spending more time in their houses and are therefore paying attention to home-improvement needs. 

ANGI's marketplace has historically lacked supply. The company didn't have enough service providers to meet homeowner demand. With the pandemic drying up the usual channels for contractors and other such service providers to get projects, those small businesses have flocked to ANGI's platform to find customers, helping to correct the imbalance.

Though the company's sales were essentially flat in March and April, CEO Brandon Ridenour said it was beginning to see a "V-shaped recovery" in demand as the economy reopens. That momentum could pick up in June, as all 50 states are now reopening in some way and the housing market is seeing a strong recovery.

Shares are still about 50% from their all-time high in 2018, so the stock could have room to run if the catalysts above play out in its favor. Strong e-commerce growth from abroad

There are a number of challenges facing the U.S. economy at the moment. The unemployment rate is as high as it has been since the Great Depression. The country is still seeing 20,000 new COVID-19 cases daily, jeopardizing plans to reopen. It's also experiencing a wave of protests, rioting, and looting unlike anything in the last 50 years. It's a volatile moment for the country, so investors may be wise to diversify with some international stocks, China's leading direct online retailer, looks like one good candidate. China is much further along in its recovery from the coronavirus than the U.S. JD delivered a strong performance in the first quarter, capitalizing on what looks like a sustainable boom in online sales during the crisis. Revenue rose 20.6% to $20.7 billion. The company posted strong growth in areas like groceries. General merchandise sales rose 38% in the period, diversifying away from big-ticket items like electronics and appliances.  The online retailer also saw impressive momentum in JD Health, where sales were up 65%. Management said the company is now China's largest supermarket business and China's biggest pharmacy -- signs of its prowess in the world's No. 2 economy.  

China was already moving rapidly toward e-commerce before the pandemic, as online retail comprises a greater percentage of retail sales there than in the U.S. The crisis should only accelerate that shift. Meanwhile, JD has a number of competitive advantages that should help it capitalize on that transition. The company has a vast network of warehouses, allowing it to provide its own logistics and delivery and to serve other shippers. In the first quarter, sales in logistics rose more than 50%. JD has also made significant investments in automation. The company operates a warehouse in Shanghai with just four people, for example. Such innovation lowers costs and acts as a barrier to entry for competitors, strengthening its advantage in logistics.

Finally, the company also counts Tencent, Alphabet, and Walmart as investors and has a strategic partnership with Walmart.

Though JD shares recently reached an all-time high, the stock still looks like a relative bargain as it trades a forward P/E ratio of less than 30. Considering the long-term growth opportunity ahead, that looks like a steal.

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.