The election is here, and whoever is voted in as the next president could preside over a stock market that reaches record highs — if past elections and presidential terms are any guide.

Vice President Kamala Harris and previous President, Donald J. Trump, are vying to be the 47th president of the United States. When Americans go to the polls on Nov. 5, it could prove to be a very close race. But whichever candidate becomes the next commander-in-chief, they’re likely to inherit a stock market that’s in record territory, a relatively low interest-rate environment in historical terms, and a growing economy.

💰💸 Don’t miss the move: SIGN UP for TheStreet’s FREE Daily newsletter 💸💰

How has the market performed after every election since 2004?

Since the 2004 election, when President George W. Bush was elected for a second term, the stock market has made a spectacular run leading up to the end of President Joseph Biden’s term.

In each of the past five presidential elections, the S&P 500 Index has risen in the first year following the November vote. There have been some big gains and small ones as well. In Bush’s second term, the S&P 500 gained 7.4% in the first year after the vote, compared to the 38% gain in the year after Biden was voted into office.

How have interest rates affected the stock market’s performance during a presidency?

The stock market has benefited from low interest rates in every presidential term since 2004, with President Barack Obama experiencing a historically long period of near-zero interest rates. The Federal funds rate, a benchmark of borrowing costs, was around 5% during Bush’s term, but it dropped to near zero at the end of his term and the tail end of the financial crisis of 2007–2008.

Rates stayed close to zero throughout Obama’s two terms and started to pick up during President Donald J. Trump’s term. The COVID-19 pandemic struck, and the Federal Reserve went through a round of quantitative easing to help prevent the economy from collapsing. 

But inflation started to accelerate during Biden’s presidency, and the Fed tightened monetary policy. Still, the Fed was late in loosening monetary policy. But the stock market welcomed lower interest rates in the second half of 2024, just as the election was taking place, and investors responded by sending major stock indexes to record highs.

How the stock market performed after each of the past 5 presidential elections

Here’s how the stock market, as measured by the S&P 500, has fared after each of the past 5 elections, since 2004.

President George W. Bush was elected for a second term in 2004.

LUKE FRAZZA/Getty Images

George W. Bush

Party: RepublicanElection year: 2004Election date: Nov. 2, 2004Age when taking office on Jan. 20, 2005: 54S&P 500 performance 1 year after election: Up 7.4%S&P 500 performance during 4-year term: Down 32%

The S&P 500 rose 7.4% in the year after Bush was re-elected into office. But Bush finished out his second term with a negative performance for the S&P 500 Index. Financial markets swooned in late 2008 and early 2009 with the global financial crisis.

President Barack Obama — as did President Bush — served two terms in office.

EMMANUEL DUNAND-/Getty Images

Barack Obama

First term

Party: DemocraticElection year: 2008Election date: Nov. 4, 2008Age when taking office on Jan. 20, 2009: 47S&P 500 performance 1 year after election: Up 4.1%S&P 500 performance during 4-year term: Up 85%

Second term

Election year: 2012Election date: Nov. 6, 2012Age when taking office on Jan. 21, 2013: 51S&P 500 performance 1 year after election: Up 24%S&P 500 performance during 4-year term: Up 53%

Obama entered his first term dealing with the fallout of the financial crisis. The Fed, trying to prevent the U.S. economy from slipping further into recession, brought interest rates to near 0%, where they stayed throughout his presidency, and also embarked on an unprecedented period of quantitative easing. Those two factors helped give a boost to the stock market during Obama’s two terms.

President Donald J. Trump served one term in office, the first to do so since President George H.W. Bush.

Mark Makela/Getty Images

Donald J. Trump

Party: RepublicanElection year: 2016Election date: Nov. 8, 2016Age when taking office: 70S&P 500 performance 1 year after election: Up 21%S&P 500 performance during 4-year term: Up 70%

Trump inherited a booming stock market amid strong economic growth, and that helped the S&P 500 move further into record territory. COVID-19 struck in 2020, an election year, and investors were concerned about slowing economic growth. Despite these factors, and bolstered with the aid of economic stimulus measures, the S&P 500 managed to post a 16% gain for 2020.

President Joseph Biden abandoned seeking a second term, in favor of Vice President Kamala Harris running for the presidency in the 2024 election.

Drew Angerer/Getty Images

Joseph Biden

Party: DemocraticElection year: 2020 Election date: Nov. 3, 2020Age when taking office: 78S&P 500 performance 1 year after election: Up 38%S&P 500 performance into 4-year term, through Nov. 4, 2024: Up 48%

Under Biden, the government continued with economic stimulus measures to boost growth. A spike in inflation weighed on financial markets, and the Fed responded by aggressively tightening monetary policy.

The central bank didn’t begin lowering key interest rates until September 2024. Concerns about high consumer prices and employment marked the end of Biden’s term. He closed a run for re-election in the summer of 2024 in favor of backing Vice President Kamala Harris for the presidency.

More on business and politics:

How CEOs like Musk are taking a stance in the 2024 election5 high-profile hedge fund founders & their political affiliations

S&P 500 performance during the past 5 presidencies at a glance

A graphical representation shows the S&P 500’s performance during each presidential term since President George W. Bush’s second term.

Google Finance via Google Sheets

How might the stock market perform during the next presidency?

Historically, maintaining a low-interest-rate environment has helped boost the stock market. Still, interest rates falling further — then remaining at low levels — isn’t guaranteed, considering the potential for consumer prices to rise. And an economy weakened by falling consumer demand might not be enough to underpin gains in the stock market over the long term.