Chip Somodevilla / Getty Images

Janet Yellen just picked a big fight with Donald Trump.

The Federal Reserve chair on Friday defended Obama-era financial regulations to a room full of economists and financiers at the annual monetary policy conference in Jackson Hole, Wyoming, offering a sharp rebuke to Trump’s agenda just six months before her four-year term runs outs.

“The events of the crisis demanded action, needed reforms were implemented, and these reforms have made the system safer,” Ms. Yellen said, adding that any further reforms should be “modest.”

Trump has called Dodd-Frank a “disaster,” and Treasury Secretary Stephen Mnuchin has promised to dismantle the 2010 law, including by eliminating the Volcker Rule, which among other things prevents certain banks from engaging in proprietary trading, or using their own money to make speculative trades.

Trump has sent mixed signals about Yellen, whose term ends in February 2018. The president told The Wall Street Journal in July that he was considering nominating Yellen for a second four-year term and that he has “a lot of respect for her.” In May 2016, however, he said in an interview with CNBC that “when her time is up, I would most likely replace her because of the fact that I think it would be appropriate.” He has also criticized Yellen and the Fed in the past for being too political.

As we know, Trump does not take criticism well, and he has not hesitated to give members of his own administration the axe when they defy him. By criticizing a very insecure person who prides himself on his supposed financial expertise, Yellen may have sealed her fate.