President Trump has made clear that he wants the stock market to rise and the trade deficit to fall, and that his policies will make that happen. But this year, he has been getting the opposite result: The trade deficit is soaring while the market is careening down.

The U.S. trade deficit is at its highest level in a decade, the Commerce Department reported Thursday, and the trade deficit with China is at a record high. Trump’s trade war appears to be making the trade deficit worse as the United States continues to import a lot of foreign goods but has struggled to sell products such as soybeans abroad.

Trump’s trade feud with China is also causing tremors on Wall Street. The stock market has had an especially ugly week, with the Dow Jones industrial average shedding close to 1,600 points by midday Thursday before paring losses. There was widespread belief on Wall Street that Trump’s trade policies drove the market down. The rebound Thursday afternoon was driven by hints that the Federal Reserve might not raise interest rates much in 2019.

In the game of "Trade Wars," perhaps the winning move is not to play. (Daron Taylor, Jhaan Elker/The Washington Post)

“The stock market couldn’t be any more disapproving of the president and his economics team,” Chris Rupkey, chief financial economist at MUFG Union Bank, wrote in an email. “This administration has to tone down its war with the world, from European automakers to China importers, or this stock market will completely collapse and make a 2019 recession forecast a reality.”

The president has repeatedly pointed to the stock market’s rise as proof that his economic policies are working, but with gains mostly wiped out for 2018, he has turned to blaming others for the market’s spiral.

The last time he tweeted in praise of market gains was at the end of October, when he sought to remind people that “the stock market is up massively since the election” and “earnings are great.” Since then, he has blamed Democrats and the Federal Reserve for the market declines. Investors agree that the Fed’s push to raise interest rates and make borrowing costlier is part of the reason stocks are sliding, but this week’s trading has been driven mainly by Trump’s ongoing feud with China.

News broke Wednesday that the United States and Canada on Saturday arrested one of China’s top business officials, an executive at the technology and electronics firm Huawei, setting up another point of friction with China. The Chinese government has called the arrest “despicable hooliganism,” although U.S. senators from both parties say the company spies on Americans and has violated sanctions on Iran.

Trump has been putting hefty tariffs on a number of foreign products this year to try to encourage consumers to “buy American” and businesses to make more goods in the United States. But the strategy doesn’t appear to be working.

Soybean exports decreased by $800 million in October and are down more than 40 percent from last year as China counters Trump’s tariffs with hefty taxes on U.S. agricultural products. Although many economists expected the trade deficit to widen this fall, the numbers are even bigger than anticipated because of Trump’s trade war, and the fact that the European and Chinese economies are weakening and were widely expected to scale back purchases of U.S. goods.

This is “how to break the trade deficit by the Trump administration,” Ian Shepherdson, chief economist at Pantheon Macroeconomics, wrote in a morning note to clients. “Pumping up domestic demand with fiscal easing and picking fights with trading partners does that.”

Trump and Chinese President Xi Jinping negotiated a truce over the weekend to withhold additional tariffs for 90 days, but a wide gap remains between what Trump wants and what the Chinese are willing to give. Trump claims Xi agreed that China would buy a lot more U.S. goods to shrink the trade deficit between the two countries and would reduce tariffs on U.S. products, including autos. But the Chinese have yet to confirm those details, especially on cars.

“You have to wait and see for 90 more days. That kind of uncertainty is not necessarily good for markets,” JPMorgan Chase CEO Jamie Dimon told CNBC.

The United States ran a $335 billion trade deficit with China last year.

A key part of Trump’s justification for starting the trade fight was to shrink the trade deficit, which he views as a sign that the United States is “losing” to other nations. Most economists, however, do not view the trade deficit as a problem because Americans receive cheaper goods, and countries such as China use the money they make on trade to invest in U.S. companies and buy U.S. government debt.

“The president’s characterization of himself as ‘Tariff Man’ is juvenile and unpresidential,” said Dennis Gartman, who writes a daily newsletter on the markets. He says he voted for Trump but disagrees with him strongly on trade policy. “The president seems intent upon believing the United States can be an island. That’s 17th or 18th Century thinking."