The IShares MSCI Emerging Markets ETF (EEM) is actually up 1.87% in the last five days and up 0.08% in the last month.

Which is pretty stunning given that Brazil and Mexico, two of the biggest and more consequential of developing economies, have descended into something near chaos. And the path of those two economies suggests worrying possibilities for other emerging markets such as Turkey and the Philippines.

In case you haven’t been following the news:

In Mexico the administration of President Enrique Pena Nieto raised gasoline prices by about 20% on January 1 as it ended some subsidies that had kept prices at the pump below the market price for gasoline. By the end of the year, the government says, prices will fluctuate with the markets. Mexico imports about 50% of its gasoline from the United States and with the peso near a historic low against the dollar, the cost of that imported gasoline has soared.

What the government got in response were mass protests and violent riots that seem to have caught the government by surprise. Protestors blocked roads across Mexico and took over the customs office on the border near San Diego, halting southbound traffic. Businesses have been looted with 1,500 people arrested. Five people have been killed in the riots.

Protestors, even those without cars, fear that higher fuel costs will raise the price of just about anything that travels on road to reach stores. And that higher fuel prices will force businesses from taxis to trucking companies to small stores to go out of business.

In Brazil prison riots between competing drug gangs have left piles of mutilated and decapitated corpses. At a prison in Manaus, 56 prisoners would up dead after violence blamed on the Northern Family and First Capita Command drug gangs. At another prison riot in Roraima state, in the far north of Brazil, at least 30 prisoners have been killed in what may have been retaliation for the Manaus massacre.

As in Mexico, the Brazilian government has looked on in surprise. President Michel Temer, who took over after the impeachment of Dilma Rousseff, waited three days before saying anything and then called the killings a “terrible accident.” Some government officials have gone so far as to say that since these are privately  run prisons, the government has no responsibility for what has happened there.

Now I’d never ask you to accept that two points make a trend, although they do describe a line, but Mexico and Brazil do have enough points in common to sketch in a larger problem for developing economies.

Growth in the Mexican economy has been sluggish and threatens to get more sluggish if President-elect Donald Trump imposes a tariff or higher taxes on Mexico’s exports to the United Atates. For 2016 the Mexican central bank had been projecting GDP growth of 2.2% to 3.2% but it recently cut its forecast to 2% to 2.6%. GDP fell 0.2% in the second quarter from the start of the year. The central bank has been successful at keeping inflation below its 3% target but only by raising interest rates by 2.25 percentage points to 5.25% since the end of 2015. The government has succeeded in reducing the size of the budget deficit, even with a huge fall in tax revenue from oil production by Pemex, but that has resulted in cuts to social programs and in subsidies such as the recent reduction in gasoline subsidies. In short growth is slow, taxes and inflation and interest rates are up, the peso is way down, some of the country’s poorest have been hit hard, and the country faces deep uncertainties about the future from beyond its own borders.

And in Brazil? A remarkably similar picture–but replace sluggish growth with a grinding two-year recession, the deepest two-year down turn in a century.

The Brazilian economy contracted by 3.8% in 2015 and is forecast to contract by another 3.22% in 2016. The central bank raised interest rates to a stunning 14.25% before cutting them by 25 basis points on October 19. As you might expect, against that headwind growth is not looking any too rosy in 2017 with the Banco Central Do Brasil forecasting 1.23% GDP growth, down from an earlier forecast of 1.3%. Inflation is predicted by economists to fall to 5% in 2017. The government of President Temer has cut spending in an effort to bring the budget deficit under control but, even more so than in Mexico, a large part of those cuts have fallen on Brazil’s poorest–who have already seen their spending power cut by inflation, higher interest rates, and a falling currency. Any turn around in Brazil depends to a great degree in a recovery in prices in overseas markets for the country’s commodity exports.

There are other similarities too. Political leadership at this time of economic crisis is essentially bankrupt in both countries. In Mexico President Pena Nieto has rock bottom approval ratings and all levels of government are beset with deep public distrust after years of drug wars and killings, and public corruption. Unfortunately for Mexico the country won’t conduct a presidential election until 2018. Brazil doesn’t hold its next presidential election until 2018, as well, and the big question there is whether there will be any politicians left to run by then. The country’s continuing wave of corruption scandals has already taken down not just former President Rousseff, but also many of her opponents who led the impeachment fight.

The pattern here, I’d argue, is that economic hard times test a country’s political institutions and leadership. This is true, obviously, of developed countries as well–I’d argue that we’re witnessing that kind of a test in the United States, the United Kingdom, Italy, and France just to name a few current hot spots–as those in the developing world. But at this point in the current economic cycle, developing economies seem especially vulnerable to this combination of economic distress and political failure. And the risks are, that in 2017, this combination will extend to other countries in the developing world–the Philippines looks to have already headed down this path, Russia is hoping to be bailed out by rising oil price, South Africa threatens to take such a journey, Thailand’s institutions seem especially vulnerable after the death of a revered king.

China has its own problems with economic growth but at the moment the government seems to be a bulwark against the kind of unrest seen in a Brazil or Mexico. The costs of constructing and maintaining that bulwark in a slower economy are certainly clear. The Beijing government has clamped down on any institution that might threaten its control of the country. It has abandoned crucial economic reforms in favor of stability. And it has ratcheted up its most jingoistic and nationalistic rhetoric.

In the the short run that has left China as a stabilizing force in the iShares MSCI Emerging Markets ETF. That ETF is overweighted toward China and Asia with 26% of cash in Chinese assets, another 15% in South Korea (is South Korea still an emerging market?) and 13% in Taiwan (same question). Only 13% of the fund’s cash is in Latin America.

In the some whatever longer run this reliance on China’s stability understates, in my opinion, the risks of the emerging market asset class in general and of China in specific. The pressure that even 6% growth puts on China’s institutions and leadership increases the odds that China will make a policy mis-step on its currency, on its banking system, on corporate bad debt, and most likely, on its trade relations with the United States. I don’t see China going the way of a Mexico or Brazil–it’s a very different society with a very different set of political institutions. But I do think it’s important to realize that China too is feeling the pressures of slower growth, a stronger U.S. dollar, and questions about the legitimacy of its political institutions. This isn’t a time to be complacent about China and about emerging market assets.