U.S. stocks extended their rally into the new year, with all three major indexes hitting record highs on Thursday, as fresh stimulus from Beijing to prop up its economy added to optimism fueled by easing trade tensions and an improving global outlook.