The business of health care is changing. (Bloomberg)

If you could take the pulse of the health-care sector, it would be racing.

As the Affordable Care Act takes hold in the daily lives of Americans, the law has removed long-standing barriers keeping people from buying health insurance, changed the ways doctors and hospitals are compensated and — as of this year — required that most Americans get health insurance or pay a penalty.

And it’s overhauling the business of health care — for hospitals and insurers, doctors and patients. For investors, that means tracking a new roster of winners and losers across the industry.

The nearly $3 trillion industry, long considered a recession-proof holding for investors looking to play it safe, now also exhibits the kind of growth that appeals to investors looking for a hot new stock. Health-care spending in the U.S. accounts for a whopping 18 percent of GDP.

“The U.S. health-care system over the next 10 to 20 years is going to go through a period of fundamental change,” says Eddie Yoon, fund manager of the Fidelity Select Health Care Portfolio, which has $6 billion in assets and is up 50 percent over the past year, according to Morningstar. “The way we buy insurance, the way we consume health care, that’s going to be totally different.”

(John Jay Cabuay)

That disruption seems to bode well for stock performance: The Standard & Poor’s 500 health-care index is up 9.7 percent this year through June 30, outpacing the overall S&P 500 stock index by 3.6 percentage points. That lead is more pronounced over the past 12 months, when health-care stocks gained nearly 27.8 percent, compared to 22 percent for the broader market.

Among the strongest performers are drugmakers developing new treatments for debilitating illnesses like hepatitis C and muscular dystrophy that work much better and cause fewer side effects than the old mainstays doctors have relied on until now. As more health-care decisions are placed in the hands of consumers, an entire industry is popping up to serve people who want to keep better track of their health from the comfort of their homes. And companies that once competed against one another are joining forces to emerge stronger and more efficient.

It’s not all good news. Insurance companies are still trying to grasp how their costs might change now that they can no longer cherry-pick their customers. Hospitals are adjusting to smaller payments from government insurance programs like Medicare. And pharmacies, despite the potential for new business, are at a disadvantage when it comes to negotiating drug prices.

For regular investors watching the upheaval, spotting the companies — or even the types of companies — poised to do well can be nearly impossible. “If you’re an average investor, it’s very difficult to outguess the market itself,” says Joe Heider, a regional managing principal for Rehmann Financial, who recommends investors use diversified health-care funds to make a broad play. “There are still a lot of unknown questions about ultimately who are going to be the winners and losers.”

Despite the mixed picture, investors are piling in, pouring a net $4.8 billion into health-care sector funds and exchange-traded funds so far this year through May, according to Morningstar, a fund research firm. Last year, the funds received $13.9 billion, more than five times the amount from 2012.

Suddenly, many more patients

The underlying force behind most of the sector’s blockbuster performance is a tremendous growth in the demand for health-care services. The ranks of the insured in America are expected to balloon by more than 12 million people this year, thanks to Obamacare, according to the Congressional Budget Office.

The law expanded Medicaid eligibility in much of the country and prohibited insurers from denying coverage because of pre-existing conditions and established insurance subsidies for low-income families. Millions of newly insured Americans are making appointments and filling prescriptions they put off when they lacked coverage. Some baby boomers are finding that they need more care simply because they’re entering retirement, a period in their lives where they will be three times as likely to need health care than the rest of the population. Something like 8,000 baby boomers are expected to reach retirement age each day over the next 15 years, according to AARP.

“That is the biggest story in health care for the next 20 years,” says Charles Sizemore, editor of the Sizemore Investment Letter. “It means, all else being equal, larger demand for health-care services.”

The same is happening globally: the World Health Organization estimates that between 2000 and 2050, the population of those 60 and older will grow to 2 billion from 605 million. Their share of the overall population will double to 22 percent in that time. And as emerging markets, like India, China and Brazil expand their economies and improve their infrastructures to make health care more accessible, Yoon says companies like Boston Scientific and Covidien, which create testing equipment and other medical supplies, are benefiting from rising demand.

