The S&P 500 and Nasdaq Composite both added more than 1.1 percent Thursday.