BoFA's weekly Flow Shows report said that investors put $64.2 billion into cash funds in the week to Wednesday. They pulled $3.4 billion from equity funds across the week, while putting $4.5 billion into bonds.

Bond fund managers are attracting inflows after a brutal three years, with many investors hoping that interest rates have now peaked and that yields can fall from here.

Yet they are competing with money market funds, which invest in highly liquid short-term debt products, such as those issued by governments or highly rated companies.

Central banks have raised short-term rates to their highest levels in more than a decade to tame inflation, making yields on money market funds attractive.

BofA's data stretches to Wednesday, meaning it fails to fully capture the powerful market rally that started that day and continued on Thursday after the Federal Reserve and Bank of England held interest rates steady for the second meeting in a row, boosting stocks and bonds.

The bank said investors had put money into bonds for four straight weeks. In the week to Wednesday they preferred U.S. shorter-dated bond funds, with $5.2 billion of inflows.

European stocks have been particularly out of favour, with outflows for the past 34 weeks, including $1 billion most recently.

So far this year, U.S. stocks have massively outperformed Europe. The benchmark U.S. S&P 500 stock index is up around 13% for the year, compared with a 3% rise for Europe's STOXX 600.

The yield on the 10-year U.S. Treasury, which underpins the global financial system, rose to a 16-year high above 5% last week but has since dropped around 35 basis points. Yields move inversely to prices.

BofA said its Bull & Bear indicator of investor sentiment was at 1.4, the lowest since November 2022. Yet the bank said that was a "contrarian buy signal", given that sentiment could well improve from depressed levels.

(Reporting by Harry Robertson, editing by Alun John and Louise Heavens)

By Harry Robertson