Hospital and medical equipment stocks are jumping on Thursday's Supreme Court decision to uphold federal subsidies under the Affordable Care Act.
Plaintiffs in the case, King v. Burwell, argued that the federal tax credits were not allowed under the specific letter of the law. A ruling in their favor would likely have meant that nearly 6.4 million Americans would lose their federal subsidies, and potentially their health insurance.
However, the court upheld the status quo, with Chief Justice John Roberts writing for the majority that "the combination of no tax credits and an ineffective coverage requirement could well push a State's individual insurance market into a death spiral," and "It is implausible that Congress meant the Act to operate in this manner."
Health care stocks responded to the decision immediately and enthusiastically. Hospital companies led the pack, with Tenet, HCA andCommunity Health each surging some 10 percent. Medical equipment companies like Intuitive Surgical and Edwards Lifesciences jumped sharply as well, and health insurance stocks are seeing gains as well, albeit milder.
With health care insurance intact for many Americans, "the big winner here is hospitals, because they're getting paid—rather than having to provide their service for free," said Fred Weiss, who manages mid-cap growth strategy with Atlantic Trust Private Wealth Management.
He added that the excess volume of patients is also great news for medical equipment companies, both because more people will learn of conditions they wouldn't have known about through medical visits, and patients will naturally be more willing to get expensive operations if they're not paying for them out of pocket.
In terms of the specific business impact, Tenet looks to be the biggest winner. Sarah James of Wedbush Securities forecasts that 6.8 percent of Tenet's 2016 earnings before interest, taxes, depreciation and amortization will be generated by patients subsidized on federally run and partnership exchanges. She expects the same patients to make up 6 percent of HCA's 2016 EBITDA.
"We believe consensus estimates have always kept earnings from federally subsidized patients in the numbers, so earnings estimates don't have to come up," James told CNBC. "This has more of an impact on sentiment. The expectations of buy-siders has been pretty split in terms of which way the ruling would go."
And the hospital rally may not be over just yet. According to a CNBC analysis using Kensho data, the four Supreme Court rulings on the Affordable Care Act, all of which were in favor of Obamacare, have each been followed by big 30-day rallies. HCA and United Health Services enjoyed positive 30-day returns 100 percent of the time, with 9.5 percent and 6.8 percent rallies, respectively. Tenet and Community have seen 6 percent and 5.3 percent average 30-day returns.
In recent days, the biggest driver of health care stocks has been the rampant deal talk among health care insurers. And according to one analyst, this ruling should keep that M&A chatter on full blast.
"In our view, this removes one of the concerns that investors [have had] regarding managed care fundamentals. Importantly, this also improves the probability of potential consolidation among the large insurers," FBR analyst Steven Halper wrote in a quick note to clients. "A ruling for the plaintiffs would have created considerable uncertainty."
This article orginally appeared on CNBC.
Read more from CNBC: