S&P 500 finishes at record closing high