Stock market behavior in the three months before US presidential elections has correctly predicted the winner since World War II with only one exception. And if the trend continues, Donald Trump will become the next US President.

Read more

Historically, when the American stock market slips in the period from July 31 to October 31, the ruling party loses the election.

"Going back to World War II, the S&P 500 performance between July 31 and Oct. 31 has accurately predicted a challenger victory 86 percent of the time when the stock market performance has been negative,” said Sam Stovall, chief investment strategist at CFRA in an interview with CNBC.

The only exception was in 1956, when President Eisenhower won against contender Adlai Stevenson. This was the year Britain and France propped up Israel in a military clash against Egypt over the Suez Canal and also the year of the Hungarian revolution.

"This time around if the Democrats retain the White House, I will come up with two responses. One is that history is a guide but never gospel, and two, the negative performance by the market could be a reflection of the worry of domination that a Democratic sweep would bring," Stovall told CNBC.

At the same time, when the market was higher in the same three months, the ruling party won 82 percent of the time since World War II with exceptions in 1968 and 1980.

As of Monday, bookmakers didn't believe Donald Trump will win the election, giving him a 20 percent chance to become president.

However, the news the FBI has reopened its investigation into Clinton's use of a private server for government emails has boosted Trump’s chances.

His odds improved on Tuesday to 11/4, or a 26.67 percent implied probability. If you bet on Hillary Clinton and she wins, you will only get $4 in winnings on an $11 bet.