U.S. equity funds saw a record inflow of $40.3 billion in July, according to data from TrimTabs, as the S&P 500 and Dow Jones Industrial Average scale new heights in what some are calling an "invincible summer" for the country's stocks.
"Fund flows in the past two months were by far the most volatile we have ever measured. After ignoring equities and dumping bonds at a record pace in June, fund investors poured record sums into U.S. equities and continued to sell bonds in July," the investment research firm wrote in a report published late Sunday.
Fund investors ended their "love affair" with bonds this summer, pulling $21.1 billion out of debt mutual funds and exchange-traded funds (ETFs) in July, after record outflows of $69.1 billion in June. The outflows in June and July brought an end to 21 straight months of inflows.
If investors continue to dump bonds, sending yields higher, the Federal Reserve may have to re-think its plans for tapering, said TrimTabs.
According to the firm's research, more of the money that has come out of bonds is being held in cash rather than invested in the equity market.
In the eight weeks ended July 22, $110.9 billion went into savings deposits, while $32.5 billion entered into retail money market funds.
The combined inflow of $143.4 billion is almost triple the $54.1 billion that flowed into equity mutual funds and ETFs in June and July.
"There is definitely a 'rotation' underway in the investment world, but it is premature to call it 'great,' and the 'rotation' is funneling more money into cash than equities," TrimTabs said.
(Read More: So much for that pullback idea: Stocks keep climbing)
"Given the lofty valuation of the U.S. stock market, we cannot blame investors - particularly those with a long-term outlook - for favoring cash over stock. From a contrarian perspective, it is extremely bearish that so much money is pouring into U.S. equity ETFs," it added.
The S&P 500 is trading at a price-to-earnings ratio of 17.7, compared to 13.6 for the U.K.'s FTSE 100, for example.
According to American financial services firm PNC, which published a report titled 'Invincible Summer' over the weekend, the market looks fairly valued given better economic data and positive earnings. In the second quarter earnings season, more than half of the companies that have reported have beat estimates, according to Reuters.
(Read More: 4 stocks under $10 making big moves)
Despite double-digit gains in U.S. stocks this year, PNC expects the market will continue to provide attractive returns in the months to come.
"The U.S. economy will continue to avoid recession, but growth will continue to be modest. Stocks in this environment may continue to provide attractive relative returns as single-digit intrinsic earnings gains are bolstered by stock buybacks and dividend yield," it said.
By CNBC's Ansuya Harjani; Follow her on Twitter @ Ansuya_H