Stocks jump as the S&P 500 ends a wild week almost exactly where it started