What happened

Walmart (WMT -1.75%) stock outperformed a weak market last month by gaining 6% compared to a 12.5% drop in the S&P 500, according to data provided by S&P Global Market Intelligence.

The increase left the retailer's shareholders roughly even so far in 2020 even as broader indexes are down more than 20%.

A supermarket employee restocks fresh produce.

Image source: Getty Images.

So what

Investors reacted to positive sales developments for consumer businesses engaged in selling essential supplies. Walmart joined peers like Kroger and Costco in seeing demand soar as shoppers dramatically shifted spending priorities toward food, pantry items, and other household necessities. COVID-19 triggered more home confinement time for hundreds of millions of people in North America, and the country's biggest retailer was well positioned to meet those spiking demand needs.

Now what

Walmart is scheduled to report fiscal first-quarter results on May 19, and that announcement will likely reveal some head-turning sales volumes. In the meantime, the company is focused on keeping its stores operating even as coronavirus cases surge through much of the country. While no business would be immune from a recession if the world economy goes down that path, the retailer's consumer staples focus should make it less sensitive to any downturn.