The Dow Jones Industrial Average gained more than 500 points on Thursday as all three major indexes rose into positive territory for the week.