Despite a banking crisis earlier this year and high inflation, the S&P 500 index has rallied from its cyclical low in October and is now up more than 22% since that time. From a technical standpoint, many would say that we've entered a bull market.

But on the other side of the spectrum, many believe the U.S. economy is heading for a recession or may already have entered a recession and we just don't know it yet (they're typically formally announced after they start). Can both be true? It's possible. Let me explain.

The last three years

Since the start of 2020, the market has been extremely volatile. Stocks surged in 2021 due to low interest rates, quantitative monetary easing, and stimulus from the federal government that led to frothy markets.

Then everything came crashing down in 2022 as the market and the Federal Reserve realized that inflation was not transient and the central bank began jacking up interest rates, which have risen from zero to more than 5% in just a little over a year. But because of the volatile nature of markets, even with the S&P 500 up, it is still well below the peak in 2021.

^SPX Chart

Data source: YCharts

From the very start of 2020, when the S&P 500 traded around 3,250, the index is now up about 34%, which equates to an average annual return of roughly 11.2%. Now, it's fair to argue whether this is justified given everything that's happened over the past three years and the outlook, but these kinds of average returns, while very solid, are at least not unheard of.

The market's interesting relationship with recessions

Remember, investing is all about looking ahead to the future. When investors start to grow concerned about a recession, that's when stocks can take a hit. Once the economy is in a recession or can sense that one is nearing an end, that's when it can rally because investors start to believe that better times are ahead. 

While we are not officially in a recession, the yield curve, which plots the short- and long-term interest rates, has been inverted since the end of last year. An inverted yield curve is normally a flashing sign that a recession is just around the corner. Given the amount of time the yield curve has been inverted, if we do formally enter a recession, it will be arguably the most-anticipated one ever.

Furthermore, it is possible that we are very close to a recession or that one has already begun. JPMorgan Chase Private Bank Senior Markets Economist Stephanie Roth recently noted that gross domestic income (GDI), which essentially looks at total business revenue in the economy, has recently fallen behind gross domestic product (GDP), which measures how much businesses and consumers are spending. According to Roth, GDI and GDP should match up over time, but in the first quarter, GDI came in much weaker than GDP, indicating that cracks in the economy are starting to emerge.

Some economists and analysts have also suggested the economy needs at least a modest recession so the Fed will stop raising interest rates and maybe even lower rates to stimulate the economy if it slows down too much. This would create more of a risk-on environment because equities would become more appealing compared to bonds, so not everyone views a recession as bad for the markets, but it depends on how severe a potential recession might be.

There is room for both

After the pandemic, unprecedented quantitative easing over the past decade (now quantitative tightening), surging interest rates, and a banking crisis earlier this year, the market is truly operating in the unknown.

This has made certain economic data and indicators mean very different things than in the past. For instance, while low unemployment is normally a very good thing, the Fed would actually like the labor market to slow a little bit and for unemployment to tick up gradually, so that the central bank knows that inflation is softening. 

This also explains why we can potentially have a bull market and also still dip into a recession. The market has rallied after a very difficult year in 2022, but the full effect of all of the Fed's rate hikes has likely not been felt yet by the economy. At the same time, a recession might trigger a rate cut, which usually helps stocks. Although confusing, it does seem like we are operating under market conditions where both a recession and bull market are possible.