The S&P 500 (^GSPC 0.13%) had a remarkably good year in 2023. The benchmark index advanced 24% as a host of factors helped improve stock market sentiment, including a surprisingly resilient economy.

After that performance, investors might have forgotten than many pundits had forecast a recession starting last year. That never materialized, but the risk has not disappeared. In fact, a forecasting tool based on the Treasury yield curve -- which has a near-perfect track record in predicting recessions for more than 70 years -- currently shows its most severe reading since 1981.

Here's what investors should know.

A glowing blue-green stock price chart trending sharply lower.

Image source: Getty Images.

The Treasury yield curve has reliably predicted past recessions

Treasury bonds are debt securities that pay interest based on maturity dates. Long-term bonds normally pay more that short-terms bonds because investors expect higher returns when they commit capital for extended periods. As a result, the Treasury yield curve -- a line plotting interest rates across all Treasuries (i.e., 1 month to 30 years) -- moves up and to the right under normal circumstances.

However, the Treasury yield curve becomes inverted when short-term bonds pay more than long-term bonds. That can happen when economic concerns cause investors to seek safety in long-term bonds (driving the yield lower) and avoid or sell short-term bonds (pushing the yield higher).

Inversions can happen at any point along the curve, but an inversion between the 10-year Treasury and 3-month Treasury has been a particularly reliable leading indicator of recessions. To quote the Federal Reserve Bank of New York, "The yield curve has predicted essentially every U.S. recession since 1950 with only one 'false' signal, which preceded the credit crunch and slowdown in production in 1967."

With that in mind, a popular Federal Reserve forecasting tool uses the Treasury yield curve to estimate the probability of a recession 12 months in the future. That tool currently puts the odds of a recession at nearly 63%, as shown in the chart below. Gray areas represent recessions.

US Recession Probability Chart

US Recession Probability data by YCharts. Note: Past recessions are colored gray. 

While 63% might not sound too bad, it is the most severe reading since August 1981. And since 1960, the U.S. economy has always suffered a recession within 12 months of a reading exceeding 50%. The only exception (so far) is the present time period.

Here's the bottom line: The probability curve indicates a good chance of a recession at some point in 2024. To quote the Federal Reserve Bank of St. Louis, the current probability would be "unprecedentedly high for a false positive."

The S&P 500 usually declines sharply during a recession

Before discussing how the S&P 500 performed during past recessions, I want to make one thing clear: Every forecasting tool is fallible no matter how good its track record. The current yield-curve inversion might be a false positive. Investors should view the Federal Reserve's recession forecasting tool as an estimate.

With that in mind, the U.S. economy has suffered 10 recessions since the S&P 500 was created in 1957. The chart below details the index's peak decline during those economic downturns.

Recession Start Date

S&P 500 Peak Decline

August 1957

(21%)

April 1960

(14%)

December 1969

(36%)

November 1973

(48%)

January 1980

(17%)

July 1981

(27%)

July 1990

(20%)

March 2001

(37%)

December 2007

(57%)

February 2020

(34%)

Average

(31%)

Data source: Truist Advisory Services.

As shown above, the S&P 500 declined by an average of 31% during the last 10 recessions. To put that in context, the index is currently within a percentage point of its all-time high, so the implied downside would be about 30% if a recession does occur in 2024. Individual stocks within the index would drop and rise by varying amounts.

However, patient investors have nothing to fear. The S&P 500 has recovered from every past recession, and the rebound has usually been swift. In fact, the index returned an average of 40% during the 12-month period following its bottom during the last 10 recessions.

The most prudent strategy is to stay invested

Investors might be tempted to sell now and buy back in once the S&P 500 hits bottom, but there are two problems with that strategy. First, the recession forecasting tool could be incorrect. The U.S. economy might not slip into a recession, and the stock market could continue to move higher.

Second, if the U.S. economy does slip into a recession, it would still be impossible to know when the S&P 500 reached bottom. The average decline during the last 10 recessions was 31%, but that average includes declines ranging from 14% to 57%. Making guesses about the next recession would be gambling, not investing. Strategies that depend on market timing tend to fail.

Instead, the most prudent course of action is to stay invested through any downturn. The S&P 500 has increased 2,630% since January 1990, compounding at 10.2% annually, despite losing a substantial amount of value during the dot-com crash and the financial crisis of 2008.

That means any investors who had $100,000 in an S&P 500 index fund in January 1990 would have $2.7 million today, provided they stayed invested the whole time.

Likewise, any investors who added $195 per week to an S&P 500 index fund since January 1990 would also have about $2.7 million today, provided they ignored the ups and downs along the way.