Stocks rallied on hopes that U.S.-China trade tensions could ease soon, as investors recovered most of the steep declines suffered in the previous session.