IMAGE CREDIT: TBIT ON PIXABAY.

It was a good week to have money in the markets, as the S&P 500 inched 0.80% higher during the past few trading days. The famous index has now fully recovered from its horrendous start to the year and has crossed into positive territory year to date.

However, those gains didn't find their way into the healthcare sector this week, as many of the most popular ETFs that invest in the industry ended the week in the red. Healthcare ETFs had such a poor performance that this week's top performer -- the iShares Dow Jones US Healthcare Provider ETF (IHF 0.93%) -- still showed a 0.69% loss during the period.

IHF Price Chart

IHF Price data by YCharts

Still, this was a much better showing than many other healthcare ETFs, most of which dropped at least 2% in value.

So what's inside the iShares Dow Jones US Healthcare Provider ETF that allowed it to largely sidestep the sectorwide sell-off this week?

Peaking inside
One way the IHF sets itself apart from other healthcare ETFs is that is keeps the bulk of its assets concentrated in just a handful of stocks. You might assume that doing so would make the fund's share price quite volatile, but in fact the opposite is true. This fund sports an equity beta of only 0.48, meaning its volatility is less than half of the markets in general.

How does the fund manage to do so? Its trick is to keep the majority of its assets in a handful of giant health insurers, which tend to have stock prices that are less volatile than average. 

Take a quick glance at this fund's current top 10 positions to see what I mean:

CompanySymbol% Assets
UnitedHealth Group UNH 14.15%
Aetna AET 6.92%
Express Scripts Holding Company ESRX 6.91%
Anthem ANTM 6.69%
Cigna CI 6.62%
Humana HUM 5.55%
HCA Holdings HCA 5.07%
DaVita Healthcare Partners DVA 3.21%
Laboratory Corporation of America LH 3.03%
Universal Health Services UHS 2.91%

DATA SOURCE: ISHARES.

Five of this fund's top 10 holdings are giant health insurance companies. Those companies make up nearly 40% of the fund's total assets, so when health insurance stocks outperform the healthcare sector in general -- as they did over the past few trading session -- then the IHF tends to outperform.

What went right this week?
The majority of this fund's top holdings put up relatively muted performances this week. With earnings season in the rearview mirror, there simply wasn't a lot of big news to justify huge price swings from the group.

However, two of the fund's top holdings -- DaVita Healthcare Partners (DVA -1.20%) and UnitedHealth Group (UNH 2.96%) -- put up a decent performance this week, each posting a gain of more than 1%.

UNH Price Chart

DaVita HealthCare Partners was in the news this week, recognized by Fortune magazine for the ninth year in a tow as one of the world's most admired companies. Fortune also ranked DaVita first for innovation in the healthcare medical facilities category, its sixth such honor. 

UnitedHealth Group was in the news, too. The company announced that OptumRx, United's pharmacy benefit manager division, has signed an agreement with retail pharmacy giant Walgreens Boots Alliance (WBA -0.23%), in a deal that will allow OptumRx customers to fill their 90-day prescriptions at any one of Walgreen's retail stores for the same cost as the company's mail deliver service, which quite often is cheaper. The deal will kick off at the start of 2017.

While the financial terms of the deal weren't released publicly, the agreement looks like it could be a big win for UnitedHealth Group, since it will give OptumRx customers a more convenient way to pick up their drugs. That could help it compete more effectively against its main rivals, CVS Health and Express Scripts.

What's next for the IHF?
The healthcare sector has been in the doghouse for several months now, as investors flee from the biotech sector. Several ETFs that invest primarily in biotech stocks are down more than 25% year to date. 

With that kind of carnage, investors worried that the sell-off could continue might want to give the IHF a closer look, since it offers a lower-risk way to put money to work in the healthcare sector.