Worried About a Market Crash? These 3 Stocks Beat the S&P 500 in 2008 and 2022

Source The Motley Fool

Key Points

  • The stocks on this list have strong underlying businesses that can do well, even during downturns.

  • Walmart, McDonald's, and Gilead Sciences outperformed the market during the last two significant crashes.

  • 10 stocks we like better than Walmart ›

The stock market may be on borrowed time these days. It's been doing well, perhaps too well, given the state of the economy. Many people are struggling due to inflation and cutting back on expenses. Although the S&P 500 reaching record levels this year may indicate otherwise, there are plenty of reasons investors may want to think twice about simply buying into the rally these days.

Getting out of the market, however, isn't necessarily the best option for risk-averse investors. There are stocks that may be safe investment options, even if the market does end up crashing in the near future. Three stocks that did well during the last two big crashes in 2008 and 2022 include Walmart (NASDAQ:WMT), McDonald's (NYSE:MCD), and Gilead Sciences (NASDAQ:GILD). Here's how well they did back then, and why they might be safe-haven investments to hang on to right now.

Missed Nvidia in 2009? This Rare Signal Is Flashing Again. In 2009, a "Double Down" signal flashed for a little-known chipmaker called Nvidia. For the first time in years, that same "Total Conviction" signal is flashing for a company 1/100th the size of Nvidia. Continue »

Person looking at stock charts with a child.

Image source: Getty Images.

Walmart

Walmart is the go-to retailer for many consumers. Whether it's loading up on day-to-day essentials such as groceries or making large discretionary purchases, it has just about everything consumers need. Thus, it's normally going to benefit from a great deal of consistent foot traffic and demand.

In 2022, when the S&P 500 declined by more than 19%, Walmart generated total returns (including dividends) that were only slightly negative, but fairly close to 0%. Not a great return, but also not horrific, either. And in 2008, in the midst of the Great Recession, its total returns were up around 20%. That's incredibly impressive given that the S&P 500 declined by 38% that year.

Walmart makes for a solid long-term investment to hang on to. While it is a bit expensive these days, trading at more than 40 times earnings, it can provide long-term stability for investors.

McDonald's

McDonald's has been another resilient stock to own amid turmoil. The value it offers consumers makes its fast food restaurants appealing to people who want to dine out without breaking the bank. At the same time, it's been able to raise prices amid inflation while still providing value for consumers and not drastically hurting demand.

During the most recent crash, in 2022, McDonald's stock was up nearly 1% when including its dividend. It performed slightly better than Walmart. In 2008, its total returns were up over 8%, underperforming the big-box retailer but still faring better than the overall market.

McDonald's trades at a reasonable 22 times its trailing earnings right now, and although it's down 11% this year, like Walmart, it can also be a solid buy for long-term stability. At 2.8%, it also offers a great dividend, which is close to three times the S&P 500 average of just 1%.

Gilead Sciences

Healthcare stock Gilead Sciences is another investment that's been rock-solid during times of adversity. The company provides treatments for serious, life-threatening conditions, such as HIV and hepatitis B and C. That means its products can be necessities for certain people.

In 2022, Gilead's stock rose an impressive 24% (when including dividends), as it was the best performer on this list back then. Excitement around Sunlenca, a promising HIV treatment, gave the stock a boost in the latter part of the year, as the drug would obtain approval from regulators in December 2022 as a treatment for people with multidrug-resistant HIV. Back in 2008, the stock delivered total returns of more than 11%, beating the market that year as well.

The nature of Gilead's business makes it an appealing one to invest in, given the ongoing need for its medicines. Today, the stock trades at 15 times its estimated earnings (based on analyst projections) as it continues to be a good value buy. It also offers a decent dividend that yields 2.3%. It's another example of the type of stock that may do well, even if the overall market struggles.

Should you buy stock in Walmart right now?

Before you buy stock in Walmart, consider this:

The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Walmart wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $419,408!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,348,694!*

Now, it’s worth noting Stock Advisor’s total average return is 966% — a market-crushing outperformance compared to 213% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.

See the 10 stocks »

*Stock Advisor returns as of August 19, 2026.

David Jagielski, CPA has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Gilead Sciences and Walmart. The Motley Fool recommends the following options: long January 2028 $320 calls on McDonald's and short January 2028 $340 calls on McDonald's. The Motley Fool has a disclosure policy.

Disclaimer: For information purposes only. Past performance is not indicative of future results.
placeholder
Gold Price Forecast: Will Gold Rise or Fall in the Short Term as Fed July Minutes Approach? As of the Asian session on August 19, gold prices (XAUUSD) maintained a weak rebound intraday, rising about 0.2% on the day to trade near $4,340. Earlier on Tuesday, gold prices fell near
Author  TradingKey
8 hours ago
As of the Asian session on August 19, gold prices (XAUUSD) maintained a weak rebound intraday, rising about 0.2% on the day to trade near $4,340. Earlier on Tuesday, gold prices fell near
placeholder
WTI rises to near $85.00 amid escalating US-Iran tensionsWest Texas Intermediate (WTI) oil price extends its gains for the fourth consecutive day, trading around $84.80 per barrel during the Asian hours on Wednesday.
Author  FXStreet
15 hours ago
West Texas Intermediate (WTI) oil price extends its gains for the fourth consecutive day, trading around $84.80 per barrel during the Asian hours on Wednesday.
placeholder
WTI consolidates below $84.50, two-week top as bullish bias remains amid Hormuz standoffWest Texas Intermediate (WTI) – the benchmark US Crude Oil price – extends its consolidative price move through the first half of the European session and currently trades near the $84.25-$84.30 area, close to a two-week high set earlier this Tuesday.
Author  FXStreet
Yesterday 10: 12
West Texas Intermediate (WTI) – the benchmark US Crude Oil price – extends its consolidative price move through the first half of the European session and currently trades near the $84.25-$84.30 area, close to a two-week high set earlier this Tuesday.
placeholder
Australian Dollar gains as US Dollar struggles amid fading Fed rate hike betsAUD/USD extends its gains for the third successive day, trading around 0.7110 during the Asian hours on Tuesday. The currency pair continues to appreciate as the US Dollar (USD) remains subdued amid fading expectations for further rate hikes by the Federal Reserve (Fed).
Author  FXStreet
Yesterday 01: 23
AUD/USD extends its gains for the third successive day, trading around 0.7110 during the Asian hours on Tuesday. The currency pair continues to appreciate as the US Dollar (USD) remains subdued amid fading expectations for further rate hikes by the Federal Reserve (Fed).
placeholder
Gold Price Forecast: Gold May Break $4,500 as Fed Rate-Hike Expectations Continue to CoolAs of the European session on August 17, gold prices (XAUUSD) were trading above $4,400, up about 0.7% on the day and reaching an intraday high of $4,416.43, extending last Friday's gains
Author  TradingKey
Aug 17, Mon
As of the European session on August 17, gold prices (XAUUSD) were trading above $4,400, up about 0.7% on the day and reaching an intraday high of $4,416.43, extending last Friday's gains
goTop
quote