The stock market has been on one of its longest bull runs in recent history, lasting nearly a full decade. But eventually the economy will turn south, and stocks will follow, which can be a time of unease for investors. 

Investors can brace for a downturn by buying shares of companies that can thrive in both bull and bear markets. Our Foolish investors think diversity helps 3M Co (MMM -1.05%) in any market, Diageo plc's (DEO -0.07%) spirit sales are almost recession-proof, and Colgate-Palmolive Company (CL 0.33%) will still be cleaning teeth in a downturn. 

A bear figurine and a bull figurine face off, sitting on top of a piece of paper with a chart on it

Image source: Getty Images.

60 years of dividend increases and counting: What else do you need?

Neha Chamaria (3M): Did you know that there are companies that haven't missed a dividend in 100 years or more? These are the kind of dividend stocks that can thrive in both bull and bear markets, simply because they are capable of growing their earnings, cash flow, and dividends even during downturns.

Just take a look at industrial conglomerate 3M's dividend history: It hasn't just paid a dividend for 100 consecutive years, but increased it for 60 straight years! That's one of the best dividend streaks you can find among publicly listed companies today, and one that wouldn't have been possible without 3M's diverse portfolio, which includes more than 60,000 products used across several industries, and powerful brands such as Post-It and Scotch.

The best part about owning a stock like 3M is that while you can expect small dividend hikes even during tough times, the rewards get bigger when the business thrives. For instance, 3M increased its dividend by 16% in fiscal 2017, backed by 12.4% growth in adjusted earnings per share and free cash flow generation of nearly $4.9 billion, or 100% of its net income.

If you are the kind of income investor who's happy with dividends that are steady and can grow year after year, or even decades, and don't care as much about yields -- 3M yields 2.3% currently -- 3M is a right fit for your portfolio.

Toasting a premier name in spirits

Rich Duprey (Diageo): Alcohol seems to do well no matter how the market goes, and among distillers, Diageo is one of the world's largest. It derives the bulk of its revenue from making Scotch whisky, which represents a quarter of its $15.9 billion in annual sales. Johnnie Walker is Diageo's premier brand, but it also owns a portfolio of other brands that hold the No. 1 or 2 position in various markets around the globe, including Buchanan's, which is the second-most popular scotch in the U.S.; Black & White, Brazil's best seller; and J&B, the top scotch in Spain.

Scotch whisky has the unique property of only being allowed to be made in Scotland, much like bourbon is a solely American spirit. While there is some consternation over the U.K. leaving the European Union next year, scotch exports shouldn't be a concern, as World Trade Organization regulations for spirits mandate no tariffs can be imposed on them. While other industries may go through a period of upheaval, Diageo's portfolio shouldn't be one of them.

In the U.S., the distiller is benefiting from the rise in the number of women drinking hard liquor, and Diageo has just launched a "Jane Walker" brand to complement its leading Johnnie Walker label. But spirits of all types are increasing in popularity, though mostly the so-called "browns" -- whiskey and bourbon -- are seeing the greatest growth.

Diageo has been a consistent dividend payer since it was created in 1997 by the merger of Guinness and Grand Metropolitan, and it has raised its payout in each of the last six years. The $3.46-per-share dividend currently yields a solid 2.6%, which, when coupled with its steady growth in revenue, suggests that Diageo is a stock investors can count on when times are good, but even more when times get tough. 

The consumer staples titan

Travis Hoium (Colgate-Palmolive): When the stock market is in bull or bear territory, do you change your toothbrushing or dishwashing habits at all? Probably not, and if you're like most consumers, you are probably loyal to one brand for those consumer staples, which makes Colgate-Palmolive almost recession-proof. 

I could talk about how consumer staples have very little fluctuation in their demand or how major brands like Colgate-Palmolive own valuable shelf space in stores, but I think the chart below tells a better story. Since Jan. 1, 1988, there have been three recessions and coinciding bear markets, one of which devastated the economy in 2008 and 2009. Can you see where those bear markets are in either the stock price or dividend paid below?

CL Chart

CL data by YCharts

It isn't that Colgate-Palmolive stock doesn't have down periods (as you can see in 2000 and in 2008/2009 the stock did fall along with the market). But it's not the kind of stock that's going to collapse if a recession interrupts the long-term bull market we've been in. 

Colgate-Palmolive won't be a high-growth stock for investors, but the dividend yield of 2.3% is rock solid and will grow steadily over time. If you're looking for income in any kind of market, this is a great stock for your portfolio. 

Prepared for any market

Being prepared for a bear market is a good idea for investors because the bull market we're in will eventually end. When it does, 3M, Diageo, and Colgate-Palmolive have the kind of businesses that will withstand the downturn.