S&P 500 finishes at the highs of the day