The S&P 500 Index touched a new intraday record Friday and is on pace to finish at an all-time high for the first time in two years, marking a crucial milestone in the US stock market’s resurgence.

It’s been a dizzying stretch for equities, triggered by falling inflation and the possibility that the Federal Reserve will cut interest rates in 2024. Over the past two years investors have faced the largest ground war in Europe since World War II, the fastest inflation since the 1980s and the highest borrowing costs since the turn of the millennium — a trio of forces that pushed the American equities benchmark into a bear market in June 2022.

Yet stocks defied fears of a recession to soar in 2023 and have continued to climb, albeit at a more modest pace, in early 2024. On Friday, the S&P 500 jumped as much as 0.9% to 4,824.19, topping the previous intraday record of 4,818.62 set on Jan. 4, 2022, and putting it on on track to eclipse its prior closing high set on Jan. 3, 2022.

“It’s been a wild ride for stock investors after two years of extremes with high inflation and rising rates, but now it looks like the economy is poised for a soft landing,” said Yung-Yu Ma, chief investment officer at BMO Wealth Management. “Inflation is cooling and there’s more predictability on what the path ahead looks like for Fed policy.”

The S&P 500 is the last of the three major US indexes to reach a fresh record, joining the Nasdaq 100 Index and the Dow Jones Industrial Average after each eclipsed their records in December. After peaking nearly two years ago, the S&P 500 shed as much as a quarter of its value when it sank to a closing low of 3,577.03 on Oct. 12, 2022. Now the index has posted a double-digit annual return for the fourth time in the past five years in 2023.

Of course, stock gains from the so-called Magnificent Seven technology companies — Alphabet Inc., Inc., Apple Inc., Meta Platforms Inc., Microsoft Corp., Nvidia Corp. and Tesla Inc. — powered the index’s rise back to records. Apple, for instance, crossed back above a $3 trillion market value late last year after rallying nearly 50% in 2023.

History sides with further gains ahead. The S&P 500 went 512 trading days without a record through Thursday, which ranks as the sixth-longest streak since 1928, according to Ed Clissold, chief US strategist at Ned Davis Research. One year after hitting new highs, the index has risen 13 out of 14 times by a median of 13% in that span.

Still, money managers are debating when the Fed may pare back its hawkish policies. One key challenge for investors will be assessing the lagging impact of the hiking cycle. Traders are rapidly repricing their rate-cut expectations, with the odds only of a quarter-point reduction in the federal funds target during the first quarter falling to about 50% after it had been almost fully priced in just a few weeks ago.

Since 1957, there have been 16 major advances in the S&P 500, with the length of the rise largely dependent on whether it was preceded by a recession, according to The Leuthold Group. In the eight instances when the upswing began in an economic downturn, the index climbed 135% on average over 45 months. But when the preceding drop wasn’t associated with a recession, the subsequent ascent wasn’t as powerful, with the S&P 500 rising about 75% on average and the rebound lasting slightly less than three years.

While consumer spending is robust, there are signs that growth in the crucial holiday quarter is ebbing — but still strong. The Atlanta Fed’s GDPNow model sees fourth-quarter real GDP growth slowing to a 2.4% annual rate, from a 4.9% pace in the three months through September.

For now, equities optimists are in the driver’s seat. As they see it, Big Tech will fuel a fresh wave of profit growth, inflation is easing at long last and the economy still looks resilient. Stock prognosticators on Wall Street have history on their side if the Fed’s tightening campaign is drawing to a close since rate pauses historically usher in double-digit returns for shares.

“The US economy is still growing at a good, sustainable rate,” said Thomas Martin, senior portfolio manager at Globalt Investments. “Those longer-duration stocks will likely continue to have consistent growth that’s higher than the rest, and they won’t be dependent on a booming economic cycle.”

This article was provided by Bloomberg News.