BOSTON ( TheStreet) -- High-yield bond funds have soared 33% so far this year, prompting investors to deposit $14.6 billion. If you're inclined to join the crowd, ponder the complicated track record of the funds, which hold securities that are below investment grade. Over the years, junk bonds haven't always generated big returns. During the decade ending in June, the S&P 500 Index lost 2.2% annually, and the Barclays Capital Aggregate U.S. Bond Index gained 6%. Meanwhile, high-yield funds returned 2.9%, finishing about halfway between the stock and bond benchmarks. High-yield funds landed in the middle of the field during the market collapse of 2008 and in the rally of 2006. Why does junk occupy a middle ground? During periods when the economy is improving, stocks may rise since investors believe that companies will be worth more. Investors also bid up junk-bond prices as the risk of default recedes. But junk doesn't usually increase as rapidly as stocks because bondholders are lenders, not shareholders who can enjoy the full benefits that occur when a business succeeds. During downturns, junk falls less rapidly than stocks. The rich bond yields serve as a cushion, providing income to investors during periods when stocks are plummeting. While junk can help to stabilize a portfolio, investment-grade bonds offer the best protection, sometimes rising when stocks fall. Why bother with junk bonds at all? By putting a bit of assets into junk, long-term investors can diversify portfolios. Those who don't want to hold junk over the long term may still find it appealing during the occasional periods when high-yield markets become deeply depressed. After such downturns end, junk often rockets up.