Despite macroeconomic uncertainty and geopolitical instability, the S&P 500 rallied to new all-time highs in 2024.