The BofA report showed the equity market rally is broadening beyond the mega caps, as U.S. small cap funds logged their largest weekly inflow in the week to Wednesday since June 2022, at $5.1 billion.

BofA said in its weekly roundup of fund flows in and out of world markets citing EPFR data, that flows to cash were running at an annualised rate of $1.3 trillion in the first weeks of 2024 through to Feb. 21.

Investors can often opt for cash when they are less confident, but with interest rates at elevated levels and looking less likely to drop in the very near term, cash-equivalent money market funds have drawn in flows.

In the latest week, as the S&P 500 hit record highs, investors put $15.2 billion into bonds, including $10.2 billion into investment-grade bond funds, which logged a 16th straight week of inflows, the longest such stretch since October 2021, BofA said.

The S&P this month topped the 5,000-mark for the first time ever, thanks to a surge in the so-called "Magnificent Seven" most valuable stocks that include the likes of Apple, Microsoft and AI darling Nvidia.

BofA's "Bull & Bear" indicator remained at 6.6 for the latest week, tilting into "bullish territory", but the bank said this was not overly stretched.

On a scale up to 10, a reading above 6 is straying into bullish territory and below 5 is moving into bearish territory.

"Positioning (is) not yet at extreme bullish, but (it) won't take too long," BofA said in the report.

Last week was also the first time since September that both energy and raw materials funds registered a weekly inflow, according to the report.

(Reporting by Amanda Cooper; Editing by Alun John and Susan Fenton)