Bond funds were put to the test in recent months as interest rates spiked, causing bond prices to sink.

More of the same kind of volatility may be arriving in the months and years ahead, making it difficult for investors to depend on bond funds for safety and stability as well as income.

One of the best tests of how they will perform in the next few years is how particular bond funds fared in recent months. Bottom Line/Personal asked leading bond fund expert Robert M. Brinker to sort through this year’s turmoil to identify likely future gainers and laggards…

GOOD VS. BAD

Interest rates on the benchmark 10-year Treasury bond shot up from 1.6% on May 1 to as high as 2.7% recently, causing many investors to flee. In the month of June alone, investors withdrew $62 billion from bond mutual funds and exchange-traded funds (ETFs), surpassing the previous record of $42 billion in withdrawals set in October 2008. Nearly $10 billion of that total came from the Pimco Total Return Fund, the biggest bond fund of all, run by the legendary manager Bill Gross.

That doesn’t mean you have to shun all bond funds—but you certainly should think twice about holding those that are most vulnerable. Certain types held up relatively well in the second quarter and have positive returns this year through August 1 despite the jump in interest rates. These include high-yield bond funds and floating-rate bank-loan funds, although both could suffer if the economy weakens.

WHAT TO AVOID

The outlook for the following types of funds is bleak…

Long-term Treasury and corporate bond funds. They are almost guaranteed to be big losers as interest rates rise. The Barclays US Treasury 20+ Year Index fell a staggering 6% in the second quarter and is down 12% this year. Reason: Other things being equal, the longer the period until an existing bond matures, the more its value drops when interest rates rise. You easily can gauge the interest rate risk of any bond fund by checking a figure known as “duration” on Web sites such as Morningstar.com. I am advising my clients to avoid funds with Treasuries or corporate bonds that have an average duration of more than six years.

Short-term Treasury and corporate bond funds. It’s true that the Barclays US Treasury 1–3 Year Index fell only 0.1% in the second quarter and is up 0.2% for the year. But with a recent yield of just 0.3%, funds that hold these types of bonds are not attractive now because you can open a money-market account at an online bank with yields as high as 1%.

Municipal bond funds. The benchmark S&P National AMT-Free Municipal Bond Index has a tax-equivalent yield of 4.5% if you are in the highest tax bracket. But with a duration of 6.5 years and continuing investor concern over cash-strapped municipalities, muni bond performance turned ugly in the second quarter, ending with a loss of 3.2% (and 3% overall for the year). Given the risks of further rate hikes, these funds aren’t bargains even after a big drop in share prices. If you want to own munis now for after-tax income in the future, purchase only the highest-quality individual munis and only if you can hold them until maturity. That way, you won’t be vulnerable to price drops triggered by rising interest rates.

Emerging-market government bond funds. These failed to provide much diversification away from US government bonds. The Barclays Emerging Markets Local Currency Index lost 6% in the second quarter and is down 4.5% for the year. Most of these bond funds are denominated in foreign currencies, which have weakened considerably against a US dollar with a relative value that has been pushed up by rising US interest rates.

Treasury Inflation-Protected Securities (TIPS). The Barclays US Treasury Inflation-Protected Securities Index plummeted 7% in the second quarter and is down 6% for the year. TIPS funds often do well in rising-rate environments and growing economies because those factors typically produce inflation. When inflation rises, the principal of your TIPS bond is adjusted upward, so the amount of your semiannual payments automatically goes up. But investors don’t want that kind of protection now because inflation is running at an annual rate of less than 2% and could stay low for years. Example of a fund hurt by TIPS…

Pimco Total Return Fund (PTRRX). This fund fell 3.8% in the second quarter, its largest quarterly loss ever, after Gross loaded up the portfolio with TIPS in the belief that fears of inflation would rise in 2013. Smaller, more nimble multisector bond funds that can unwind losing positions quickly will have a significant advantage.

WHAT TO FAVOR

Various kinds of bond funds have an attractive outlook despite rising rates. Examples of these funds include…

Fidelity Floating Rate High Income Fund (FFRHX). Floating-rate or bank-loan funds are among the few types seeing net inflows rather than withdrawals of investor assets, adding more than $25 billion through the first six months of the year. They have been the best-performing bond category this year because they carry very little interest rate risk. These funds buy loans made by major banks to corporations with lower-quality credit ratings. The rates on these loans typically reset every 30 to 90 days, adjusting as market interest rates change. Bank loans are safer than junk bonds because they have lower default rates (about 1.4% over the past year). The Fidelity fund, with a recent 2.4% yield, lost just 0.2% in the second quarter and is up 2.4% so far in 2013.

Fidelity Capital & Income Fund (FAGIX). High-yield (junk bond) funds are less sensitive to interest rate moves than most other bond fund types and are the second-best-performing bond category in 2013. They lost 1.4% in the second quarter, which actually was better than the Barclays Aggregate Index, the benchmark for the investment-grade US bond market. This fund, which recently yielded 4.8%, has less volatility than most of its peers because it takes a more conservative approach, keeping one-third of its assets in bonds rated BB or higher. The fund lost just 1.4% in the second quarter and is up 3.8% for the year.

Important: Junk bond funds are not bulletproof. If we hit another deep economic recession such as that in 2008–2009, they will provide little protection, and you will want to be in higher-credit-quality investments.

Loomis Sayles Bond Fund (LSBRX). Multisector funds can thrive in rising-rate environments because they have great flexibility to look for bargains and focus on what’s working in a variety of fixed-income sectors, maturities and countries. This fund has been run for nearly two decades by the well-respected manager Dan Fuss. The fund lost just 1.5% in the second quarter and is up 2% this year. Fuss accomplished this by lowering the fund’s average duration to five years and investing 20% in high-yield corporates and about 10% in convertibles, a stock/bond hybrid that has benefited from the rise in the US stock market this year. Like junk bond funds, however, this fund often performs poorly when the stock market falters.