Stocks rallied just days after President Donald Trump sent the market reeling by threatening much higher tariffs on China.