LONDON, Feb 16 (Reuters) - Investors dumped cash and continued to pour money into equities, particularly tech stocks, and investment grade bonds in the week to Wednesday, Bank of America said in a report on Friday.

There were inflows of $16.1 billion to stocks, and $11.6 billion to bonds, compared to outflows of $18.4 billion from cash, the most in eight weeks, BofA said in its weekly roundup of fund flows in and out of world markets, using EPFR data.

The relentless and rapid rise of large U.S. tech stocks - often referred to as the Magnificent Seven - in part driven by optimism around generative AI - has powered U.S. shares higher in recent months. The benchmark S&P 500 is trading around record highs.

Tech equity funds saw their sixth straight week of inflows and $2.3 billion of inflows in the week to Wednesday, Feb. 14, alone, BofA's report said.

With the large tech stocks attracting the most attention, and the rest of the market comparatively little, BofA said the S&P 500's breadth was now the worst since 2009, and also compared the current situation to other high profile bubbles.

The 'Magnificent Seven' currently trade at 45 times their earnings in the past 12 months. "It ain't cheap, but true that bubble highs have seen dafter valuations," BofA said, pointing to a 67 times trailing price to earnings ratio for Japan's Nikkei in 1989, during its boom, and a 65 times ratio for the Nasdaq in 2000 at the height of the dotcom bubble.

The Nikkei is yet to surpass its 1989 peak, but has rallied sharply in recent months and closed on Friday on the cusp of setting a new all-time high.

The Magnificent Seven have gained 140% in the past 12 months, compared to a 150% gain for 50 large cap U.S. stocks in the 1970s, then known as the Nifty 50, and a 180% rise in the Dow Jones in 1920s. (Reporting by Alun John; Editing by Amanda Cooper and Susan Fenton)