INVESTORS in emerging markets know how quickly things can turn sour. In the mid 1990s fast-growing Thailand and Indonesia became known as the “Asian Tigers”. By 1997 they were suffering currency crises and had to be bailed out by the IMF. Nearly 20 years on two members of the “BRICs” (Brazil, Russia, India and China) lionised for propping up global growth in 2010, are close to recession. The mixture Brazil and Russia face—falling currencies, high inflation and slow growth—could make 2015 a very bad year.

Trouble has been brewing for a while. Over a year ago James Lord of Morgan Stanley, a bank, labelled Brazil, India, Indonesia, South Africa and Turkey the “fragile five” of the emerging markets. His concern was that the combination of high inflation and big current-account deficits meant exports were too dear; their currencies topped his list of those likely to tumble. Four of the five have since lost ground against the dollar, but a sixth emerging-market currency, the Russian rouble, has fallen much further (see chart 1). On November 5th the central bank scaled back its expensive and futile efforts to prop the currency up, leaving it floating almost freely.

These countries have common problems, particularly high inflation. Each of the fragile five has a “twin deficit”: budget shortfalls that mean debts are piling up and current-account gaps that make them reliant on foreign capital inflows. Yet their prospects have diverged. India and Indonesia look secure. The rupee is up against the dollar since August of last year and the public-sector deficit is falling. The Indonesian rupiah has been less solid, losing 10% since end-August, but inflation has moderated and growth is strong (see chart 2).

The remaining four are faring less well. The South African rand and Turkish lira look likely to fall further since both still combine big current-account gaps with high inflation. Yet for government economists in Pretoria and Ankara there are chinks of light. Energy prices have dropped—great news for Turkey since oil and natural gas account for 60% of its energy supply, of which over 90% is imported. In South Africa, strikes which have stunted exports of minerals have abated; the economy could grow by 2.5% next year.

Brazil and Russia, by contrast, are in really bad shape. The largest emerging economies after China, together they have the heft of Germany. In both countries the currency is sliding. The real hit new lows in November after data revealed the budget deficit reached a record in September. The rouble is dropping faster, down 27% in a year and 10% in the past month. Both face stagflation: bubbly prices coupled with growth rates likely to be below 1% this year.

Some of their pain comes from abroad. Brazil’s main trading partners are slowing (China), stagnant (the euro area) or tanking (Argentina). Not only are export volumes down; the prices of things Brazil sells—iron ore, petroleum, sugar and soyabeans—are dropping as global demand falters. Russia is feeling the slowdown too, as energy prices fall. It is one of the world’s biggest producers of oil and natural gas. Its big five energy firms employ close to 1m workers. Exports worth $350 billion flowed through pipelines to Europe and Asia in 2013. As prices drop, Turkey’s gain is Russia’s loss.

But Brazil and Russia’s problems have domestic roots too. Since the 1990s Brazil has tended to aim for a primary surplus (before interest payments) of close to 3% of GDP—enough to begin reducing its debts. But Dilma Rousseff, the newly re-elected president, has played havoc with Brazil’s public finances. In 2014 spending has expanded at twice the rate of revenues despite one-off gains from the sale of Libra, an oilfield, and the 4G telecoms spectrum. Brazil’s debt-to-GDP ratio is rising fast.

Russia’s self-inflicted wounds are even more severe. Vladimir Putin’s invasion of Ukraine led to American and European sanctions that have been gradually tightened since they were imposed in July. The rules limit Russian firms’ access to American debt markets. They also ban American firms from selling kit or advice to Russia’s energy giants. This prevents Western oil firms from helping Russian ones develop oil- and gasfields. Mr Putin’s retaliation—import tariffs on Western goods—has pushed up domestic prices further.

There could be worse to come. The drop in commodity prices looks set to last. Meanwhile, in order to crimp inflation and stem the slide in their currencies the central banks in both countries raised their rates last month: they stand at 11.25% in Brazil and 9.5% in Russia. At the same time, worried finance ministries are keen to bolster their books. In Brazil, fuel-tax hikes are being mooted, and tax breaks on car purchases may be scrapped. In Russia a rule that caps the budget deficit at 1% of GDP may require austere fiscal policy.

This frugality will hurt. Banks could prove vulnerable as public-sector spending cuts hit incomes and high interest rates make loans hard to service. In Russia things are particularly bad: non-performing loans are rising, and savers are draining the banks of roubles.

Bond markets could be another flashpoint. Both have big foreign-exchange reserves: despite losing around $100 billion in the past year, Russia has close to $370 billion. But they also have big dollar debts that become harder to serve as their currencies fall (see article). Russia faces some $90 billion of repayments in the next six months. Even optimists think the pair will be lucky to grow in 2015. Pessimists see tumbling currencies, bond-market routs and even bank runs.