U.S. stocks ended higher in a quiet day, trimming some of the week's losses.