Here’s the election result stock investors are hoping for

The financial markets have uncertainty, but one thing seems clear about the upcoming election: stocks will do best if Democrat Hillary Clinton is elected.

But investors should also be rooting for Republicans to hold onto control of the House and Senate.

The latest evidence of the stock market's preference for Clinton in the White House comes from a new study from the Brookings Institution. University of Michigan economist Justin Wolfers and Dartmouth College economist Eric Zitzewitz tracked the markets favorable reactions to several recent events that helped boost Clinton's odds of winning.

They concluded the S&P 500 index would rise 12 percent under a Clinton presidency than if Republican rival Donald Trump wins the election. They also found that market volatility would be 15 to 30 percent lower, Treasury yields would be 25 basis points higher and oil would trade $4 a barrel higher.

The outcome of November's vote will also be felt around the world, with a Clinton victory boosting overseas stock markets as well, the researchers predict.

Currency markets also responded to Clinton's improved odds of winning. The Mexico peso and Canadian dollar — partners in NAFTA, which Trump has threatened to end or renegotiate — rose sharply, the study found. So did the currencies other countries with free trade agreements with the U.S., including South Korea, Australia and New Zealand. The yen was the only major currency to decline against the dollar during the first presidential debate, which helped boost Clinton's candidacy.

Though Clinton is leading comfortably in national polls and in several key swing states, the race is much tighter in down-ballot contests for House and Senate seats. Democrats need to come up with a net gain of 30 seats to win back a slim majority, a feat considered a long shot by most political analysts.

The odds are better in the Senate, where a gain of four seats would give Democrats control (assuming Clinton wins and a Vice President Tim Kaine could break any tie votes.) If Trump wins, they need five Senate seats.

If history is any guide, that would be good news for stock market investors — but slightly better news if the Democrats fail to flip either the House or Senate, according to analysts at Credit Suisse.

They found that, looking back to 1928, stocks have turned in their best performance with a Democrat in the White House and Republicans in control of both houses of Congress. (The worst performance came, on average, with a Republican president, a Republican-controlled Senate and the Democrats in charge of the House.)

The stock market also does best when there is no change in the parties in control, the Credit Suisse analysts found. In the two-year period beginning in January after an election, the median S&P 500 returns have been stronger when leadership in the White House and both chambers of Congress remains the same (18.9 percent) than when it changes (11 percent).

There's less clarity about what a Clinton or Trump presidency would mean for the Federal Reserve and the outlook for interest rates. Fed officials are appointed, not elected, and Chair Janet Yellen's term doesn't expire until February 2018.

Clinton has said little about Fed policy, but Trump has been a vocal critic of Yellen, raising uncertainty about the central bank's independence if he were to win the election and appoint a new Fed chairman.

"Given Trump's political attacks on the Fed, would the person he might appoint be viewed more as a politician than a central banker?" economist Joel Naroff said in a recent note to clients. "The previous two Fed chairs worked for presidents of both parties. Politicizing the Fed is a dangerous thing to do."