The U.S. Treasury yield curve -- a graphical plot of interest rates at different maturities -- normally slopes upward, meaning short-term bills have lower yields than long-term bonds. That happens because investors expect greater returns in compensation for committing capital for longer time periods.

However, on rare occasions, the yield curve becomes inverted and short-term rates exceed long-term rates. Yield inversions between the three-month and 10-year Treasuries have reliably predicted the last 10 recessions, and that portion of the curve is currently inverted.

Read on the learn how that could affect the S&P 500 (^GSPC 1.02%), and check out some relevant investing advice from Warren Buffett.

Two people sit at a table, and one is viewing a chart on a computer.

Image source: Getty Images.

The Treasury yield curve says the U.S. is headed for a recession

Bond prices and yields move in opposite directions, meaning strong demand for a bond would increase the price and reduce the payout, and vice versa. In that context, an inverted yield curve is caused by soaring demand for long-term Treasuries relative to short-term Treasuries, which signals uncertainty about the near-term strength of the economy.

Think of it like this: Recession fears push investors toward long-term Treasuries because they offer risk-free returns over a period of years or even decades, which becomes increasingly compelling as economic storm clouds gather. That explains why yield curve inversions have historically been a relatively reliable harbinger of recessions.

One of the most closely watched sections of the yield curve is the spread between the three-month Treasury and the 10-year Treasury. That portion of the curve has inverted prior to all 10 recessions since 1955, with only one false positive in the mid-1960s. The precise timing of each inversion has varied, but a recession has always followed within 24 months.

3 Month Treasury Rate Chart

Data source: YCharts

So what? As shown above, the three-month yield topped the 10-year yield in October 2022, and the curve remains inverted to this day. If historical trends persist, the U.S. economy will slip into a recession within 12 months. But investors should consider this advice from Warren Buffett before making any decisions.

How Warren Buffett thinks about interest rates

High interest rates are the primary reason some investors are worried about a recession. The Federal Reserve has fought inflation with rapid rate hikes, driving the benchmark federal funds rate to its highest level since 2001. But if Fed policymakers tighten credit conditions too much, they could choke the economy into a recession.

Buffett has often discussed the relationship between interest rates and equity valuations, and he made a particularly clever analogy during a 2016 interview with CNBC:

Interest rates are like gravity in valuations. If interest rates are nothing, values can be almost infinite. If interest rates are extremely high, that's a huge gravitational pull on values.

Why? Long-term Treasury yields are sometimes used to value stocks in discounted cash flow models, a framework that attempts to determine what a company is worth by discounting future cash flows back to their present value. As Buffett told CNBC, "If interest rates are destined to be at low levels ... it makes any stream of earnings from investments worth more money."

Here's the bottom line: High interest rates (and Treasury yields) mean higher risk-free returns, which makes bonds look more attractive relative to stocks. In other words, high interest rates reduce the present value of future earnings for stocks, so investors are willing to pay less for stock and their prices tend to fall.

That dynamic is already at work in the market today. Many stocks have fallen sharply as high interest rates have weighed down equity valuations, and this pressure may intensify if rates rise more. But the exact opposite will happen when rates begin to fall (which is expected to happen sometime next year). Equity valuations will expand and the stock market could soar.

In the meantime, investors may consider moving funds to bonds, but anyone with a long time horizon (at least five years) is probably better off in stocks, especially an S&P 500 index fund. Consider this comment from Buffett (emphasis original): "As an investor's investment horizon lengthens, however, a diversified portfolio of U.S. equities becomes progressively less risky than bonds."

Recessions have historically been excellent buying opportunities

Recessions tend to be bad news for the stock market. Indeed, the S&P 500 declined an average of 31% during the last 10 recessions. For context, the index is currently 11% off its high. So if the U.S. economy does indeed slip into a recession, history suggests the S&P 500 will fall another 20%. But that is no reason to avoid the stock market. In fact, there are two good reasons not to avoid the stock market during an economic downturn.

First, recessions have historically been excellent buying opportunities. To quote Buffett, "The best chance to deploy capital is when things are down." History corroborates that claim. The S&P 500 returned an average of 48% during the two-year period immediately following the bottom of the last 10 recessions.

Second, market-timing strategies tend to fail. To quote Buffett: "I haven't the faintest idea as to whether stocks will be higher or lower a month or a year from now. What is likely, however, is that the market will move higher, perhaps substantially so, well before either sentiment or the economy turns up."

In other words, the stock market is forward-looking. It tends to rebound before economic activity reaches a bottom. So investors that sit on the sidelines during recessions are virtually guaranteed to miss the rebound, meaning their portfolios will almost certainly underperform over long periods of time.