These are the industries you want to buy when the bond market is flashing a recession signal

  • Last week, the U.S. yield curve inverted for the first time since 2006. That move is historically a signal of recession ahead.
  • The last seven times the yield curve inverted for 3-month and 10-year bonds, excluding a 2 week inversion in 1998, the US economy went into recession every single time within 15 months, according to data from Credit Suisse.
  • Certain sectors outperform in this environment. Three months after the inversion, insurance and industrial stocks tend to do the best, while defensive stocks tend to outperform 12 months after.
Traders work on the floor of the New York Stock Exchange (NYSE) in New York City.
Spencer Platt | Getty Images
Traders work on the floor of the New York Stock Exchange (NYSE) in New York City.

The bond market is flashing a recession warning. But certain stock sectors may still hold up.

On Friday, the U.S. yield curve "inverted" — meaning the yield on the 3-month Treasury rose above the yield on the 10-year note. Historically, this means a recession is on the horizon.

The last seven times the yield curve inverted, excluding a 2-week inversion in 1998, the U.S. economy went into recession every single time within 15 months, according to data from Credit Suisse.

"Historically investors have often tried to come up with reasons for why things are different this time around and have often been proven wrong," Credit Suisse research analyst Andrew Garthwaite said in a note to clients Tuesday.

Stocks may still have a bit more room to run until they take a hit. Six months after the yield curve inverts is typically when stocks peak, Garthwaite said. During the three months after an inversion, the S&P 500 rose by an average 4 percent, and was up 75 percent of the time. But on a longer time horizon — 18 months out — the S&P was down an average 8 percent, and up only 38 percent of the time.

Still, certain sectors do better than others in that environment. In the first three months after the inversion, insurance and industrial stocks show the strongest median out-performance. Semiconductors and consumer durables are historically the biggest laggards.

One year after the yield curve inverts, though, there's a more definite split. Defensive stocks like healthcare equipment, pharmaceuticals and insurance historically outperform in the 12 months after the yield curve inverts. A defensive stock is something that has constant demand for products and isn't typically correlated to the rest of the business cycle. They tend to kick back a consistent dividend and relatively stable earnings regardless of stock market conditions.

More "cyclical" stocks, which do rely on market conditions, tend to underperform, according to Credit Suisse. Autos and technology hardware are among the laggards 12 months after the yield curve inverts.