Covid-19 may have knocked U.S. stocks into a bear market and pummeled the U.S. economy, but the disease has also left some companies asking the question: “What recession?”

Streaming media services, video game makers and consumer staples companies have all gained ground as people stay home, try to stay entertained and focus on essentials. Netflix, already the top streaming entertainment service, has benefited from a mostly captive audience and its shares are up about 30% in 2020.

Amazon.com has seen consumers flock to its site for their purchases. The retail giant has been furiously hiring workers to meet demand, bucking the national trend of mass layoffs. Its shares are up more than 27% for the year.

“The outperformance of those names has been nothing but extraordinary,” said Julian Emanuel, chief equity and derivatives strategist at BTIG. “We have no doubt they will gain in importance as mainstays of life.”

The gains are in stark contrast to the more than 13% drop in the broad S&P 500 index this year and some of the hardest hit industries. Airlines have been pummeled, with American Airlines Group falling more than 64%. Cruise line operator Carnival lost more than 78% and retailer Kohl’s is down about 70%.

Grocery chains and certain consumer product makers, including Clorox, have also held up well as consumers shop for food, toiletry and cleaning essentials during the pandemic.

Investors have been mostly hunkering down as they absorb updates about the virus and its economic impact. Analysts are urging investors to stay calm and look more closely at how a company is positioned financially and whether its business model is solid.

“What you want to know is that the company can survive intact,” said David Kelly, chief global strategist at JPMorgan Funds. “You need to know that the company can weather the storm.”

Walmart, the nation’s largest retailer, is benefiting from its reach and distribution network as shoppers focus on food and other essentials. Investors have also given steady support to Kroger and other large grocery chains, as food shopping remains essential during the business shutdowns. Walmart shares have risen about 16% in April.

The pandemic is also shining a spotlight on normally low-key investments in household consumer product companies. Clorox, whose name is synonymous with bleach, is seeing demand surge for its household cleaning and sanitizing products.

Investors are also focused on a handful of drug developers that quickly moved to begin developing treatments for Covid-19. Both Regeneron and Gilead Sciences have seen their stocks jump over the last several months as investors cheer encouraging updates on their progress.