A dip into historical data shows that the stock market has responded differently under Republican and Democrat presidents.