US stocks end higher despite uncertainty over tariffs