Barack Obama often gets slammed for his stewardship of the U.S. economy, but for stock investors, he's been one of the best presidents since World War Two.

At 1,400, the S&P 500 on Friday was closing in on a four-year high and was up 74 percent since January 20, 2009, the day Obama took office. Not since Dwight Eisenhower's first term has a president had such a strong run for their first term.

That rally might be just enough to get Obama re-elected, making him the first sitting president in the post-war era to win a second term with a jobless rate higher than 7.2 percent.

"Even though business and corporate sentiment is not good for Obama because they don't think he's been good for the economy, the fact that the market has done very well under him is a positive," said Ethan Siegal, head of The Washington Exchange, which analyzes politics for institutional investors.

Soon after taking office, the president even waded into the dangerous territory of stock market prognostication.

On March 3, 2009, Obama, responding to a question about a market that was plumbing 12-year lows, said: "What you're now seeing is profit and earning ratios are starting to get to the point where buying stocks is a potentially good deal, if you've got a long-term perspective on it."

The S&P 500 hit bottom a week later. Three years on, U.S. stocks have more than doubled, adding $6.8 trillion in market capitalization.

"The stock market is a barometer not of the absolute level of the economy but of improvement in the economy," said former Merrill Lynch strategist Richard Bernstein, who now runs his own investment management firm. "There is no doubt the economy has improved in the last four years."

Conventional wisdom has it that a stock market rally is good news for a sitting president, and it often has been. But not all rallies are the same, and the lack of a concurrent boost in home values, along with the weak job market, may mean the gains over the last three years don't have the same benefit for Obama.

Tom Wales, director of North America analysis at Oxford Analytica, noted that most Americans who hold stocks do so in their 401(K) retirement accounts, and "if you're worried about your job, about your mortgage being underwater, then the fact that your 401(K) looks less bare is not that reassuring."

NO WEALTH EFFECT

Polls in recent days have shown Obama widening his slim lead over Republian Mitt Romney even though voters say they are worried about the economy and the country's direction. The latest Reuters/IPSOS poll gives him a seven-point lead.

Betters give Obama a strong chance to win. Online betting site Intrade had the president's reelection chances at 59 percent, against 38 percent for Romney.

A 2012 study by the Socionomics Institute in Atlanta found that the performance of the Dow Jones Industrial Average in the three years preceding election day was a better predictor of results than overall growth, unemployment or inflation.

A gain of 20 percent or more in the Dow all but assured victory for an incumbent, while a fall of 10 percent or more meant the president should start brushing up on his golf game.

That ought to be good news for Obama: the Dow is up 35 percent since November 1, 2009. Ronald Reagan and Bill Clinton presided over respective gains of 25 percent and 35 percent. Both coasted to reelection.

"Research on annual price performance dating back to 1944 shows a link between the performance of the stock market and factors such as the likelihood the incumbent will be reelected," said Sam Stovall, chief investment strategist for Standard & Poor's Equity Research Services.

But in the 1990s, for instance, stocks rose amid an economic boom that boosted job growth and home prices, which made everyone feel richer. This "wealth effect" has been largely absent this time.

While record-low interest rates and cheap financing from the Federal Reserve have helped push up stocks, they have done little to ease the blow of a housing collapse or encourage firms to go on a hiring spree. The jobless rate last month stood at 8.3 percent, exactly where it was just after Obama took office.

A slow-growing economy with nearly 13 million Americans out of work means "nobody is feeling flush just because we've had a market rally," said Sean West, who heads U.S. analysis at The Eurasia Group, a consultancy that analyzes political developments for companies and investors.

"Even if you're doing well now, who knows where you'll be in six months? In such a high volatility environment, it's hard to feel good."

Things don't always work out as planned. A weak economy was credited with foiling George H.W. Bush's re-election attempt in 1992, even though the S&P rose 46 percent over his term in office. It rose a more modest 4.46 percent in 1992.

Added David Kelly, chief global strategist at JPMorgan Asset Management: "I suspect if you stopped 20 people on the street and asked how much the value of their 401(K) had gone up in the last three years, their answers wouldn't come close. So even though the S&P has more than doubled from its low point in (March) 2009, most Americans are unaware of that."

POSITIVE SOCIAL MOOD

Even so, Robert Prechter, president of Elliott Wave International and one of the authors of the Socionomic Institute study, says the stock market has such a strong predictive record because it is usually the best indicator of voters' mood.

"No specific election outcome is ever assured, but we can say that social mood has become much more positive during Mr. Obama's tenure as president," he said, adding, "We are skeptical that the 'wealth effect' matters as much as voters' mood.

"Even though the economy remains weak, the three-year trend toward more positive social mood should have made voters less inclined to express bad feelings toward the president," he said.

Indeed, the latest Reuters/IPSOS poll showed registered voters were still rated Obama higher than Romney when it comes to jobs, the economy and tax issues.

John Manley, chief equity strategist at Wells Fargo Funds Management, said Obama also wins points for acting swiftly in the early days of his presidency to prevent a deep recession from becoming a full-fledged depression. "That quite rightly gives him credit for a decent run in the stock market," he said.

Of course, personalities and political skills matter, too.

Obama campaign attacks on Romney's record as a private equity executive at Bain Capital and his job-creating credentials have been effective, Eurasia's West said.

That's not to say a big swing in the market between now and November couldn't shake things up.

"If Europe's debt crisis were to worsen, for instance, and it knocked 100 points off the market in a day, making Obama look weak and ineffective, he loses," West said.

"But unless you see the stock market break out one way or the other, it comes down to who can craft a better story about economic performance."

(Additional reporting by Jodi Helmer; Editing by Leslie Gevirtz)