The S&P 500’s $SPY 24% surge from the edge of a bear market just gave the US equity benchmark its best quarter since December 2023.