Institutional money managers are a subset of the voters. They increasingly know the history, with emphasis on the linked canonical study. They know that the stock market chronically outperforms with a democratic president.
The analysis involved obviously isn't economic. It's psychological, since that's what the stock market and elections feed upon.