Who's smiling through Obamacare blunder? Insurers, of course.

Carmen MartA-nez BanAs | Getty Images

Believe it or not, the "fumble" of the new health-care law has winners—and they're all publicly traded health-care companies.

The rough rollout of the Affordable Care Act, euphemistically referred to as Obamacare, has President Barack Obama on the political ropes. However, health-care stocks are surging, even in the ensuing confusion of Obama's press conference on Thursday, in which he moved to stanch the bleeding in the individual health-care plan market. Amid the chaos, millions face the prospect of being forced off their insurance plans.

Apparently, investors don't see the current morass as problematic at all. In fact, the thicket of mandates favor the industry by effectively boosting both private and public spending on health care, sector analysts say.

(Read more: 'Obamacare Rally'? It's as good a reason as any)

"The two big long-term drivers ... are Medicaid, which is about to surge, and Medicare Advantage," Phil Seligman an equity analyst at S&P Capital IQ, said in an interview. "For many of these companies, these [programs] are becoming a growing part of their business, and they are prepared for it with medical cost control."

Of those who have successfully enrolled in Obamacare, early returns suggest the vast majority have enrolled in expanded Medicaid. This is because the Affordable Care Act required states to expand the health program for the poor to everyone earning less than a certain amount.

Data released this week showed feeble enrollment rates through HealthCare.gov and the corresponding state-run exchanges. However, Seligman says those figures may be deceptive. In research this week, he noted there were nearly 850,000 completed applications for both individuals and families.

Google amd others join HealthCare.gov fix
Google amd others join HealthCare.gov fix

"The numbers appear respectable to us in view of the federal exchange technical issues, and we think the number would have been much greater if the tech problems did not arise," Seligman wrote, adding that the litany of woes dogging Obamacare won't spill over into stocks.

In spite of the pandemonium surrounding the barely functional HealthCare.gov website and the scare headlines of mass cancellations of health plans, bellwether health-care stocks such as Aetna, Cigna, UnitedHealth and Gilead are all trading within shouting distance of 52-week highs. Since Obamacare was enacted in 2010, Gilead is up nearly 200 percent, with Biogen surging more than 300 percent and Amgen up over 90 percent. So what gives?

"Insurers by and large are getting new customers," said Michael Tanner, a health policy analyst at libertarian think-tank the Cato Institute. "The trade-off was always accepting new regulation, in exchange for new mandates and customers."

Insurers have reacted warily to President Obama's remedy for the chaos. Tanner, however, believes the genie can't be put back into the bottle since the law—which is still unlikely to be repealed—mandates that individuals buy insurance, and businesses of a certain size must provide it.

"Customers aren't doing well but the insurers are doing great." Tanner said. "If everybody had to get kicked off the Chevrolet Nova and had to buy a Corvette, it would be good for Chevrolet but not" for car buyers, he said.

—By CNBC's Javier E. David.