What hedge funds are buying

allergan
Botox maker Allergan was one of hedge funds' top picks last quarter.

For hedge funds, healthcare was hot, media was not lately.

The 50 largest funds snapped up shares of big health care names such as Allergan (AGN), Actavis (ACT), and Covidien (COV) in the second quarter in an effort to capitalize on the wave of mergers and acquisitions in the sector, according to data from FactSet.

Hedge funds are legally required to disclose their holdings four times a year.

The disclosures don't list the exact date that hedge funds actually bought and sold stocks or whether they still own them, but the data provides a key look at how some of the world's biggest players in finance are reading the markets.

Botox-maker Allergan was particularly interesting. The stock surged early in the second quarter after hedge fund manager Bill Ackman said his fund, Pershing Square Capital, had formed a partnership with Valeant (VRX) in an effort to acquire Allergan. Pershing Square Capital was also the biggest buyer of Allergan stock, as Ackman sought to persuade the company to take the deal. The SEC is reportedly examining Ackman's hostile takeover bid.

Related: The 'Bill Ackman IPO': Hedge fund going public

The other big story of the quarter in health care was the move to dodge U.S. taxes. Dublin-based Covidien skyrocketed in June after medical device manufacturer Medtronic (MDT) agreed to buy the company in a $43 billion so-called inversion deal. The idea is that Medtronic would relocate overseas to take advantage of Ireland's low tax rate.

Though technically legal, such acquisitions have come under scrutiny because they seek to skirt U.S. taxes, and the Obama administration is looking for ways to stop them. Republicans argue that they are a byproduct of a heavy corporate tax burden.

Obama on tax inversion: 'It's not fair'
Obama on tax inversion: 'It's not fair'

Health care wasn't the only thing on hedge funds' buy list. Apple (AAPL) was the second largest purchase, with the funds increasing their exposure to the tech giant by 27% from the first quarter. The stock has had quite a run in recent months and is trading at all-time highs.

In the "sell" category, were some popular media stocks, including Twenty-First Century Fox (FOXA), Disney (DIS), and Time Warner (TWX), according to the data Factset compiled from the quarterly filings.

Related: Stock market bubble warnings grow louder

That means hedge funds likely missed out on the action. In the third quarter, Fox made a failed bid for Time Warner. The news of the deal initially sent Time Warner stock soaring and Fox falling. Fox has recovered value since it withdrew its bid, while Time Warner has held on to only some of its gains.

Still, hedge funds didn't ditch all media. Netflix (NFLX)experienced a 9% bump in ownership from the largest funds.

Large cap financial stocks also didn't get much love last quarter. The top funds reduced their stakes in JPMorgan (JPM) by 15% and Citigroup (C) by 5%.

CNNMoney Sponsors