The Dow Jones Industrial Average gained 332 points as markets rose for the second consecutive day after strong corporate earnings overshadowed a contracting GDP.