In a time of gloom, high-yield bond funds have delivered upbeat results. During the three months ending March 5, the funds returned 5.8%, while the S&P 500 lost 21.5% of its value, according to Morningstar.

The high-yield performance is noteworthy because the funds often track stocks. High-yield funds hold bonds that are rated below investment grade. When the outlook for stocks deteriorates, prices of low-quality bonds may fall because investors worry about rising defaults.

So why did junk issues rise when stocks dipped? Junk proponents say bond prices had simply gotten too cheap as investors panicked last fall and dumped all kinds of securities.

Junk portfolio managers explain that the high yields compensate investors for the risks of default. When default risk increases, bond prices sink and yields rise. In the fall, yields skyrocketed, as investors sold bonds.

The autumn decline was the steepest recorded since Morningstar began tracking the funds in 1979. During the six months ending in November, junk funds lost 30.3%. The second-worst drop came in the last half of 1990, when the funds sank 10.2%.

As bonds suffered outsized losses last year, yields topped 20% on many issues. Since then, yields have dropped, but they remain rich. The yield on Merrill Lynch's High-Yield 100 index is 12.8%, an attractive payout at a time when 10-year Treasuries yield only 2.81%.

While the junk yields are tempting, investors should consider the risks before jumping aboard. Historically about 4% of junk bonds default every year. Lately, defaults have been running at an annual rate of 3%, but that is bound to change.

If you liked this article you might like

8 Great Consumer Stocks for 2017

Prestige Brands Stocks Up on Personal Products

L'Oréal Will Apply IT Cosmetics for $1.2B

Prestige Brands (PBH) Stock Closed Up on Q4 Earnings

New Lifetime High For Prestige Brands Holdings (PBH)