Stronger-than-expected profit reports from several big U.S. companies helped drive the market.