A deep recession, downgrades from rating agencies, spiralling unemployment, a huge fiscal deficit, political turmoil — the list of Brazil’s problems is long and seemingly unsolvable.

So why are currency investors showing a liking for Brazil’s real?

At face value, Brazil’s parlous state looks as bad as it did in 2015, when its currency slumped by a third against the dollar, hitting a record weak point in September, with a single US dollar fetching as many as R$4.25. Gloom engulfed the first three weeks of 2016, as the real weakened by more than 5 per cent.

Yet the real has strengthened 10.8 per cent in the past month, and now hovers around R$3.60 to the dollar, with the status of being the best performer in the emerging markets currency landscape. Forecasting Brazil’s economy is a hazardous business, given the daily diet of grim news, but most forex strategists have come round to the view that the real has stabilised.

What has caused this? Worries about the US economy and expectations of a more moderate rate rise cycle than the Federal Reserve envisaged have given a fillip to several EM currencies. So has an improved balance of payments outlook in several EM countries, including Brazil, even if the trigger is a collapse in imports rather than a boost to exports.

“You see a relatively benign environment,” says Commerzbank’s head of EM, Peter Kinsella.

Growing signs of a bottoming in commodities prices have also helped to steady Brazil’s currency. China’s steelmaking demands have prompted a 46 per cent price increase in iron ore this year. Vale, the big Brazilian miner, alone accounts for about a fifth of the global iron ore market.

In recent weeks, however, the big catalyst for the real’s rally has come from the political sphere. The detention of former president Luiz Inácio Lula da Silva, and its implications for his protégé and current leader, Dilma Rousseff, have raised hopes among investors that the barriers to political change may be overcome sooner than expected.

The real leapt 3.3 per cent in response, and bonds and stocks also jumped. Ahead of Sunday’s nationwide demonstrations by anti-government protesters, the real was at its highest level since August.

Jefferson Luiz Rugik, head of the Correparti brokerage in São Paulo, says: “Everything that is against the current government and President Dilma [Rousseff] is favourable for the real . . . it raises the possibility that we would have another government with more credibility.”

Of course, if that does not materialise and political paralysis continues, the real rally is likely to fizzle out. For the time being, says Fernando Goes, analyst at Clear brokerage in São Paulo, the market is pricing in the possibility of impeachment or a change in government.

“In theory, my target is R$3.5 or R$3.6 for the dollar — I don’t see a possibility of it strengthening much more than this,” he says. “If nothing happens we could go back to R$4 but the chance of a political rupture seems greater every day.”

Even a seismic political shift only offers a brief respite for the real. Any new government confronts the same old problems of high inflation, unemployment and a stagnant economy, says Mr Rugik.

“In the short term, the real could strengthen even more because of all of this enthusiasm, but then we’ll get back to reality,” he adds.

A presidential impeachment is no panacea to Brazil’s problems, says Christian Lawrence at Rabobank. Given how the real has ridden along the waves of the EM rally, “we could see recent optimism fade sharply and a return to the moves we saw at the start of the year”.

As Mario Battistel, currency trader at Fair brokerage in São Paulo, says, predicting the real’s 2016 prospects is hazardous. “So many things could happen,” he says. “At this point, the period until the end of the year seems like an eternity.”

In the short term, the real could strengthen even more because of all of this enthusiasm, but then we’ll get back to reality

If 2016 ends with the real at where it is right now, that may suit the Brazilian central bank (BCB). Most people believe the BCB is happy with the current level and would intervene to prevent too much more appreciation. A weaker real would put pressure on inflation, a stronger currency would hurt exporters.

“The central bank won’t let the real appreciate much more,” says André Perfeito, chief economist of Gradual Investimentos, a brokerage in São Paulo. “It understands the benefits of a weak real for the economy.”

The BCB will take some comfort in Brazil’s inflation easing in February for the first time in five months, increasing the likelihood of a rate cut by the end of the year. If that happens, says Mr Perfeito, the real will weaken.

It’s not much comfort, though. The EM rally will be hard to sustain, says Mr Kinsella. At best, the bias in the coming months is for further real weakness, albeit not as severe as feared at the start of 2016.

More bearish is Daniel Tenengauzer, head of EM at RBC Capital Markets, who says investors have been too quick to add exposure to Brazilian local bonds and equities.

The end of political arm-wrestling in Brasília is wishful thinking, he says, the fundamentals remain dire, and the path of least resistance is to print money, which keeps inflation higher for longer.

That would take the real back towards R$4.30 against the dollar and it would “then close the year above R$5.00”, says Mr Tenengauzer. In other words, there are doubts that this real rally is for real.