S&P 500 closes the book on its biggest first-half plunge since 1970