While the riskier segments of the markets have come under fire, high-yield bond ETFs continue to attract investors.

For example, the iShares iBoxx $ High Yield Corporate Bond ETF (NYSEArca: HYG) was the fourth most popular ETF play of the quarter to date, attracting $2.6 billion in net inflows, according to XTF data. HYG added $653.7 million in inflows for the past month.

The shift in sentiment is a stark contrast to earlier this year when investors dumped high-yield debt. Despite its recent inflows, HYG still experienced a net outflow of $703.2 million year-to-date. Additionally, the SPDR Barclays High Yield Bond ETF (NYSEArca: JNK) remains one of the most hated ETF plays of the year as investors pulled $2.8 billion from the fund.

Junk bonds have been outperforming in the fixed-income class and remain one of the lone areas in the bond market still pushing out a positive return. HYG rose 1.7% and JNK gained 1.0% year-to-date while the benchmark Bloomberg Barclays US Aggregate Bond index fell 1.1%.

The Federal Reserve’s ongoing rate normalization plans have kept pressure on fixed-income market sentiment. Many anticipate there will be at least one to two more interest rate hikes out of the Fed this year due to strong economic data, like better-than-expected GDP growth and high employment, CNBC reports.

Investors may have favored high-yield, speculative-grade debt due to the ongoing bullish environment as the junk bonds typically capture some of the upside of stocks and see increased returns despite rising rates. However, this bond asset category is more susceptible to risks and is vulnerable to a market pullback.

Todd Rosenbluth, director of mutual fund and ETF research at CFRA Research, argued that the moves in high yield debt reflects investor confidence in the economy and in the high-yield asset category in general. The strong corporate earnings and other economic indicators, along with flat returns from U.S. Treasuries, have pushed investors toward riskier debt options.

“When you see Treasury yields are low, people are more confident in taking a risk to get more yield,” Rosenbluth told CNBC. “Investors in the past have been more fearful of credit vehicles, but we’re in a risk-taking mode right now.”

For more information on the fixed-income market, visit our bond ETFs category.