S&P 500 notches fifth straight record closing high, fifth straight quarterly gain