Wall Street is gearing up for rate cuts.

Twenty months after the Federal Reserve began a historic campaign against inflation, investors now believe there is a much greater chance that the central bank will cut rates in just four months than raise them again in the foreseeable future.

Interest-rate futures indicated Monday a 52% chance the Fed will lower rates by at least a quarter-of-a-percentage point by its May 2024 policy meeting, up from 29% at the end of October, according to CME Group data. The same data pointed to four cuts by the end of the year.

Investors, battered by the Fed’s efforts to slow the economy, have reacted by driving the S&P 500 up nearly 9% this month. That is despite the wagers reflecting different possible paths for the economy, not all of them favorable for stocks.

One place where rate-cut bets are showing up is in the bond market, where yields on longer-term bonds have retreated further below those on short-term ones. Treasury yields largely reflect expectations for what short-term rates set by the Fed will average over the life of a bond. As a result, such a move is typically viewed as a warning of a looming recession, with investors betting the Fed will need to slash rates to stimulate growth.

This month’s rally in stocks signals many investors anticipate a more benign outcome. Their hope: inflation falls back to the Fed’s 2% target, growth remains steady, but the Fed cuts rates a modest amount anyway as insurance against an unnecessary slowdown.

Still, there is evidence that traders are betting on both economic scenarios. Investors celebrated this month’s round of inflation reports, which showed a broad deceleration in price increases. But there has also been a string of more worrisome data, including weaker-than-expected surveys of purchasing managers and an uptick in the unemployment rate.

“You’re really talking about a distribution of outcomes that range between the Fed doing nothing next year to the Fed cutting aggressively next year,” said Rob Waldner, fixed income chief strategist at Invesco.

Waldner is among those who believe the threat of a recession has increased. But he said his base case is still that the Fed delivers insurance cuts without a downturn.

Investors caution that it is still possible that the Fed doesn’t cut rates in 2024, potentially pushing bond yields higher again. The U.S. economy over the past couple of years has proved resilient, and the Fed has repeatedly raised rates higher than investors were expecting.

Even if inflation continues to moderate, the Fed is less likely to cut the better the economy performs, said Thanos Bardas, global co-head of investment-grade fixed income at Neuberger Berman. There are signs that consumers and businesses “have adapted to the higher-interest-rate regime,” he said.

The stock market’s recent surge marks a shift from the previous three months, when longer-term yields shot higher, bets on rate cuts were scaled back and stocks generally slumped, while data showed a jump in economic growth.

Investors say there are reasons why stocks can thrive when growth is slowing and even when the chances of a moderate downturn are rising.

All else equal, lower long-term Treasury yields can boost stocks by reducing the incentive for investors to shift their money into bonds. Investors had also feared that a 10-year Treasury yield approaching 5% could trigger a recession by pushing up borrowing costs for businesses and consumers, even if those fears weren’t showing up in bond yields themselves.

Adding to those concerns, many worried that yields were being driven higher by a surge in new Treasurys needed to fund a growing federal budget deficit, not just by a strong economy and bets on higher-for-longer rates.

This month’s bond rally, which has pulled the 10-year yield below 4.5%, got its start on Nov. 1 when the Treasury Department boosted auction sizes of longer-term bond sales by less than most investors were expecting. That bolstered the case that yields had climbed more than was justified by economic fundamentals, making their decline especially welcome.

Fed officials have consistently said that they aren’t close to discussing rate cuts.

But they have also signaled that they expect to lower rates, even absent a recession, once they are confident that inflation will reach their objective. In their last forecast in September, the median official expected rates to end next year a half of a percentage point lower than at the start of the year, or a quarter of a percentage point below where they are now.

“The time will come at some point, and I’m not saying when, that it’s appropriate to cut,” Fed Chair Jerome Powell said in September.

Investors’ new positioning on rates reflects other factors than their baseline forecasts. Many think that the Fed will likely cut rates by less than 1 percentage point next year. But they still are making that wager because they see a reasonable chance of even larger cuts.

In past recessions, the Fed has typically cut rates by about 3 to 4 percentage points over a year, said Sonu Varghese, global macro strategist at Carson Group, a financial advisory firm. As a result, bets on the Fed cutting rates by 1 percentage point could be interpreted as investors believing that there is a 25% to 33% chance of a recession in 2024.

However, taking into account bets on more modest insurance cuts, the perceived chance of a recession should be seen as lower, perhaps around 20%, Varghese said.