S&P 500, Nasdaq post best week of 2024