Most health care stocks are rising, but a few just went in reverse

US healthcare money
Getty Images

Shares of health insurers and hospitals were rising Tuesday as investors began to bet on a divided government after the elections — but that wasn't enough to help some battered biotech and pharmaceutical stocks.

"In general, health care is benefiting from the prospects of a divided government, which I think is a good probability at the moment," said Mike Bailey, director of research and chair at FBB Capital Partners. He said certain "pockets of weakness" were due more to company-specific news.

Divided government "at a minimum slows down any high-profile political moves or plans to control that sector, whether it's drug controls or insurance controls, giving health care a bit of a bid today," Bailey said.

"I think what is happening is there is a lot of pent-up demand for things that have been hammered in fear of Trump. There's a fear now that they're going to miss the upside." -Ilya Feygin, managing director and senior strategist, WallachBeth Capital

Hospital stocks and health insurance stocks, which would benefit from continuation of the Affordable Care Act under Hillary Clinton, were among the top gainers in the S&P 500 health care sector as of 3:14 p.m., ET. Donald Trump says he will repeal the act if he becomes president.

Insurance stocks Anthem and Aetna rose nearly 3 percent Tuesday afternoon, while hospital management firm Universal Health Services traded about 2.5 percent higher and HCA gained 1 percent.

"I think what is happening is there is a lot of pent-up demand for things that have been hammered in fear of Trump. There's a fear now that they're going to miss the upside. The risk is they pile in at higher levels" before a potential market peak and sell-off, said Ilya Feygin, managing director and senior strategist at WallachBeth Capital.

Biotech names get knocked

Traders have generally leaned toward expecting a Clinton win, coupled with continued Republican control in at least the House of Representatives, which is seen helping to maintain a market-friendly state of federal government gridlock. However, both parties are generally seen as negative for pharmaceutical stocks, due to increased controversy over high drug pricing.

Last week, Bloomberg reported that the Department of Justice may file charges in its generic-drug investigation of possible collusion on drug pricing by the end of the year. Mylan and Teva were among companies named in the report as having disclosed subpoenas and cooperating with authorities.

The iShares Nasdaq Biotechnology ETF (IBB) — which is down 23 percent this year — struggled for gains on Tuesday afternoon, while the VanEck Vectors Pharmaceutical ETF (PPH) traded 1 percent lower.

Some of the biggest decliners in those ETFs came from company-specific news.

Valeant Pharmaceuticals shares plunged more than 20 percent on disappointing earnings and guidance cut.

Shares of Endo International traded more than 8 percent lower after management said the firm is facing increasing pricing and competitive pressures in its U.S. generics business and the trends will likely worsen in 2017. Teva Pharmaceutical also traded sharply lower, down more than 4 percent.

The health care sector is down about 5 percent for the year so far, making it the worst performing sector in the S&P 500 year-to-date.

—CNBC's Christine Wang and Reuters contributed to this report.