Traditionally, health care is considered a “safe haven” stock sector that tends to outperform in flat or bear markets but is prone to foot dragging during more bullish times. But over the last few years, its strong performance has straddled both sides of the fence.

The oldest and largest ETF in the sector, Health Care Sector SPDR (XLV), showed defensive value during 2008’s sharp downturn, when it fell 23%, compared with 37% for the S&P 500 index. In 2011, a tepid year for the market, it beat the index’s 2% return by over 10 percentage points. More uncharacteristically, the ETF also launched a strong offense during the bull markets in 2013 and 2014, when it outperformed the broader index by a wide margin.

Investors have responded by pouring money into the sector. The three largest ETFs—the SPDR offering, the iShares Nasdaq Biotechnology fund (IBB) and the Vanguard Health Care fund (VHT)—saw net inflows of $3.6 billion in 2014, up from $2.2 billion the year before.

A number of developments helped push fund flows and prices higher last year. The Affordable Care Act promised to provide a tailwind for hospital companies and health insurers, which stand to benefit from increased usage by paying customers and increased enrollments. New drug introductions pushed biotechnology higher, while generous yields on big pharmaceutical stocks attracted investors in a stubbornly low rate environment.

On a global level, emerging markets spending on health care continues to grow at a much faster clip than other areas of the economy, while an aging population is boosting demand for services. And industry consolidation is bringing greater efficiency and lower costs to companies both here and abroad.

Despite favorable longer-term trends, however, a number of developments argue in favor of buying on dips. The future of the Affordable Care Act became more clouded when Republicans took control of the U.S. House and Senate after the November elections. Government steps to discourage so-called “tax inversions” with foreign companies could have an impact on mergers and acquisitions. And after a long bull run, some analysts worry that current valuations have become a bit stretched.

In his 2015 U.S. equity markets outlook, Morgan Stanley U.S. equity strategist Adam Parker downgraded the health-care sector from overweight to market weight positioning. “After recommending health care for the last four years, we are now reducing our outlook based on more balanced risk-reward,” he noted. “While we still prefer health care to consumer staples among the classic defensive sectors, health-care price-to-forward-earnings multiples have now expanded to 10-year highs and look more in line with group multiples from the 1980s and 1990s.”

Even some health-care mutual funds managers think it may be time for a breather. In his third quarter 2014 report to shareholders, T. Rowe Price Health Sciences Fund manager Taymour Tamaddon noted that after five years as a standout performer, the sector “is likely to cool off and trade more in line with the broad equity market. Part of our reasoning is that health-care utilization rates are likely to remain depressed due to a proliferation of insurance plans that include higher out-of-pocket costs for patients.”

But the report ends on a more optimistic note by adding that the sector “represents one of the attractive growth areas in the global economy.”

For those who agree, the ETF universe offers more than two dozen health-care sector options. Some of them focus on the broader universe of health-care stocks, while others zero in on specific areas such as biotechnology or pharmaceuticals.