President Obama wasn't the only one cheering Thursday's Supreme Court ruling in favor of Obamacare. Investors were too.
Health care stocks surged on the news. Hospitals were the biggest winners. Tenet Healthcare ( jumped over 12%, making it the top gaining stock of the day. The company runs 80 hospitals in the U.S. and over 400 outpatient facilities. )
HCA Holdings (, which runs 165 hospitals, soared 8.8%, and )Universal Health Services (, which has 235 centers, popped over 7.5%. )
In a major win for the Obama administration, the Supreme Court held in a 6-3 decision that the Affordable Care Act subsidies would stand. The subsidies will survive for eligible Americans living in states with their own exchanges and those residing in the 34 states that use the federal exchange.
The ruling means that 6.4 million Americans will get to keep their Obamacare subsidies. Investors see the ruling as a major win for hospitals because more of their clients will have insurance, which should make hospitals more profitable.
Hospitals are often the default option for people without health insurance, but since Obamacare kicked in, hospitals have seen their shares of uninsured patients drop.
"Most hospitals have had rising margins the past few years from Obamacare," says Fred Weiss, a portfolio manager at Atlantic Trust Private Wealth Management who covers health care. "So if they were making 12% margins, now they make 16%. That's 30% more profits."
Other winners: Outside of hospitals, the stocks of insurers like UnitedHealth ( rallied over 2%. estors welcomed the news that the individual insurance market will remain intact. )
Health insurers Humana ( and )Aetna ( soared even more on talk that Aetna is seeking to acquire its rival. Humana stock ended the day over 7% higher. )
Overall, health care was by far the top performing sector of the stock market on Thursday. In fact, it was the only sector in the S&P 500 to end the day with gains.