The hedge funds' net purchases occurred in a week when the S&P 500 index posted a record high close on Friday for the first time in two years, amid a rally in chipmakers and mega-cap technology stocks.

Still, hedge funds are net sellers of roughly $2 billion in shares on a year-to-date basis, BofA said.

Last week, hedge funds bought mainly exchange-traded funds (ETFs), adding over $200 million of those securities, and large-cap companies. Energy and healthcare were the two top sectors for hedge funds' acquisitions last week.

Overall, BofA said it saw the biggest inflow into U.S. equities since mid-December when all of its clients, including hedge funds, institutional and retail investors, and companies, were factored in.

(Reporting by Carolina Mandl, in New York; Editing by Paul Simao)