Innovations in pharmaceuticals

Some pharmaceutical giants like Merck, which makes drugs that treat widespread and chronic illnesses such as diabetes, asthma and heart disease, could also benefit from rising demand as more people gain insurance and fill prescriptions. But Andy Acker, who manages $2 billion in assets through the Janus Global Life Sciences Fund, which is up 46 percent over the past year, says the most interesting names in the drug universe are doing well for reasons that have little to do with Obamacare: They’re excelling because they’re creating treatments that are more efficient and come with fewer side effects than earlier remedies. “We have seen an acceleration in innovation,” Acker says.

One notable example is Sovaldi, the $84,000 hepatitis C drug created by Gilead Sciences. The high price tag, which covers three months of treatment, has increased costs for insurance companies and launched a national debate about who should receive the treatment. But some investors say that cost is merited, given that the new treatment has a better track record of curing patients. The older regimens are uncomfortable and less effective, requiring roughly a year of weekly injections that cause flu-like symptoms.

Sovaldi, in contrast, requires patients to take a pill each day for three months. (Some patients still need the injections, but for a shorter period of time.) While most of the treatments patients had available to them before Sovaldi are less expensive, some of the newer treatment plans were comparable in price, Acker says. For instance, a regimen involving the antiviral Ribavirin, interferon and Incivek, a protease inhibitor, costs close to $80,000, according to Express Scripts, a pharmacy benefit manager that handles prescriptions for large parties.

In patients cured by Sovaldi, long-term care costs would diminish dramatically.

Drugmakers can typically hold on to their pricing advantage until their patents run out, which generally happens about 10 years after a drug is introduced, making such companies a good long-term buy for investors who get involved early, Acker says. “But the challenge is finding those companies that can be both clinically and commercially successful,” he says.

Some lawmakers, concerned about high price tags, have debated capping drug prices, but Acker says such regulation is unlikely, adding that drug prices may come down on their own as more competitors enter the market.

Getting in before a company is producing the drug and bringing in revenue can also be a gamble, which is why Acker positions his portfolio so that it can’t drop by more than 1 percent in a single day because of the performance of any one biotech company.

Some price moves are unpredictable even for professionals who are closely watching a company’s development, says Arlinda Lee, senior equity analyst at MLV & Co., a boutique investment bank. For instance, the share price for Idenix Pharmaceuticals, a biotech firm developing a drug for hepatitis C, tripled in June when Merck agreed to pay $3.85 billion, or roughly $24 a share, to buy the company, she says.

“If you were lucky enough to pick that one, you’re golden,” Lee says. “But the timing has to be exquisite.”

Retail investors might be better off investing in a mutual fund or exchange-traded fund that holds a broad basket of biotech companies but can still see stronger growth than the broader health-care market, she says, adding that it’s difficult to guess which companies will be acquired.

Bargain-hunting in health care

One consequence of the health-care overhaul is that consumers are getting more involved in their care decisions, creating a new market of services and gadgets for people who want to comparison-shop for medical services and better track their health.

One goal for some companies: Bringing transparency to health-care pricing — just as Expedia or Kayak have done for travel services. In that market, Yoon points to Castlight Health, which offers software for employers who want to help workers bargain-hunt. Insurance companies such as UnitedHealth Group are also introducing shopping tools.

As more people look to track their physical activity and monitor chronic illnesses outside of the doctor’s office, the U.S. home health market, which consists of companies offering consumer medical devices, telehealth, wearable tech gadgets and even health-related video games, is expected to balloon to $5.8 billion in 2018 from $2.5 billion today, according to IHS Technology, a market research firm.

