Don't dump health stocks just because the GOP tells you to

If you believe the Republican presidential candidates, the Affordable Care Act is a cancer and they're the chemotherapy America needs.

"Our health care is a horror show," Donald Trump said at a debate in January. "Obamacare, we're going to repeal it and replace it."

In Iowa, Ted Cruz told voters ACA is "the biggest job-killer in this country." (That claim was later rated "pants on fire" by Politifact.)

Republicans all have promised to "repeal and replace" or at least significantly revise the ACA.

But how does that investor anxiety hold up in the real world? It depends on the vantage point. Health care has held up well since the unveiling of Obamacare, but has done poorly since the election season kicked off.

Investors are not dumping stocks in pharmaceuticals, medical equipment and biotech.

There's also doubt whether a Republican will be able to repeal the law. So in the long run, that might not be such a healthy investment strategy.

There's no denying that the ACA has been good for at least one group: the health-care industry. The S&P health-care sector has outperformed the S&P 500 by 33 percentage points since President Barack Obama signed the law in 2010, according to Kensho, a data analytics firm.

In fact, Kensho's data show the second-best Dow component in that time is UnitedHealth Group, which gained more than 300 percent since 2010.

After all, getting 20 million people on insurance rolls increased the number going to see doctors, having lab tests run and buying prescription drugs. That means big profits for medical and pharmaceutical companies. And major research for biotech firms.

Kensho's data show that health-care stocks don't trade significantly different than the rest of the market around GOP debates. In fact, they've slightly outperformed the market the day after.

But a broader look shows health-care stocks are down 9 percent versus the S&P 500 since the election season kicked off in August. Particularly weak have been biotech stocks, which are down 11 percent over the past 12 months.

It's possible that health-care investors see the writing on the wall: That 105 percent they've gained over the past six years could be all they can squeeze out of changes to the medical insurance industry.

Disclosure: NBCUniversal, parent of CNBC, is a minority investor in Kensho.