The S&P 500 index has been on fire in recent times, driven sharply higher by artificial intelligence and Donald Trump's election.