Hedge funds love…Carl Icahn and Bill Ackman?

Bill Ackman and Carl Icahn
Adam Jeffery (L) | David Grogan (R) | CNBC
Bill Ackman and Carl Icahn

Bill Ackman and Carl Icahn are famously on opposite sides of the Herbalife trade, but other hedge fund managers love bets made by both billionaires.

The largest total stock investment by hedge funds is in Icahn holding-company Icahn Enterprises, followed by Allergan, a large position for Ackman's Pershing Square Capital Management, according to a new analysis of about $1 trillion in assets managed by more than 250 hedge funds.

After Icahn and Allergan, the next largest hedge fund holdings were index fund Vanguard Emerging Markets, General Dynamics and Microsoft, according to an AlphaClone compilation of recently released "13F" public filing data at the end of the second quarter. AlphaClone manages an exchange-traded fund and other products that help retail investors mimic the publicly reported portfolios of private hedge fund managers.

Read MoreHow David Tepper played 'nervous time' market

The popularity of activist investing—whereby money managers take stakes in companies and then push them to make changes in hopes of increasing their value—comes as Icahn touted the strategy.

"I believe that the kind of shareholder activism that IEP practices has been extremely successful because we seek to bring true corporate democracy to the companies we are involved with through exercising our rights as shareholders to hold CEOs accountable and change unproductive management that needs to be changed," Icahn wrote in a recent published note.

"I believe that America needs this to correct the economic course we are on and push back against the approaching storm clouds resulting from the many problems we face today, including a major asset bubble that continues to grow."

Read MoreIcahn sees 'major asset bubble,' touts activists

Largest Hedge Fund Holdings (by total dollars invested)
Icahn Enterprises (IEP)
Allergan Inc (AGN)
Vanguard Emerging Markets (VWO)
General Dynamics (GD)
Microsoft (MSFT)
Most Popular Hedge Fund Holdings (by number of funds owning shares)
Apple (AAPL)
Facebook (FB)
American International Group (AIG)
Actavis (ACT)
Microsoft (MSFT)
Largest New Hedge Fund Positions
Ally Financial (ALLY)
Allergan (AGN)
Time Warner Cable (TWC)
Bank of New York (BK)
Comcast (CMCSA)

Read MoreTop U.S. hedge funds up Walgreen shares; lose some taste for Apple

Three of the top five stocks held by the most hedge funds were technology related: Apple, followed by Facebook (second) and Microsoft (fifth). Other popular tech sector holdings were Micron Technology and Priceline.

Notable new holdings revealed in the filings include David Tepper's Appaloosa Management's stake in Mohawk Industries, Paul Singer's Elliott Management's purchase of Anadarko Petrolium, Chase Coleman's Tiger Global getting in Netflix and Leon Cooperman's Omega Advisors snapping up Navient Corp. shares, according to the analysis.

Read MoreAlpha addict: The amazing career of Leon Cooperman