The iShares 7-10 Year Treasury Bond ETF, which holds middle-maturity U.S. Treasury bonds, continued to rank in the top 10 funds in terms of new money in the first half. The fund, which holds nearly $5 billion, is up nearly 4 percent for the 12 months through July 18, compared with 4.2 percent for the Barclays U.S. Aggregate Total return index, a benchmark for U.S. Treasuries. The fund charges 0.15 percent in annual expenses.

While investors were able to squeeze a bit more out of bond returns in the first half of this year, they may be living on borrowed time.

The U.S. Federal Reserve confirmed recently that it would be ending purchases of U.S. Treasury bonds and mortgage-backed securities in October. This stimulus program, known as "QE2," has kept interest rates artificially low as the economy has had a chance to recover.

The phasing out of QE2 could be bearish for bond funds.

Will interest rates climb to reflect growing demand for credit and possibly higher inflation down the road? How will the ending of the Fed's cheap money program affect U.S. and emerging markets shares?

Many pundits believe public corporations may pull back from their enthusiastic stock buybacks and trigger a correction. Yet low inflation and modest employment gains may mute bond market fears.

"The Fed is on track to complete tapering in the fourth quarter, and we think there is essentially no chance that it will move the fed funds rate higher this year," Bob Doll, chief equity strategist with Nuveen Investments in Chicago, said in a recent newsletter.

"With the 10-year Treasury ending the quarter at 2.5 percent, the yield portion of this forecast is more uncertain," Doll added, "although we expect yields will end the year higher than where they began."

While there could be any number of wild cards spoiling the party for stocks, it is wise to ignore short-term trends and prepare for the eventual climb in interest rates.

That means staying away from bond funds with long average maturities, along with vehicles like preferred stocks and high-yield bonds that are highly sensitive to interest rates.