This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

LOS ANGELES (AP) — Midterm elections have historically been good for stock investors.

With mail-in voting already underway in some states for the Nov. 8 midterms, that’s a welcome signal for shareholders, who’ve seen major indexes drop into bear market territory this year — more than 20% below recent highs.

“On average, markets do tend to rally after midterm elections,” said Liz Young, chief investment strategist at SoFi. “There’s this sort of collective sigh of relief.”

In the 15 midterm elections since 1962, the benchmark S&P 500 climbed an average of 14.4% over a six-month period starting Nov. 1, according to data from FactSet. The average gain over a 12-month period was 15.6%.

The trend holds even for years like this, when the market is falling sharply prior to the vote.

But even as corporate profits hit record highs this year, investors remain worried about the prospect of a recession in the U.S. and abroad as central banks grapple with the highest inflation in decades.

Whether the market can emerge from its deep slump after the election is likely to hinge more on the Federal Reserve’s efforts to cool inflation by aggressively raising interest rates.

“Today, it is inflation, the Fed’s response to elevated inflation, and resulting risk of recession, that will be what determines the market’s direction over the coming quarters,” Seema Shah, chief global strategist at Principal Asset Management, wrote in a recent research note.

The Fed has been hiking interest rates in a bid to slow the economy enough to crush inflation, but with every rate hike Wall Street grows more jittery that the central bank will go too far.

The Fed has already raised its benchmark interest rate five times this year, with the last three increases by three-quarters of a percentage point, and inflation is still accelerating. Wall Street expects another raise of three-quarters of a percentage point in November.

The last time the Fed raised interest rates so aggressively to bring down inflation was in the early 1980s, when inflation had soared to nearly 15%. That led to a cycle of alternating rate increases and cuts and volatility in the stock market. During one of the longest rate-hike cycles, which began in September 1980 and ran through May 1981, the S&P 500 gained 8.3%, although the gains evaporated by late September.

Uncertainty over how far the Fed will go in its rate-hiking campaign, how effective it will be to cool inflation and how much the economy slows will not be resolved by the outcome of next month’s elections. Until there’s more clarity on these questions, the market is likely to see more volatility in the months ahead.

“So, instead of the market being up by June or September of 2023, it’s down because the rate hikes are starting to bite and a recession ensues,” said Tom Martin, senior portfolio manager with Globalt Investments. “There are so many other things going on that this is just not something that I think you want to put a lot of stock in.”

Greg Bassuk, CEO at AXS Investments, says the historical trends pointing to a market gains following the midterm elections are just not as relevant today.

“We think the market driver over the next few weeks is related to shocks around the Fed and interest rates and recession, all wrapped together, much more so than trends relating to where we are in the overall election cycle,” he said.

Still, for investors desperate for some relief after a punishing year on Wall Street, the market’s performance in the months following past midterm elections may offer some reason for optimism.

A recent report by Verdence Capital Advisors notes that midterm election years tend to be volatile, with an average drawdown of 19% since 1934. However, “history has also suggested this should be used as a buying opportunity as the year after midterm elections is a favorable time for equity markets, regardless of the economic environment,” according to the report.

Regardless of how the market fares after a midterm election, it doesn’t make much difference which party controls Congress.

“The make-up of the government — be it divided or unified, Democrat or Republican controlled, a shift in power or reinforcement of the status quo — does not have a statistically significant impact on market returns,” Shah wrote.