S&P 500 Rebounds in August, Lifts Moderna, Software Stocks