Democrats are expected to retake control of the House from the GOP. Republicans, meanwhile, are expected to maintain a slim majority in the Senate.

"Markets typically like gridlock in D.C.," Joseph Song, U.S. economist at Bank of America Merrill Lynch, said in a note. This outcome may "modestly reduce risk of trade tension, and be supportive of risk assets."

Song also said the industrials and materials sectors could benefit from a divided government as both parties could find common ground on a "small" infrastructure bill.

The broad index also does OK when Republicans control the White House and Democrats lead both houses of Congress. In these instances, the S&P 500 averages an annual return of 8.6 percent.

However, a Democratic-led Congress this time around could lead to more investigations into President Donald Trump and increases the likelihood of a government shutdown, both of which add volatility to the stock market, Song says.

The best scenario for the stock market has been a Democratic president and a split Congress, returning 16 percent annually.