Inflation has been a hot topic for the past two years. It's measured by the consumer price index (CPI), which tracks the change in price of a basket of goods and services. The U.S. Federal Reserve is charged with keeping CPI growing by 2% annually, but in 2022, it soared to heights not seen in 40 years.

The spike in inflation triggered an unprecedented policy response from the Fed, including a steep rise in interest rates, which initially sent the stock market plunging. But the move appears to have worked, because in 2023, the CPI fell at the fastest pace since 2009.

When that happened 15 years ago, it set off a roaring bull market in the S&P 500 (^GSPC 1.02%) that lasted until 2018. So, are investors set for multiyear gains this time around? Here's what you need to know.

CPI hit 8% in 2022, which was a huge problem

Policymaker confronted unprecedented challenges in 2020 and 2021. The government had to take extreme measures to prevent the pandemic from plunging the U.S. economy into a deep recession. The Fed slashed the federal funds rate (short-term interest rates) to a historic low of between 0% and 0.25% and expanded money supply through quantitative easing (QE). On top of that, Congress deployed trillions of dollars in stimulus spending.

For the most part, those initiatives worked and the worst-case scenario was avoided. Social conditions mostly returned to normal by the end of 2021, but the Fed and the government maintained a stimulative policy stance that quickly sent inflation soaring. It was made worse by supply chain shocks caused by COVID-19 shutdowns around the world, which sent the price of everything from food to cars skyward.

By the time the Fed executed its first interest rate hike in March 2022, inflation had become a runaway train. It settled at 8% for the year, which was the highest in four decades. High inflation is a burden on the economy because it erodes consumers' purchasing power, and if it isn't tamed quickly, it can lead to a recession as cost-of-living pressures become untenable.

Between March 2022 and August 2023, the Fed raised interest rates at the fastest pace in its history, taking the federal funds rate to 5.50%.

Inflation is plunging, and that's good news

While higher interest rates were necessary given the circumstances, they created other challenges in the economy. The S&P 500 recorded a total return of negative 18% in 2022 as keeping money in risk-free assets like cash suddenly became an attractive alternative for investors.

Plus, in October 2023, existing home sales fell to a 13-year low of 3.79 million annualized units. In other words, the housing market appears to have stalled for the moment.

But higher rates have tamed inflation the runaway inflation, which is great news. It fell to 3.5% in 2023, marking a drop of 4.5 percentage points from 2022. While that remains above the Fed's 2% target, it's heading in the right direction.

The S&P 500 roared back to life in lockstep with the drop in inflation, logging a total return of 26.3% last year. Inflation has fallen so quickly that Wall Street experts are predicting the Fed will cut interest rates as many as six times in 2024, which would likely pave the way for higher stock prices.

There is certainly historical precedent for that positive outcome.

Inflation fell by similar amounts in 2009 and 1982

The U.S. financial system collapsed in 2008, causing the most significant economic crisis since the Great Depression. Inflation rose 3.8% that year, but as the crisis unfolded, it fell 4.2 percentage points in 2009 into negative (deflation) territory.

The Fed slashed interest rates throughout 2008, with a steep 100 basis-point (one full percerntage point) drop in December alone to end the year at a historic low of 0.25%. It also introduced QE for the first time, which increased money supply and encouraged banks to write loans in order to boost the economy.

While it wasn't enough to fend off deflation in 2009, those easy monetary policy initiatives were music to investors' ears. The S&P 500 logged a total return of 26.5% for the year, and it kicked off a nine-year bull run: The index didn't record an annual loss again until 2018.

A similar drop in inflation sparked a bull run in the 1980s. The CPI hit 13.5% in 1980 and remained above 10% in 1981, a period known as "The Great Inflation." The Fed hiked rates to a peak of 20% in response, which appears to have worked, because the CPI fell to 6.1% in 1982 -- a decline of 4.2 percentage points.

As a result, the Fed cut rates to less than 10% by the end of that year, sparking a 21.5% total return for the S&P 500. That year, 1982, marked the beginning of an eight-year bull market for stocks.

A person looking at a laptop and sitting on a ledge outside the stock exchange on Wall Street.

Image source: Getty Images.

Could 2023 be the new 2009?

While there are similarities between 2023 and 2009 (like the drop in inflation), there are also material differences.

First of all, interest rates were at a historic low of 0.25% in 2009 and remained within 125 basis points of that level for the entire nine-year bull run I mentioned earlier. Right now, the federal funds rate is sitting at 5.50% and even if six rate cuts of 0.25 percent point are executed this year, that would only bring it down to 4%.

Second, the Fed injected a whopping $4 trillion into the financial system between 2009 and 2014 alone through QE. Conversely, the Fed is shrinking its balance sheet this time around. It has effectively pulled $1.3 trillion out of the financial system since mid-2022 as it unwinds its pandemic-era QE.

In other words, policy is much less stimulative right now than it was in 2009, which influences how much risk investors are willing to take. Theoretically, that could lead to weaker stock market returns. The great unknown is where inflation will land in 2024, because if it overshoots the Fed's target and falls below 2%, interest rates might have to come down faster than Wall Street expects.

In that scenario, 2023 might very well have kicked off a multiyear bull market in the S&P 500. Nonetheless, the odds are quite high for a positive year in 2024, and that's a great place to start.