Sign up for the Fortune Features email list so you don’t miss our biggest features, exclusive interviews, and investigations.

The economy is on pins and needles.

The stock market is crashing, investors are jittery, and there are whispers that a recession is near.

The economy looks bad right now, but one economist is not drawn into worst-case scenario fears, and says that two major factors indicate a recession is not certain.

The Federal Reserve's policy to raise interest rates to combat U.S. inflation is an inevitable function of current market volatility, according to a Harvard professor and former presidential economic adviser.

The stock market is behaving erratically right now and may have even been unavoidable according to the man.

When interest rates go up, it makes it more attractive for investors to move their money into bonds and out of stocks.

President Biden has made it clear that bringing down the country's inflation rate is a top priority. The stock market was going to be affected by the Federal Reserve raising interest rates.

The stock indexes have been hurt by other factors, such as the COVID lockdowns in China affecting manufacturing. There is only one story that runs through everything and interest rates.

That doesn't mean that higher interest rates don't pose a risk for the economy. The Fed's attempts to engineer its way out of inflation could end up being either a soft landing for the economy or a huge spike in unemployment.

The economy’s saving graces

Fortunately for the economy, two factors seem to be in favor of a soft landing: consumer activity and gasoline prices.

The large amount of savings U.S. buyers amassed during the Pandemic helped to keep consumer activity strong this year. A recession is dependent on whether consumers are able to continue buying through the storm of inflation.

I'm not worried about a recession over the next year because consumer spending has continued to be very strong, and consumers have about $2.3 trillion of excess savings that they accumulated during the pandemic that could still spend out over the next couple of years.

The idea that the strength of the U.S. consumer may save the economy from a recession is based on the country's low unemployment rate and large pandemic-era savings.

The financial health of the private sector may ultimately determine whether policy tightening will tilt the economy into a downturn, according to Goldman Sachs.

Even if consumer spending does not stay high enough to stave off a recession, there is a major contributing factor to inflation: gasoline prices.

If you want to know how much inflation we will have in the future, you should take out volatile things like oil prices and gasoline prices.

The national average for gas was $4.41 on Thursday, over a dollar higher than a year ago. Biden's plan to release 1 million barrels of oil a day from the country's strategic reserve is one of the ways producers are trying to cool down prices.

The good news is that the impact of high gas prices on inflation is likely to level off or come down.

The part of inflation that people notice should be getting better even if overall inflation is high. He said there was little reason for them to keep rising.