While some observers believe the market's recent rise (notwithstanding Thursday's selloff) signals an impending loss for President Obama, history actually overwhelmingly shows the opposite.

There are about 100 days left before November’s presidential election and already some investors are betting on a Mitt Romney victory, pointing to an improving market despite worse-than-expected earnings and broader economic concerns that they say is a sign of optimism that the current administration’s seemingly anti-Wall Street policies will soon be replaced.

Morgan Stanley’s (MS) chief U.S. equity strategist, Adam Parker, has attributed the bullish market to bets that Romney will pull off the win in November and bring with him a more business-friendly administration.  

However, a quick look at the history books shows a rising market ahead of a presidential election actually signals the victory of the incumbent. That would mean that the market’s recent gain could be reflecting an Obama victory, not a loss, as well as broader sentiment about the market and economy -- or simply hopes the Federal Reserve soon provides new help.

“Either we have a tremendous situation of being fooled by randomness or we have an interesting stock market phenomenon.”

- Sam Stovall, chief equity strategist at S&P Capital IQ.

Of the 28 presidential elections since 1900, an improvement in the S&P 500 prior to an election preceded an incumbent victory 80% of the time, or 16 of 20 of times. The S&P 500’s direction during that period carried an accuracy rate of 82%, according to S&P Capital IQ data.

“Either we have a tremendous situation of being fooled by randomness or we have an interesting stock market phenomenon,” said Sam Stovall, chief equity strategist at S&P Capital IQ.

Of the three out of the four times the incumbent lost following an S&P 500 upswing, outside factors such as third-party candidates were involved, like when Teddy Roosevelt created his own conservative political party ahead of the 1912 election, taking away votes from incumbent William Howard Taft and ultimately leading to the election of Democrat Woodrow Wilson.

When the market fell ahead of a presidential election, the incumbent was overthrown 88% of the time. The only time this predictor failed was in 1956, when Adalai Stevenson failed to overthrow incumbent President Dwight Eisenhower, which could have been a reflection of macro political pressures such as the Suez Canal crisis or Soviet headaches.  

The modern era has its own macroeconomic and political pressures, such as revolts in Syria and eurozone turmoil, as well as weaker-than-expected economic growth in the U.S. that could all add up to an election result that sways from the historical norm. Stovall notes that while history often repeats itself, an 80% accuracy rate is certainly not foolproof.

Still, analysts say that the optimism that has caused the S&P 500, Dow Jones Industrial Average and Nasdaq to all climb more than 7% since January more likely reflects much broader sentiment than just who investors are betting on to win November’s election.  

“I can answer why the market is up in two words: anticipated stimulus,” Stovall said. “I think investors, if they don’t have the history in front of them, may look at things in a different perspective.”

It wouldn’t be surprising if the Fed introduced some fiscal easing over the next few months, as it has raised or lowered interest rates four times in August, five times in September and four times in October in election years since 1976, according to S&P Capital IQ data.

Marc Pado, U.S. market strategist at Dowbull, said recent market gains are more a reflection that uncertainty is coming to a close. The election, no matter the outcome, will answer key question about pending issues like the Bush Tax Cuts and health care, he said.

“All these things that are up in the air, the direction they’re going to take is solely dependent on the outcome of the election,” Pado said. “Whether Obama or Romney wins, what’s important is you are able to move in a direction.”

While second-quarter earnings have been weaker-than-expected, the S&P 500 is rebounding because of overall growth in corporate profits, Pado said. At the same time, the market in election years tends to not overreact to news – positive or negative – because investors are looking beyond November, to four or six months from now during the lame duck session of Congress.

“All issues that are an impediment to the markets at this point, tend to bounce back pretty readily shortly after,” Pado said.

Therefore, solely attributing the market’s gains to an impending Romney win doesn’t tell the whole story, and other election trackers, such as Intrade.com or the Twitter Political Index, seem to agree.

Both currently have Obama as the favorite, with prediction market Intrade favoring Obama 57.7% over 39.8% for Romney. According to S&P Capital IQ data, for all of this year, the correlation of daily percent changes in the rolling 50-day moving average of poll results with the S&P 500 was 91% for President Obama, yet -31% for Romney.

“As the market’s 50-day moving average climbed, so too did the President’s average poll results, whereas the converse was true for the challenger,” Stovall said.

Meanwhile, Twitter, which launched an election barometer on Wednesday based on Twitter conversations, has Obama at 34 compared with 25 for Romney. (Twitter says a score of 34 means that Tweets containing Obama’s name or account name are on average more positive than 34% of all Tweets). Over the last two years, Twitter said its political index has paralleled Obama’s approval ratings from Gallup.

“So there you have it,” Stovall said. “Should the S&P 500 rise during the upcoming three-month period, the current administration will likely be reelected.”

If Obama wins, “investors will not have suddenly decided to embrace the current administration and their seemingly anti-Wall Street policies, but will have become sufficiently encouraged by the improving economic conditions to stay the course,” he said.

Follow Jennifer Booton on Twitter at @Jbooton