Gary Cohn, President Trump’s former top economic adviser, says the president is “desperate” to reach a trade deal with China and is being ill-served by protectionist advisers who have left the White House “living in chaos” on major decisions.

“The president needs a win,” Cohn said in an interview with Freakonomics, a public radio show and podcast.

Trump expects a China deal to boost the stock market, which has treaded water for the past year, the former aide said. Cohn cast doubt on the president’s ability to obtain fundamental changes in China’s state-led economic system, one of his core negotiating objectives.

“I think market access, the Chinese will give because they’ve been close to giving it for a while. But how are we going to stop the Chinese from stealing intellectual property or not paying for it?” he said. “How are we going to stop them from copyright infringement? What is the enforcement mechanism, and what are the punitive damages if they don’t stop?”

The United States has proposed enforcing any agreement via 18 annual meetings with Chinese officials, backed by the threat of unilateral American tariffs, according to Robert E. Lighthizer, the chief U.S. trade negotiator.

At the White House on Wednesday, the president told reporters he is “not in a hurry” to reach a deal with Beijing and said “there’s always a chance” the talks could fail. But he also has expressed an eagerness to host a signing summit at his Mar-a-Lago estate in Florida for Chinese President Xi Jinping.

Senate Minority Leader Charles E. Schumer (D-N.Y.) said Wednesday that the president should “have the guts to walk away” if the Chinese don’t offer significant concessions.

Cohn, 58, the former president of Goldman Sachs, served for 14 months as Trump’s director of the National Economic Council. He cited the 2017 passage of a $1.5 trillion corporate and personal income tax cut as his principal accomplishment, though he said it would be several years before the measure’s success or failure becomes evident.

A self-described “globalist” in a nationalist White House, Cohn argued against the president’s enthusiasm for imposing tariffs on products such as solar panels and steel. But he was often bested by White House adviser Peter Navarro and Commerce Secretary Wilbur Ross, the administration’s leading protectionists.

“I was losing the war on tariffs every day with the president. I knew I wasn’t convincing him I was right,” he said. “I was not going to take a 74-year-old man who’s believed something since he was 30 and convince him that I was right. Believe me, I tried.”

Cohn resigned in March 2018, shortly after the president abruptly announced 25 percent tariffs on imported steel and aluminum. In the Freakonomics interview, he said the president acted after Navarro and Ross circumvented normal channels to arrange a meeting between Trump and industry chief executives.

Trump announced his decision to reporters at that White House meeting.

“They created that meeting without anyone knowing it,” Cohn said, adding that White House Chief of Staff John F. Kelly had been blindsided by the move. “When the process breaks down, then you’re sort of, in my mind, living in chaos.”

Cohn disparaged Navarro as the “only” PhD economist in the world who supports the widespread use of tariffs.

Cohn said he supported the president’s desire to crack down on unfair Chinese trade practices, but he said tariffs “don’t work.” As evidence, he pointed to last year’s record $891 billion trade deficit in merchandise and the record $419 billion gap in trade with China.

“So tariffs were used as the threat. Did it hurt the Chinese at all? We had record trade deficits,” Cohn said.

Once seen as a leading candidate to replace Janet L. Yellen as Federal Reserve chair, Cohn fell out of favor with Trump after he criticized the president’s handling of the August 2017 “Unite the Right” rally in Charlottesville.

But Cohn told Freakonomics that he would not have been a good fit as central bank chief, which he likened to an academic position debating the finer points of the U.S. economy. “That would be the worst position you could give to Gary Cohn,” he said. “I would not have been good at that job.”

Trump has frequently criticized his eventual appointee as Fed chairman, Jerome H. Powell, who took office in February 2018, for raising interest rates in the absence of significant inflation. With the Fed now having paused its campaign of rate hikes, Cohn was asked whether Powell had caved to presidential pressure.

“I surely hope, and I almost pray, that what the Fed did was in reaction to what they were seeing in the data, that they felt that there was an actual slowing of the economy and they were in the wrong place,” he said.