Former chief White House ethics lawyer Richard Painter criticized President Donald Trump‘s trading of Dell Technologies Inc. (NYSE:DELL) stock as "egregious." However, he added that even without the stock trade, publicly praising a specific company would violate federal ethics standards for executive branch employees.

Painter, who worked under George W. Bush, told Fortune, "The baseline rule is, even if the president is not trading, there should never be an endorsement of a particular company," Painter said, adding he would have strongly objected if a similar situation had occurred during Bush’s presidency.

Painter argued that Trump’s suggestion to "go out and buy a Dell computer" qualifies as an endorsement, which is a violation of federal standards of conduct for executive branch employees.

He said such remarks could influence markets because investors may assume Trump knows about potential government contracts or other developments that could boost Dell Technologies’ value, prompting them to trade based on that expectation.

Read Next