The stock market had to deal with a serious case of the jitters on Monday, as investors were in a pessimistic mood about the global status of the COVID-19 pandemic and its potential impact on a full economic recovery. Losses for the Dow Jones Industrial Average (^DJI -0.11%), S&P 500 (^GSPC 0.02%), and Nasdaq Composite (^IXIC 0.10%) amounted to between 1% and 2%.

Index

Percentage Change

Point Change

Dow

(2.09%)

(726)

S&P 500

(1.59%)

(69)

Nasdaq Composite

(1.06%)

(152)

Data source: Yahoo! Finance.

Even though the Dow saw the biggest losses of the three major stock market benchmarks, there was quite a bit of variation in the way that the 30 constituents of the average performed. Although industrial and financial giants took huge losses, there were a couple of stocks that escaped almost entirely unscathed. Below, we'll look at why Procter & Gamble (PG 0.68%) and Walmart (WMT 1.32%) held up so well and what that says about their prospects.

Person looking at tablet in frustration.

Some investors weren't happy with the market's big drop, but not every stock fell sharply. Image source: Getty Images.

Investors hedge their bets with P&G

Shares of Procter & Gamble were down 0.05% on the day, and a slight rise in after-hours trading was enough to put it into the green. Investors have long seen the consumer products giant as a defensive play, and they're also hoping that if fears of a resurgence in COVID-19 cases come to pass, P&G could see the same boost to its business it saw early on in the pandemic.

P&G stock posted big gains between March and October 2020, as sales of its products shot higher. Lockdown restrictions kept more people at home, and that in turn made consumers stock up on home goods.

Yet since October, P&G's shares haven't made big moves. Investors have been nervous about a reversion to more normal trends in a recovery, and that has weighed on growth projections.

Interestingly, Procter & Gamble didn't really work as a defensive play during the first phase of the pandemic, as it fell almost as sharply as the broader market in the coronavirus bear market. Nevertheless, investors are attracted to its resilient business and its 2.5% dividend yield, and that's a big part of why it held up so well Monday.

Counting on Walmart

Meanwhile, shares of Walmart ended the day with a quarter-percent move lower. Like P&G, Walmart has exhibited defensive characteristics before, but it's also been able to take advantage of growth opportunities as well.

Walmart got its reputation during the financial crisis. 2008 was a terrible year for the market, as the S&P 500 fell 37%. But Walmart managed to post gains for the year, as consumers shifted their spending to the lower-cost alternatives that the big-box retailer provides. The same largely held true during the coronavirus bear market, with Walmart stock seeing only a minor blip lower.

Walmart benefits from steady consumer demand, but it's also been growing as a result of its e-commerce strategy. The retailer has built up its online channel to defend itself against internet retail, and the move came just in time for shoppers to use during the pandemic.

Shareholders in Walmart have in some ways seen the best of both worlds, with some protective characteristics combined with solid share-price gains over the past several years. That makes Walmart a natural pick both for those worrying about a broader pullback and those hoping for continued growth.