The S&P 500, on track for its third straight annual gain, has risen 80% since the end of 2022.