"It's a pretty interesting pattern, markets get euphoric when Republicans get elected. We think there's going to be a lot of fiscal conservation and pro-economic legislation. What they find is Congress remains Congress and tends not to get anything done, " said Sam Stovall, CFRA's chief investment strategist, who did the study.
The six Democratic presidents since Harry Truman also saw better stock markets gains than the five Republican presidents in the six months following the 100 day period — May through October — which happens to be the weakest time of year for stocks.
Then comes the "sell in May, go away" period. That is an old Wall Street adage, reflecting the period between May and October, when the S&P has averaged a 1.6 percent gain since World War II. The S&P outperforms with a 6.7 percent average gain in the November through April period, and has done better than the other six months 70 percent of the time.
As for "sell in May" this year, Stovall said Trump's election brought in a strong run for the stock market, up about 10 percent since Election Day.
"My feeling is that using a limited observation set, and knowing we've gone 14, 15 months without even a pull back, chances are good we end up seeing at least some stock market softness or a challenge in this May through October period," Stovall said.
As for the first term presidents, Democrats averaged a 6.1 percent gain in May through October, while Republicans had a loss of 4 percent.
"It's sort of a consequence of history that we find many Democrats have come into power after there has been a financial or economic downturn, so they usually end up coming in just as the economy is about to recover, and they go along for a ride," said Stovall. "That's why Obama had huge gains, Clinton had huge gains and Kennedy did too," he said.
Barack Obama saw a 2.8 percent gain in his first 100 days, and an 18.7 percent gain in the six months of May through October, in 2009. But that was also when the stock market bounced back, after bottoming in the financial crisis, in March of that year.
Data as of April 24
"Every Republican president, since Teddy Roosevelt had a recession with their first term in office," said Stovall. "A majority of them had more than one. whereas you have had four Democratic presidents who did not have a recession."
President George H.W. Bush had the best May through October performance of any of the six GOP presidents, with the S&P 500 gaining 9.9 percent in those six months in 1989. His son, George W. Bush, however, fared the worst. His first 100 days saw a 5.5 percent decline. The second worst was Dwight Eisenhower, with a 5.1 percent loss in his first 100 days.
George W. Bush also had the worst sell in May period, down 15.2 percent in 2001 as the tech bubble imploded. Reagan had the second worst sell in May, down 8.2 percent.
Watch: Trump determined to have more than 3 percent growth