Health Care Select Sector SPDR (NYSEArca: XLV) is trying to break resistance to a new lifetime high as investors bet an aging population and healthcare reform make the sector an attractive long-term portfolio holding.

The ETF’s top five stocks are Johnson & Johnson (NYSE: JNJ), Pfizer (NYSE: PFE), Merck (NYSE: MRK), Amgen (NasdaqGS: AMGN) and Gilead Sciences (NasdaqGS: GILD).

The fund gained about 17% in 2012 to edge out the S&P 500.

“Historically defensive and noncyclical, the health-care sector is seeing added growth from an aging America. Demand is relatively stable because people require treatment regardless of the economy, and baby boomers needing greater treatment make for a compelling secular-growth story,” Morningstar analyst Robert Goldsborough writes in a report on XLV.

“An aging population bodes well for the industry’s future prospects because the majority of people’s lifetime medical costs are spent in their final few years,” he added. “The health-care sector has hit a lull in recent years, as some key blockbuster drugs have lost exclusivity, prompting a blitz of competition from generic drug firms.”

The healthcare fund got a boost after President Barack Obama won a second term in the election, making healthcare reform appear more secure. [Healthcare ETFs: A Post-Election Buying Opportunity?]

However, the ETF has been choppy in recent weeks within a trading range. A breakout would take XLV to new all-time highs. [ETF Spotlight: Healthcare and the Affordable Care Act]

Goldsborough at Morningstar points out that the ETF is tilted toward Big Pharma firms, which comprise about half the portfolio. “Thanks to its heavy concentration, the fund is heavily leveraged to the pharmaceutical industry’s unique risks, such as patent expirations, generic competition, and government regulation,” he said.

Health Care Select Sector SPDR