The S&P 500 rose 0.6%, reaching its first record high in two months, buoyed by resilient corporate profits and a pullback in oil prices.