It hasn't been a banner year for the U.S. stock market — the is up just 5.7 percent since the start of the year — but if history is any indication, it's not going to get much better. Why? Because markets tend to fall in the last year of a president's second term.
Since 1900, the S&P 500 has, on average, fallen by 1.2 percent in year 8, with the market rising only 44 percent of the time. The worst drop was in George W. Bush's last term, in 2008, when the market fell by about 41 percent.
However, we could still see a bounce in equities before the year, as the months leading up to a general election have tended to be positive for stocks. According to Invesco Powershares, between the end of May and the end of October, the S&P 500 has rallied 19 of the last 22 election years, or 86 percent of the time, for an average gain of 6.2 percent.
While equities are at least positive in President Obama's last term, so much election-related uncertainty may be preventing stocks from accelerating further, said Jeff Hirsch, editor in chief of the "Stock Trader's Almanac," a popular investment newsletter.
Come November, America will have a new president, but who that will be is still very much to be determined, and that lack of clarity isn't good for the markets. "People don't like the upheaval and uncertainty of an open-ended race," he explained.
Whether stocks will rise or fall from here depends on who investors think will win the election.
When stocks rise between July 31 and October 31, people are generally of the mind that the incumbent party will win. If equities fall, then the thinking is that a new party will take over, said Sam Stovall, managing director, U.S. Equity Strategy of S&P Global Market Intelligence.
Again, it relates to uncertainty — as the saying goes, better the devil you know than the devil you don't.
This actually plays out in the polls, said Stovall. In 82 percent of the times that markets have climbed during August and October, the incumbent party has won. In 86 percent of the times the market has been down, the replacement party has won.
At least for now, it appears that the market is expecting a Trump win. Since July 31, stocks have fallen by 0.64 percent.
Investors may want to root for a Clinton win, though. Historically, in the first year of a new president's term, markets climb on average by 8.2 percent, according to the S&P. When a Democrat wins, though, the S&P 500 sees a much bigger gain — 17 percent on average versus a decline of 1.8 percent during a Republican's first term.
A look at historical stock market trends and the election provides some good insight about what lies ahead, according to Peter Lee, an analyst with UBS, in a 2013 paper on the Presidential Election Cycle Theory.
It's in the third year — after the midterm elections — where the markets start to really improve. According to Lee, since 1939 there has never been a down year in the third year of a four-year term, with the S&P 500 up on average by 5.5 percent.
More from Quarterly Investment Guide:
How to protect your money from the Brexit fallout
It's not too late to Brexit-proof your portfolio
3 stocks to get a surprising pop, thanks to innovation
At the moment, though, investors should expect more ups and downs in the market, especially if the race tightens, said Stephen Lingard, a portfolio manager with Franklin Templeton Solutions. Coupled with other issues, like slower global growth, investors need to remain cautious, he said.
Hirsch of the "Stock Trader's Almanac" suggests owning defensive stocks and cautions investors from doing anything drastic.
"Investors need to evaluate things much more carefully," he said. "You don't want to be dumping a whole lot of money into the market, but you want to see where things end up."
— By Bryan Borzykowski, special to CNBC.com