New York CNN —. Clues about how this election cliffhanger will end may be hiding in an unlikely place: Your 401(k).. As people try to make sense of the latest swings in prediction markets and dramatic shifts in the share price in former President Donald Trump’s social media company, there’s a far simpler predictor with a surprisingly strong track record.. It finds that the party in the White House tends to stay in power when the US stock market rises ahead of a presidential election.. In all but two elections since 1944, the incumbent party has won the race for the White House when the S&P 500 advanced between the end of July and Halloween, according to CFRA Research’s Sam Stovall, who came up with this election predictor.. This indicator has accurately foreshadowed the winner 82% of the time.. That’s why Trump, who closely follows the stock market and obsessed over it as president, should be nervous about the recent trend on Wall Street.. The S&P 500 advanced 3.3% between the end of July and the end of October.. “If the market goes up, the incumbent party typically wins. If the market goes down, the incumbent party gets replaced,” Stovall told CNN in a phone interview Monday.. Of course, this indicator has not always been accurate. And it does encompass a relatively small sample size. There have only been 20 presidential races since 1944.. Still, there is a certain logic to it all.. If markets are rising ahead of the election, it implies investors are not fretting about an imminent recession. And a recession would be a reason for voters to toss out the party in power.. “The market is an anticipator. If the market is down, it’s because investors anticipate higher rates or a recession — both of which would adversely affect voters,” said Stovall.. That’s what happened in 2008.. The S&P 500 took a nearly 24% nosedive between the end of July and the end of October that year, a time period that included the bankruptcy of Lehman Brothers, implosion of AIG and the government takeover of mortgage giants Fannie Mae and Freddie Mac.. With unemployment and foreclosures skyrocketing, voters decided it was time for a change. Republicans were voted out of the White House in favor of Democrat Barack Obama.. Vice President Kamala Harris should feel relieved the market has seen solid gains.. When the S&P 500 falls between the end of July and the end of October, the incumbent party has been replaced 89% of the time, according to Stovall. The only incorrect reading was in 1956 when Dwight Eisenhower defeated Adlai Stevenson.. This indicator was also correct about the prior two Trump races.. In 2016, the S&P 500 dipped 2.2% in the lead-up to Trump’s matchup with the Democratic nominee, Hillary Clinton. Clinton, who served as Secretary of State in the Obama administration, lost to Trump despite big leads in most October polls.. And in 2020, the S&P 500 inched lower (by just 0.04%) in the final months before the election. Trump ended up losing to Joe Biden.. It’s worth noting that this stock market predictor has been wrong in the past, too.. In 1968, an election year that bore some key similarities to 2024, the S&P 500 climbed almost 6% in the final months before the election. And yet Hubert Humphrey, the nominee for the incumbent Democratic Party,ended up losing to Richard Nixon.. Stovall notes that like this year, the 1968 Democratic convention was held in Chicago and like Harris, Humphrey was a sitting vice president who was nominated after the sitting president suspended their campaign. Likewise, voters in 1968 were frustrated with the establishment.. “Democrats had big headwinds in 1968 with Vietnam and today with the war on inflation and immigration,” said Stovall.. In 1980, Jimmy Carter lost his reelection bid even though the market was solidly higher in the months ahead of the election. Carter was hurt by high inflation and the Iran hostage crisis.. This year’s pre-election boom is historic.. The S&P 500 ended October with a 19.6% surge for the year. That’s the best performance for an election year through October since 1936, according to Bespoke Investment Group.. Of course, there are multiple reasons markets are up today.. Part of it has to do with optimism over a likely soft landing for the US economy and the Federal Reserve’s decision to aggressively cut rates. Investors are still fired up over the AIboom that sent tech stocks surging. And some market strategists have pointed to hopes that Trump wins the White House, enacting tax cuts that would help corporate profits.. Yet there’s another market indicator that offers a reason for hope for the Harris camp.. It finds that a gain for the Dow Jones Industrial Average during the 11-week period before Election Day “correctly foretold” a win by the incumbent party in 12 of the 13 cases since 1928, according to Doug Ramsey, chief investment officer of The Leuthold Group. And a drop for the Dow accurately predicted a loss by the incumbent party 10 out of 11 times. That amounts to a 92% success rate over that span.. “We’re admittedly troubled by the smaller margins in which many of these forecasts prevailed,” Ramsey wrote in a recent note to clients, pointing out that in some cases the Dow was up or down by less than one percentage point.. It won’t be clear what this indicator will predict until the close of trading on Election Day. But through Monday’s close, the Dow is up by 2.4% since August 20, which is 11 weeks out from Election Day.. “The drawback of this market-based election rule is that one must wait until the close of trading on November 5th for its final decree,” Ramsey wrote. “Fortunately, the stock market will usually tip its hand as the election draws nearer.