When it comes to stock investing, you shouldn't switch strategies and holdings every time there's a trend, whether it's a bear or bull market. However, knowing which stocks tend to flourish during certain economic periods can help you prioritize where your current investments may go.

Consumer goods vary from something as small as a piece of candy to something as expensive as a new car, so the companies that make and sell these items aren't created equal. Here are three of the safest consumer goods stocks you can depend on when the market is in a downturn.

1. Coca-Cola

There's arguably not a more recognizable product around the world than Coca-Cola's (KO) iconic flagship soda. It's made the company a certified blue chip stock and made many investors happy (and rich) along the way. Coca-Cola's stock hasn't done much in the past 12 months, but it's remained steady, up around 1%.

Despite a slowdown in consumer spending, Coca-Cola's first quarter 2023 sales volume increased 3% year over year, and its revenue increased 5% year over year to $11 billion. While that's impressive, I think it's important to focus on Coca-Cola's net profit margin, which has steadily increased over the years. 

KO Profit Margin (Annual) Chart

DATA BY YCharts

The fact that Coca-Cola managed to maintain high margins despite the macroeconomic environment of the past 1.5 years or so is a testament to its pricing power. Having pricing power allows Coca-Cola to keep profits flowing, even if overall revenue falls. Couple that with its global distribution network, and it's a recipe for long-term stability.

Coca-Cola's quarterly dividend is $0.46, and its 12-month trailing yield (its average yield over the past 12 months) is just over 2.9%. Maybe more important is its history of dividend growth -- 61 consecutive years, making it a Dividend King. You can trust this will continue to be the case, bear market or not. 

2. Procter & Gamble

Procter & Gamble (PG -0.78%) (P&G) may not be a household name, but the brands it owns surely are. P&G is a conglomerate that owns brands like Tide, Pampers, Bounty, Tampax, Old Spice, and many more. You probably couldn't walk into any major retailer and not see a P&G product, and that's not an exaggeration.

P&G's stock has outpaced the S&P 500 over the past five years, although that's not usually why investors flock to the stock. It's because of its stability and dividend.

When recessions, bear markets, and overall down periods happen, consumers typically cut back on things like eating out, upgrading to the newest phone, buying a car, and enjoying various forms of entertainment. Things that won't get cut out of the budget are baby care, feminine care, personal healthcare, home care, and the like. Luckily for P&G, those are the markets it dominates.

P&G has a $0.94 quarterly dividend with a 12-month trailing yield of around 2.5%. It's also a Dividend King, increasing its yearly dividend for 67 consecutive years (it's paid one for 133 total years). Its sales growth is predicted to be lackluster over the next year or so, which could keep its stock price stagnant, but its dividend should keep investors satisfied in the meantime. 

3. Walmart

No public company in the world brings in more revenue than Walmart (WMT -0.08%). With its more than 10,500 stores and emerging e-commerce business, Walmart is the value retailer. Its stock is up over 25% over the past 12 months, bringing some relief from the bumpy roads many stocks have been on over the past 1.5 years.

With high inflation and looming recession talks dominating economic conversations since the beginning of 2022, Walmart was able to lean on its value pricing and positioning to take advantage. In its fiscal year 2023, it made $611.3 billion in revenue, up 6.7% year over year, and its Q1 2024 revenue increased by 7.6% year over year to $152.3 billion. 

Walmart's value positioning is a huge competitive advantage because value will never go out of style, no matter the economic conditions. People are always looking to save money, and Walmart is their one-stop shop.

More importantly, Walmart has become a consumer staples company, meaning it sells products that people will buy regardless of the economic environment. Its grocery segment is a huge part of this, accounting for more than half of its sales and consistently growing market share. Walmart's CEO noted that higher-income earners and younger shoppers are starting to rely on the retailer for their groceries.

Walmart increased its dividend for the 50th consecutive year in 2023, finally receiving the heralded title of Dividend King. Considering the company's balance sheet, the dividend is all but certain to continue growing through the years.