Banks and technology stocks made the strongest gains.