Chinese President Xi Jinping needs a trade deal to strengthen his weakening economy. President Trump needs a deal prior to the 2020 elections. That's the context for Trump's optimistic tweet on Tuesday morning.

Had a very good telephone conversation with President Xi of China. We will be having an extended meeting next week at the G-20 in Japan. Our respective teams will begin talks prior to our meeting. — Donald J. Trump (@realDonaldTrump) June 18, 2019

That tweet sent the markets into a blaze of upward momentum. But Trump isn't just posturing. We can expect to see the foundations for a U.S.-China trade deal firm up in Japan next week.

First off, China needs a deal.

While Xi has been blabbing about strategic patience in international trade dealings, his economy is in big trouble. As the Wall Street Journal's Lev Borodovsky noted on Monday, China's industrial and manufacturing production is declining on a steep curve. This sits alongside the structural weaknesses of the Chinese economy: Its inefficient state direction and its need for vast intellectual property theft to allow innovation in competition with the West. Sustainable low-cost export growth is a necessity for Xi's ambitious domestic development program. But where, as now, that model rots under U.S. tariff pressure, the political implications of Xi's economic failure prove concerning.

Xi knows that a large number of his rural citizens are very poor and increasingly frustrated. He also knows that the urban middle class revolt we're seeing in Hong Kong could soon occur in mainland cities, such as Shanghai and Shenzhen. Would Xi love to wait out Trump in the hope that the next president is more malleable to his agenda? Yes. But he has reason to think Joe Biden might be just as difficult a partner. Moreover, Xi's very present economic concerns provide motivation to reach a deal now.

Trump has his own good reasons to get a deal.

Though very early, current 2020 general election polling looks bad for Trump. But Trump has an electoral super-weapon: it's the economy, stupid. Trump's problem: Alongside growing security concerns with Iran and North Korea, and China's own threats to American stability, market doubts are sustaining. Trump thus has reason to reach a deal now, a deal that ends some U.S. tariffs in return for Chinese enabling of slightly fairer U.S. business competition on its soil.

In short, the coalescing of Xi and Trump's interests means we should expect a deal by Labor Day. But don't expect a miracle. China and the U.S. are engaged in a new cold war. China's intellectual property theft will continue, as will American efforts to restrain China's aggression. This cold war has a good chance of one day going hot.