Investors tuned out the latest escalation in the trade war between the world’s two largest economies, with markets around the world climbing slightly as President Trump announced new tariffs on China and Beijing responded in kind.

Stock markets in Japan, Germany and South Korea — where many companies’ fortunes hinge on international trade — were all up. Even in China, where major equities markets had been down about 20 percent this year, the benchmark index in Shanghai closed almost 2 percent higher.

In the United States, the Standard & Poor’s 500-stock index rose more than 0.5 percent, as American investors continued to see few signs that companies would be hurt by Chinese attempts to retaliate against Mr. Trump’s confrontational stance on trade. In the latest tit-for-tat, the president said Monday that the United States was imposing tariffs on another $200 billion in Chinese imports, and China responded by saying it was adding tariffs on $60 billion in American goods.

Why are markets so sanguine about a trade war that could affect hundreds of billions of dollars in international commerce?