(Bloomberg) -- Investors are rushing back into U.S. junk bonds with funds that buy the risky debt poised to see the biggest inflows since April.

The funds have seen about $2.2 billion of cash pour in for the week ended Oct. 20, according to estimates from JPMorgan Chase & Co. analysts. If that number holds when Refinitiv Lipper reports final data later on Thursday, it will mark the biggest influx since the week ended April 7.

It shows a shift in risk appetite following two straight weeks of outflows, including a $1.8 billion withdrawal last week, the biggest since June. A jump in yields has made junk bonds more appealing after rising about 30 basis points since the start of September, closing at 4.16% Wednesday. 

Bill Zox, a high-yield bond portfolio manager at Brandywine Global Investment Management, said a rally in equities was also helping drive demand. A better chance of generating positive inflation-adjusted yields compared to the investment-grade market is another factor. 

“The value of the equity cushion is so high compared to the level of debt,” said Zox. “Rates have been increasing since September, leading to losses for investment-grade. That’s also made junk bonds more attractive.”

The Bloomberg U.S. Investment Grade Index in September suffered its worst monthly total return since March, posting a 1.05% loss as Treasury yields rose, and is down 0.64% so far this month. The Bloomberg U.S. High Yield Index, meanwhile, lost just 0.01% in September -- the first monthly negative return of the year -- and is down about 0.14% this month. 

Read more: UBS Sees Corporate Bonds Headed for Steepest Loss Since 2008

Still, investment-grade debt is still attracting buyers with U.S. corporate bond exchange-traded funds swinging back to an inflow in the five-day trading period that ended Oct. 19, according to data compiled by Bloomberg. About $2.9 billion of new cash was added to the ETFs after an outflow of around $1.5 billion in the prior period.

Leveraged loan funds, meanwhile, are set for inflows of $785 million, according to the JPMorgan estimates. If that holds, it would be the most since the week ending June 9.

©2021 Bloomberg L.P.