The S&P 500 and Nasdaq composite also hit record highs.