Dow surges 874 points to record close as investors rotate from AI chips