Investors have piled into high-yield bond ETFs this year. However, investors stretching for yield need to be aware of the liquidity-related risks of this sector.

The two largest ETFs for this asset class are the $15 billion iShares iBoxx High Yield Corporate Bond Fund (NYSEArca: HYG) and the $10.9 billion SPDR Barclays Capital High Yield Bond ETF (NYSEArca: JNK).

Year to date through the end of June, HYG gathered net inflows of $3.8 billion while investors shoveled $1.6 billion into JNK, according to data from the ETF Industry Association.

It’s not surprising that speculative-grade debt ETFs have been popular with 10-year Treasury notes yielding a paltry 1.5%. JNK has a 30-day SEC yield of 6.8% while HYG offers 6.5%.

However, high-yield bond ETFs have hidden dangers investors should consider. Specifically, the funds can trade at a premium or discount to net asset value. [High-Yield ETFs Hit Rough Patch]

“When many investors seek to buy, the ETF shares can sell for a premium to the value of the assets in the fund. During hard times, the shares can trade at a discount,” writes Stan Luxenberg at TheStreet.com. “Funds that hold highly liquid assets, such as the stocks of the S&P 500, rarely trade at big premiums or discounts. But the price of high-yield funds can vary.”

Currently, JNK and HYG are trading very close to indicative value, so they aren’t exhibiting premiums or discounts. But that hasn’t been the case at times when the high-yield bond market is unsettled or volatile. [Sell-Off Pushes Junk Bond ETFs to Discounts]

When ETFs sell at premiums, investors should move cautiously, Paul Amery, editor of IndexUniverse.eu, told TheStreet. “You should only buy at a premium if you think that the market is going to continue to rise,” he said.

“In the past, disruptions in the bond markets have caused this fund to experience significant swings in the premium and discounts to its net asset value,” investment researcher Morningstar says in analyst reports on JNK and HYG. “While we believe that the problems actually lie in the markets of the underlying securities, investors should be aware of the premium or discount to NAV before purchasing this fund and be prepared to handle the gyrations.”

iShares iBoxx High Yield Corporate Bond Fund

Full disclosure: Tom Lydon’s clients own HYG and JNK.