Investors scared by the sell-off in emerging markets earlier this year have not only dipped their toes back into the EM water--they've jumped right in.

A rally in EM debt and currencies has fueled gains in EM stocks, according to analysts at UBS Group AG, helping the MSCI Emerging Market Index handily outpace the MSCI World Index this year.

The inflows into EM equities underscore a transformative trend on Wall Street where the rise of passive investing--through exchange-traded funds (ETFs) and indexing strategies--has sparked debate as analysts question its ability to spread money efficiently.

"Although they haven’t matched the returns in EM fixed income, EM equities have done considerably better than MSCI World, outperforming developed markets in each quarter year- to-date," UBS analysts led by Bhanu Baweja write. "Initially skeptical, investors have since registered significant interest in EM, most of it in passive instruments rather than flows to long-only EM asset managers."

About 40 percent of the passive equity flow that exited emerging markets since 2013 has returned to the market in just the last six months, according to UBS's analysis, with the flood of money helping to push up correlations across EM assets and countries.

Indiscriminate buying of emerging market assets highlights a downside to such passive purchases. Put simply, the larger EM companies that tend to dominate EM indexes have higher levels of indebtedness and lower returns on assets and equity than their developed market (DM) counterparts--meaning investors may be assuming too much risk for too little return.

Medium-sized EM companies look better on the same basis but enjoy a smaller weighting in indexes, according to UBS. That suggests EM investors would do better to buy equities sold by medium-sized EM companies rather than buy indexes where large EM companies with poorer risk-return profiles rule.

"The level and evolution in [return on equity] and [return on assets] show that the median EM company has dealt with the changes of the last five years better than the average EM company, the latter being swayed by the big companies that haven’t produced returns as effectively as the mid- to small-sized companies have," Baweja wrote. "Nationalist or market-share considerations very likely blunt a single-minded search for profits in the big companies, many of which are large state-owned enterprises."

Yet wholesale buying of EM stocks has worked so far thanks to an unusual mix of tailwinds, UBS said, including a sharp fall in the U.S. dollar, a rebound in oil prices, and stimulus efforts from China, which have combined to help boost EM currencies and narrow EM credit spreads, translating into lower corporate borrowing costs. Put together they've created "nothing less than a golden spell for EM fixed income and currencies," the analysts said.

With the extra spread investors demand to hold EM bonds compared to U.S. Treasuries now at 175 basis points compared to 462 (bps) earlier in the year, the question is whether such an environment can hold. If it doesn't, then investors who have so far succeeded by pouring money into EM as a whole may be in for a shock (as, to be sure, might all EM investors).