June saw non-resident portfolio outflows of $4.0 billion, according to the data published on Wednesday, which compared to outflows of $5.1 billion in May and a $55.8 billion inflow in June 2021.

The current run of outflows matches a four-month streak that ended in October 2015. Net outflows over the past four months totaled $27.8 billion, according to the IIF.

"We are in a global interest rate and high inflation shock," IIF economist Jonathan Fortun said in a statement. "Longer-dated government bond yields have risen sharply across advanced economies, tightening financial conditions, weighing on growth, and pushing up risk aversion. This mechanism is weighing on flows to emerging markets."

June outflows of $19.6 billion from EM equity portfolios not including China were the largest for any month since March 2020, when markets panicked over the start of the COVID-19 lockdowns.

China saw a net inflow of $6.6 billion, with $2.5 billion leaving debt portfolios and $9.1 billion going to equities, the largest monthly flow to Chinese stocks so far this year.

Data still shows net outflows of more than $10 billion year-to-date for the country.

"Despite the recent readings we remain constructive, as most of the big emerging markets started hiking (benchmark interest rates) well ahead of advanced economies," Fortun said, noting that real longer-term interest rates across many emerging markets are "well above" their G10 counterparts.

"That said," he added, "there are obviously pockets of weakness in EM - where real interest rates are deeply negative - and risks for these countries are rapidly mounting."

JPMorgan last week pointed to 17 countries whose EMBIG-D government bond spreads are wider than 1,000 basis points, a number higher than during the peak COVID-19 panic or the 2008 global financial crisis.

(Reporting by Rodrigo Campos; Editing by Paul Simao)