The surprise for the market wasn’t that Trump won the White House, though that was truly a surprise for the country. Rather the 1,000 point drop in the futures market before the opening disappeared once the stock market opened and then reversed during early morning trading. That was truly something that most investors, including myself, did not expect.
Regardless, the stock market is not something you should trade on the wags and wiggles of the moment. Instead you should invest with the long term in mind and just sit there when the market goes through short term volatility spikes. What you can do is expect a recession within the next four years and that was going to happen no matter who is President. You can hedge against a recession but no one knows when it will start and how bad it might be.