President Donald Trump (L) shakes hand with China's President Xi Jinping at the end of a press conference at the Great Hall of the People in Beijing on November 9, 2017.

When the U.S. escalated the trade war by slapping tariffs on $200 billion in Chinese goods last September, China's economy was struggling and its stock market was in a deep slide, giving the U.S. a seeming advantage in a trans-Pacific trade rift.

But months later, the U.S. has lost some of that edge. China's Shanghai stock market has surged more than 27 percent in 2019 and is the best performer of major markets globally, while China's economy is finally showing early signs of stabilizing.

When the September tariffs were announced, President Donald Trump was seen as emboldened by the best two quarters of more than 3 percent U.S. growth in years and a stock market that was hitting all-time highs. While the U.S. is still seen as having an advantage, economic growth has faltered, to a below trend 1.5 percent pace in the first quarter. The U.S. stock market is also trying to recapture those 2018 highs, despite strong gains after December's sharp selloff.

Trade friction and tariffs have put a dent in both economies, and show up in record trade deficits between the U.S. and China. But China's wobbling economy may be perking up. Manufacturing data this week showed that activity was expanding again.

"I think the developments in China are significant. The purchasing managers' numbers in China were much better than expected. It really was the first green shoots that are fairly convincing here. Clearly, China has opened the spigots on policy easing," said Ethan Harris, head of global economics at Bank of America Merrill Lynch. "Last month, they introduced a big tax cut. They made it very clear, they're pressuring more lending. The purchasing manager's number is one of the first things that shows this is starting to change business sentiment."

High level trade talks are continuing this week in Washington, and it appears progress is being made.

Strategists say the role of the stock market has become an important factor in trade negotiations, after the 14 percent dive in the S&P 500 in the fourth quarter and the 25 percent decline in Shanghai stocks for all of 2018. The U.S. stock market bottomed in the final week of December, and shortly after Trump announced progress in talks with Beijing. Shanghai and Wall Street stocks have both moved mostly higher since then, and the two sides have stayed at the negotiating table.

Source: Citigroup

"To the extent that the economy has moderated a bit, and the U.S. administration pays more attention to the stock market, suggests it will be more sensitive to imposing tariffs on China, relative to how it was before," said Cesar Rojas, Citigroup global economist. For now, the U.S. has frozen tariffs at $250 billion on Chinese goods, and Trump held off increasing the tariffs while talks continued.