S&P 500 climbs to highest level in 10 months, posts 4th weekly gain