Earnings lift shares, gains pared by U.S. election caution