The telehealth market alone, which consists of services and tools for people to monitor things like their blood pressure and glucose levels, could grow by nearly 60 percent in four years. That could lift telecom firms like AT&T, Sprint and Verizon, which are expected to provide the technology and the reach needed to make these services accessible, says Roeen Roashan, a health-care analyst with IHS Technology. But it could also bring more business to firms like Johnson & Johnson, which offers medical devices that could come into higher demand from people seeking to monitor their health, he says.

Not all good news

The growth that’s ubiquitous in much of the industry right now has helped some players overcome the hurdles created by the health-care law, such as new taxes, fees and restrictions. For instance, the nation’s largest insurance company, UnitedHealth Group, saw growth in its Medicaid business and in a service it offers to help customers coordinate care. That is helping the insurer maintain about the same level of earnings despite obstacles such as rate cuts from Medicare, a new sales tax imposed on health insurers and the introduction of more expensive drugs, says Peter Costa, a health-care equity analyst with Wells Fargo Securities. The firm is planning to participate in more state exchanges next year, which could add to its customer base.

But there’s still a lot of uncertainty. Insurance companies like Humana, which get more of their business from Medicare plans, are getting hit harder by cuts to Medicare reimbursement rates that were introduced as part of the ACA.

And at the same time, some insurance companies are facing stronger competition for consumers shopping on new public insurance exchanges, says Vishnu Lekraj, a senior analyst for Morningstar. A look at the proposed health insurance rates for 2015 shows that some insurers that entered the markets with low rates are thinking about increasing prices after gaining market share, while others are planning to lower their rates in an attempt to win over more customers.

Analysts say it’s too early to know how insurance companies will fare after the first open enrollment period, given how little they know about their new customers. Some companies may find the rates they charged are not high enough to cover all of the claims filed. “As we go into next year there will be more clarity,” Costa says.

Pinched by Medicare payments

The health-care law introduced major changes to the ways hospitals are paid and evaluated. Like doctors and insurance companies, hospitals are taking in smaller Medicare payments. And instead of being paid for each service delivered, hospitals are rewarded for keeping patients home — those that readmit a high share of their patients will pay a penalty.

Investors are mostly unaffected by these changes because roughly 80 percent of hospitals are still nonprofit, according to the American Hospital Association. But those who want to invest increasingly need to choose mega hospital networks as more hospitals merge to cope with the higher costs.

Eighty-five hospitals and health systems merged or were acquired in 2013 — up from the 50 deals in 2009, according to Irving Levin Associates, a health research firm. In all, 283 hospitals changed hands last year, the firm’s Lisa Phillips says. By growing in scale, the thinking goes, hospitals can be more efficient at treating patients and may also be able to use their size to negotiate for higher payments, Phillips says. They may also get some relief if emergency rooms see a drop in uninsured patients coming through.

Another group still waiting to see how they will fare following the Affordable Care Act: pharmacies. Large retail pharmacy chains should see greater foot traffic as more consumers fill prescriptions. But stock analysts say the prescription market is really locked down by pharmacy benefit managers, third-party firms that administer prescription drug programs for large groups such as employers and insurance companies.

Those companies, including names like Express Scripts and CVS Caremark (which is a pharmacy benefit manager and retail pharmacy chain in one), serve as a middle player between insurance companies and the rest of the health-care market. The role allows them to use their large customer bases — which could be growing as a result of the ACA — as a means for negotiating lower rates with drugmakers and pharmacies.

“The larger ones have pretty significant buying power,” Acker says, while large pharmacy chains like Walgreens and Rite Aid often have to concede by lowering prices.

But drugs aren’t the only way pharmacies can lure new customers into stores. Many chains, like CVS and Walgreens, are adding retail health clinics inside their stores for people looking to treat minor ailments, such as bronchitis, pink eye and sinus infections. Growth of the clinics, which are staffed by nurse practitioners and physician assistants, slowed during the recession but they are poised to take off once again as more consumers look for convenient and inexpensive ways to be treated for non-urgent conditions. CVS, for instance, has about 850 clinics today but is expecting to have 1,500 clinics by 2017.