The hottest trade on Wall Street took a big hit this week

  • Emerging-market stocks saw their largest inflow in 39 weeks in the week ended Wednesday, according to BofAML, citing EPFR Global.
  • On Thursday, Brazilian stocks plunged in their worst day since 2008 on a report alleging the president's involvement in a massive corruption case.
  • The news dragged down emerging-market stocks overall.
  • Most strategists remain optimistic about longer-term opportunities in emerging markets.

A shocking plunge in one of its key components may dampen, but not crush, Wall Street's favorite investment trade of the last few months: emerging markets.

Brazilian stocks collapsed Thursday on news of a fresh political scandal that jeopardizes the new administration's reform plans. But in the week ending just one day before the drop, investors accelerated purchases of emerging-market stocks, pouring the most money into those assets versus other major stock markets.

The $3.9 billion of emerging-market inflows was the most in 39 weeks and nearly quadrupled the $1.1 billion of European stock purchases last week, contrasting with weeks of outflows from U.S. and Japanese stocks, according to EPFR Global data cited in a Bank of America Merrill Lynch report.

But market strategists remained mostly optimistic about the hot emerging-markets trade, even as Brazilian stocks tumbled Thursday.

"I think it's a good day for trading opportunities," said Kathryn Rooney Vera, head of macro research and emerging markets strategy at Bulltick, a brokerage and asset manager. "Any spillover to EM that really have nothing to do with the Brazilian president's scandal are a buy," she said Thursday.

Emerging market countries include Brazil, China, India and Russia. Despite a historical record of high political risk and sensitivity to volatile commodity prices, emerging market assets have become a major attraction for U.S. investors looking for better returns than the sluggish domestic market.

The trade has paid off so far. This year, the iShares MSCI Emerging Markets ETF (EEM) has posted more than double the returns of the S&P 500.

But on Thursday, Brazilian stocks fell 8.8 percent in their worst day since 2008 after the O Globo newspaper reported that Brazilian President Michel Temer in March allegedly discussed bribing a witness to stay silent in a massive corruption case. Temer said he will not resign and will prove his innocence in the Supreme Court, according to a Reuters report.

Brazil makes up 7.43 percent of the MSCI EM index, and the ETF fell 1.66 percent Thursday on the news.

"Brazil is already under so much attack. Especially after the last government, this isn't a good time," said Gina Sanchez, CEO of investment consulting firm Chantico Global. "It will be a blow to EM sentiment."

Chantico has been underweight emerging market equities given the lack of consensus by oil producers to limit supply, Sanchez said.

Overseas investors reacted strongly to the news as well. The U.S.-listed iShares MSCI Brazil Capped ETF (EWZ) on Thursday dropped 16.3 percent, also in its worst day since 2008 and down 19.7 percent from its 52-week high, close to entering bear market territory. The ETF recovered Friday to trade more than 6.5 percent higher.

The report about Temer comes less than a year after his predecessor President Dilma Rousseff was impeached for corruption, and threatens the new president's ability to implement his plans to turn around a country from a recession.

"This will delay the reforms. That is concerning to us," said Hemant Baijal, co-head of the global debt team for OppenheimerFunds.

But, Baijal said, "It shouldn't temper the enthusiasm for EM in general because the problems in Brazil will remain isolated."

One key reason why emerging markets should hold up is China's steady growth — the country has the greatest weighting in MSCI's index, at 27.05 percent. After a somewhat rocky period of trying to manage a stock-market collapse, currency devaluation and economic slowdown between the summer of 2015 and early 2016, Beijing's Communist leaders have maintained control of growth and are even trying to cut back on stimulus.

Last month, the world's second-largest economy also reported slightly better-than-expected first quarter growth of 6.9 percent.

China's stabilization is contributing to better global growth. Meanwhile, analysts say the Federal Reserve is unlikely to take extreme moves that will significantly strengthen the U.S. dollar — a strong greenback would increase the cost of dollar-denominated debt many emerging-market countries hold.

"We think there are drivers that are more important for EM than what's happening in Brazil," said Alejo Czerwonko, emerging markets strategist at UBS Wealth Management.

History also shows that emerging market stocks tend to recover in the long term following a sharp drop in the Brazilian stocks ETF EWZ.

When EWZ falls at least 10 percent over a week, the Brazilian stocks ETF and the emerging-markets ETF see little gains one month following, according to analysis using Kensho.

Six months later, however, EWZ climbs an average of nearly 13 percent and EEM rises almost 10 percent on average, according to Kensho. The study looked at 29 instances since May 2007.

On Friday, EEM recovered its Thursday losses and traded only about 0.3 percent lower for the week.

— CNBC's John Melloy contributed to this report.

CNBC's parent NBCUniversal is a minority investor in Kensho.