(CNBC) — U.S. equities closed higher in choppy trade on Wednesday, shrugging off a sharp decline in health care stocks following remarks made by President-elect Donald Trump.

“We have to get our drug industry coming back. Our drug industry has gotten disastrous. They’re leaving left and right,” Trump said at his first news conference since winning the U.S. election.

The Nasdaq composite fell after Trump made his remarks, as the iShares Nasdaq Biotechnology ETF (IBB) fell 3 percent. Heading into the close, however, the Nasdaq traded just above the flatline. The S&P 500 advanced 0.1 percent, shrugging off a 1 percent decline in health care. Energy stocks led the way in the S&P, rising 1 percent.

Note: Read our discussion guidelines before commenting.