NEW YORK ( TheStreet ) -- Concerned about rocky markets, investors have been dumping intermediate-term bonds and shifting to short-term issues. Short-term bonds tend to be more resilient when interest rates rise. The flows have been particularly notable among high-yield funds, which hold bonds that are rated below-investment grade.

While investors have withdrawn $3.3 billion from the intermediate-term

SPDR Barclays High Yield Bond

(JNK) - Get Report

this year,

SPDR Barclays Short Term High Yield Bond

(SJNK) - Get Report

recorded inflows of $1.6 billion, and

Pimco 0-5 Year High Yield Corporate Bond

(HYS) - Get Report

attracted $2.1 billion, according to Strong returns have attracted the cash. For the year, SPDR Barclays Short Term returned 3.5%, compared to 1.8% for SPDR's intermediate term exchange-traded fund, according to Morningstar. In comparison, the Barclays Capital U.S. Aggregate index lost 3.2%.

For investors seeking to diversify fixed-income portfolios, the short-term high-yield funds can be intriguing choices. "The short-term ETF gives you an attractive yield with less volatility than you get with longer bonds," says David Mazza, head of ETF investment strategy for State Street Global Advisors, which operates the SPDR funds.

SPDR Barclays Short Term currently yields 4.5%, compared to a yield of 5.9% for the intermediate-term SPDR high-yield ETF. In comparison,

iShares Core Total US Bond Market

(AGG) - Get Report

, which tracks the Barclays Aggregate, yields 2.5%.

Make no mistake, high-yield bonds of all kinds can suffer sizable losses in downturns. During the turmoil of 2008, the average high-yield mutual fund lost 26.4%, and short-term issues also suffered big losses. But below-investment grade bonds can be appealing because they can deliver solid long-term returns. During the past five years, the SPDR intermediate high-yield ETF returned 10.7% annually, compared to 4.6% for the Barclays Aggregate.

The most important reason to consider high-yield funds is they can help to diversify portfolios, sometimes rising when most bonds are falling. When rates climb, Treasuries and other high-grade bonds tend to fall as investors bid down existing bonds and search for new issues with higher yields. Rising yields can also hurt high-yield bonds somewhat because their income becomes less competitive. But high-yield bonds can appreciate during times when a growing economy is pushing up rates. In such periods, investors tend to bid up high yield prices because default risks are lower.

To limit risks in difficult periods, some investors may prefer holding a short-term high yield fund. But over the long term, funds with greater average maturities and higher yields are likely to outperform. One solution is to hold a short-term fund and a longer portfolio. David Mazza of State Street Global Advisors argues his two high-yield ETFs can complement each other. While the short-term funds has securities with maturities of 0 to five years, the intermediate choice has most of its assets in maturities of five to 10 years.

To hold short-term high-yield securities in an actively managed mutual fund, consider

Osterweis Strategic Income

(OSTIX) - Get Report

. This year the fund returned 4.5%. Portfolio manager Carl Kaufman has the flexibility to buy a variety of kinds of bonds, but in recent years he has focused on short-term high yield issues. He says that the short bonds provide relatively attractive yields. "You are not getting paid a whole lot more to buy an eight-year bond than you are to buy a two-year bond," he says.

While many bond funds hold hundreds of issues, Kaufman runs a more concentrated portfolio, owning about 100 names. He shops carefully, looking for undervalued names. When he can't find bargains, Kaufman holds cash. At the end of the second quarter, the fund had 14% of assets in cash. That helped to cushion the fund when interest rates rose in June and many high-yield bonds sank.

Kaufman often puts his cash stake to work when high-yield bonds suffer one of their periodic corrections. During the downturn of 2008, he scooped up bonds at depressed prices. He figures that another buying opportunity will appear soon enough. "The market is very nervous right now," he says. "If there are surprises from the

Federal Reserve

or the economy, bonds will fall, and that will be a good time to buy."

Follow @StanLuxenberg

This article was written by an independent contributor, separate from TheStreet's regular news coverage.

Stan Luxenberg is a freelance writer specializing in mutual funds and investing. He was executive editor of Individual Investor magazine.