The Federal Reserve is expected to cut interest rates multiple times this year, but the economic backdrop driving those cuts could have vastly different implications for the stock market, history shows.

And unfortunately for stock investors trying to bet on the outcome, that driver is not always clear when the central bank embarks on a rate-cutting cycle.

"Broad equity index performance after the start of Fed rate cuts depends on whether the economic slowdown was a soft patch or a more severe economic downturn," wrote Maneesh Deshpande, head of U.S. equity strategy at Barclays, in a note last week.

Data compiled by Barclays shows the S&P 500 rises more than 21% a year after the central bank cuts rates as a hedge against what turns out to be a soft patch in the economy. Strategists refer to this as an "insurance" rate cut.

However, the S&P 500 averages a loss of about 17% when the Fed cuts rates because of what turns out to be a recession.

"The previous two times the Fed cut rates for the first time in 2001 and 2007, we saw stocks eventually get cut in half," Ryan Detrick, senior market strategist at LPL Financial, said in a post. "But the reality is if you go back further in time, you can also see explosive rallies after that first cut."

Wall Street will get clues on where the Fed stands on the economy and monetary policy on Wednesday after the central bank concludes a two-day policy meeting. A few economists and investors even think it's possible the central bank cuts this week. The Fed meeting comes amid worsening economic data and fears that the ongoing U.S.-China trade war is weakening the global economy. But it's not clear whether it's a soft patch or not. Barclays' Deshpande said recent sector performance points to the former.

Manufacturing activity grew at its slowest pace since October 2016 last month. Meanwhile, jobs creation slowed to just 75,000 in May, widely missing expectations. The U.S. economy is also seen as growing by 2.1% in the second quarter, more than a full percentage point below the first quarter.

Meanwhile, China and the U.S. have yet to strike a trade deal. Commerce Secretary Wilbur Ross also said Monday that President Donald Trump would be "perfectly happy" to slap additional tariffs on Chinese goods.

This has sent expectations of looser monetary policy surging. Market expectations for a rate cut in July stood at 84.3% on Monday, according to the CME Group's FedWatch tool. Bets for another rate cut in September were at 65%. Traders have also priced in a 51.9% chance of a third rate cut in December.

Some even think the Fed could start cutting rates even earlier. Jim Grant, editor of the Grant's Interest Rate Observer newsletter, told CNBC's "Squawk Box" the Fed will cut rates at this week's meeting. Diane Swonk, chief economist at Grant Thornton, thinks the Fed should cut rates this week.

But David Lafferty, chief market strategist at Natixis Investment Managers, thinks the market is pricing in too many rate hikes.

"I think the Fed wants to stay on hold, maybe even cut rates once, but I don't think the Fed wants to go anywhere near what the market is pricing in right now," Lafferty said. Two or three cuts, "that's a Fed in full retreat. That is the Fed telling you a recession is coming. If the Fed can stay on hold or even give the market a taste of what it wants, without going into full retreat, that would be supportive for stocks."

Subscribe to CNBC on YouTube.