Whether Democrats or Republicans emerge victorious in the November elections, Jim McTague of Barron’s predicts one likely winner that’s not on the voters’ ballot.

Falling stock averages be damned! Move money off the sidelines! A midterm election is coming—and historically this means a bounce for stocks and bonds, regardless of who wins. If the past is prelude—always a big “if”—stocks and bonds will be higher on Oct. 31, 2015, than on Oct. 31, 2014. It doesn’t matter whether Nevada’s Harry Reid or Kentucky’s Mitch McConnell reigns as lord of the Senate following the Nov. 4 election. The bounce has been apolitical.

Look at the record book: Since World War II, Standard & Poor’s 500 stock prices have cumulatively gained an average of 15.3% in the six months from the Oct. 31 just before each midterm election year through the following April 30, says Sam Stovall, chief equities strategist at S&P Capital IQ. And this has happened 94% of the time. “I am very much a student of history. I like extracting emotion from the equation. I say, ‘Let me see what stocks’ average performance has been, as well as what their batting average has been for this kind of an environment,’ ” Stovall adds.

His data-crunching shows that, on a year-over-year basis in the 17 midterms since 1945 to 2010, the average bounce was higher and more consistent than during the six-month periods. From Oct. 31 of the midterm year to Oct. 31 of the following year, the S&P has gained an average of 17.5%—rising 100% of the time.

Wait, there’s more. Bonds often enjoy a bounce, too, averaging a six-month total return of 6.5% in eight of the nine midterm cycles since 1978 (Oct. 31 to April 30). “There are so many people who don’t like this market! And because so many dislike it, we’re likely to have a surprise to the upside,” observes Stovall.