Stocks Whipsaw as Traders Face Conflicting Trade War Signals

Stocks swerved up and down on Thursday before ending with a modest gain after China sent conflicting signals about how it would respond to President Trump’s threats of new tariffs and investors took some solace in upbeat economic and earnings data.

The positive signs included an increase in retail sales in the United States in July, according to the Commerce Department, and stronger-than-expected earnings from Walmart, which raised its outlook for sales this year. The Chinese e-commerce giant Alibaba also released strong financial results.

By the end of trading Thursday, the S&P 500 gained 0.25 percent. Stocks in Europe ended lower, but clawed back some of their earlier losses.

The swings were just the latest in a turbulent stretch for investors. Markets around the world have been whipsawed this month by mixed signals about the state of the trade war between the United States and China and growing evidence that the dispute is already slowing global growth, especially in the manufacturing sector.

The volatility reflects the enormous uncertainty investors are feeling as the high-stakes dispute between the world’s two largest economies — one run by an opaque government, the other led by a president prone to firing off inflammatory messages on Twitter — drags on.

On Thursday, a statement from the Chinese government released just before the start of trading in the United States helped to lower the tension.

“We hope the U.S. can work in concert with China to implement the two presidents’ consensus that was reached in Osaka, and to work out a mutually acceptable solution through equal-footed dialogue and consultation with mutual respect,” Hua Chunying, the foreign ministry representative, said in the statement. The consensus in question was hashed out by Mr. Trump and Xi Jinping, China’s leader, in June, when they agreed to resume trade talks.

The truce appeared to disintegrate this month amid Mr. Trump’s threats of new tariffs and a decision by Chinese officials to allow the country’s tightly controlled currency to weaken, developments that suggested the two sides were girding for a standoff that could last indefinitely.

In recent weeks, data has shown that the fight is taking a toll on industrial economies around the world. Closely watched surveys in Britain, China, Germany and Japan have all indicated that the industrial sectors in those countries are contracting.

There are also growing signs of weakness in the United States. On Thursday, reports showed that America’s industrial production fell 0.2 percent in July from the month before, more than economists had expected.

On the flip side, there is little evidence that the American consumer sector, the primary driver of growth in the United States, has been hurt by the trade fight. Unemployment remains near its lowest levels in a half-century. Government data released on Thursday appeared to confirm consumer demand remained robust, with retail sales showing a better-than-expected 0.7 percent gain in July from the month before.

But the trade fight is far from over, as an earlier statement from Beijing released on Thursday showed.

That statement appeared to increase tensions by threatening a response should Mr. Trump carry out his vow to place a 10 percent tariff on billions of dollars of Chinese imports as of Sept. 1. The statement, attributed to an unidentified Chinese cabinet official, did not specify what the countermeasures would be.

The threat of additional tariffs has added to fears about the global economic outlook and pushed markets lower around the world. Those fears were evident on Wednesday, after investors worried about global growth gave Wall Street one of its worst days this year. The S&P 500 index fell 2.9 percent.

On Thursday, the yield on the 30-year Treasury bond fell below 2 percent for the first time on record, ending the New York trading day at 1.98 percent.

The drop reflected increased demand for Treasuries as investors pull their money from riskier stocks, said Joshua Mahony, a senior market analyst at IG Group in London. The drop below 2 percent for the first time was “historical and rare in nature” and “points toward substantial fear,” he added.

“Yields are falling across the board; it’s a flight to safety,” he said. The benchmark 10-year Treasury note ended the day at 1.53 percent, within striking distance of its record low of 1.36 percent, a level it touched in July 2016.

“There were a handful of catalysts adding to the markets’ roller-coaster ride, including continuing civil unrest in Hong Kong and escalating fears that trade relations with China are becoming even more derailed,” Tom Stringfellow, chief investment officer at Frost Investment Advisors, said in an emailed note, referring to Wednesday’s slump.

Late on Wednesday, Mr. Trump suggested that the fate of the trade war and Beijing’s response to the Hong Kong protests could be linked. “Of course China wants to make a deal,” he wrote on Twitter. “Let them work humanely with Hong Kong first!”

The tenor from many economists has grown more pessimistic as the trade war has escalated. Last week, global currency markets were shaken after Chinese officials raised the specter of a currency war with the United States in response to a new tariff threat from the Trump administration.

“Markets are reacting on the fear that the additional threats of more tariffs by the Trump administration will result in a slower-growing global economy,” said Steve Cochrane, the chief Asia Pacific economist at Moody’s. “The risk of recession in the U.S. is not overstated,” he said.

Last week, Goldman Sachs flagged concerns about the United States economy after Mr. Trump threatened to put the 10 percent tariffs on additional Chinese goods. Goldman said the threat added to fears of a recession.

Earlier this week, Trump administration officials clarified which tariffs they would increase on Sept. 1, leaving certain Chinese goods, like laptops, cellphones and toys, off the list until December.

That move did little to ease the concerns of some experts.

“We are in uncharted territory with few historical precedents to guide us,” said Shaun Roache, chief economist for Asia Pacific at S&P Global. “The latest temporary reprieve on tariffs does little to ease this uncertainty.”

Markets outside of the United States ended mixed.

In Japan, the Nikkei 225 index fell 1.2 percent. The S&P/ASX 200 index in Australia, one of the first markets to begin trading on Thursday, fell 2.85 percent. But in Hong Kong, the Hang Seng Index ended up 0.8 percent. In China, the Shanghai Composite Index rose 0.3 percent.

The FTSE 100 index in Britain sank more than 1 percent. In France, the CAC 40 index was down slightly, as was the DAX index in Germany.

Sui-Lee Wee contributed reporting.

A version of this article appears in print on , Section B, Page 2 of the New York edition with the headline: Mixed Signals on Trade Whipsaw Markets. Order Reprints | Today’s Paper | Subscribe