Stocks on Friday erased losses suffered in the days after President Trump’s chaotic rollout of tariffs in early April, bolstered.