Rio de Janeiro - AFP
Brazil is a mess, economists say, with the looming presidential impeachment vote fanning tensions in a country stricken by recession, corruption and inequality. So why are foreign businesses so excited?
For international hedge funds, car makers and mining companies, Brazil is more than just samba, bikinis and the Olympics.
It is Latin America's biggest economy, a diverse producer of goods, food and materials, and home to 200 million consumers -- an opportunity they can't ignore.
- Brazil 'mess' -
Political tension has risen this year as suspended president Dilma Rousseff, 68, has edged ever closer to being sacked over accusations of fiddling the state accounts.
Despite this Brazil's currency, the real, has strengthened by 25 percent since late January.
The Senate opened an impeachment trial on Thursday and is expected to vote next week to remove her from office to good.
Supporters of her conservative interim replacement Michel Temer say he was fairly elected on Rousseff's ticket as her vice-president. Opponents complain they never voted for Temer and his austerity policies.
"It's a mess," said Mark Weisbrot, co-director of the Center for Economic and Policy Research, a think-tank in Washington, DC.
"You've got a government of dubious legitimacy doubling down on economic policies that have failed miserably, and no particular end in sight."
- Corruption, profits -
Analysts warn Temer could be the next in a series of politicians to get caught up in a corruption scandal over state energy firm Petrobras.
But his supporters insist he is the man to fix the economy where Rousseff failed.
"The political crisis is indeed a mess," said analyst Jimena Blanco, head of the Americas section at the British-based risk consultancy Verisk Maplecroft.
"The current government is also very much tainted by the corruption allegations. The difference is that the coalition supporting Michel Temer actually works."
- Investor confidence -
Despite the chaos, investor confidence has risen as the business-friendly Temer has taken charge. He plans to rein in spending, notably on pensions.
Foreign direct investment in Brazil reached nearly $64.7 billion in 2015, according to the United Nations Conference on Trade and Development. For 2016, the central bank has revised upward its forecast to $70 billion.
The Sao Paulo stock exchange is up 35 percent since late January. The yield on Brazil's 10-year government bond is about 28 percent lower, a sign of increased investor interest.
Temer's approval rating is very low, at 14 percent according to a survey in July by pollster Datafolha. But financial markets seem unperturbed.
"I don't think they care. They're focused on short-term profits," Weisbrot said.
- Boom to bust -
Rousseff's predecessor Luiz Inacio Lula da Silva, her ally in the left-wing Workers' Party (PT), presided over a boom.
During its 13 years in office, the party was credited with defending labor rights and lifting millions out of poverty.
Lula's bolsa familia, or "family fund," a system of targeted conditional subsidies for poor families, won international praise.
The shine came off in Rousseff's second term as recession hit in 2015.
"She did not have the political support in Congress to take the measures necessary to address the crisis," Blanco said.
Rousseff brands the current impeachment drive a "coup" by her political rivals.
- Regional knock-on -
Now Brazil is in its worst recession in decades. The economy shrank 3.8 percent last year. The International Monetary Fund forecasts a further 3.3 percent contraction this year before a return to growth in 2017.
"For Latin America, we need Brazil growing again," said Ramon Aracena, a chief economist at the Institute of International Finance, a global banking and investment association.
"There is a lot of interconnection in the region. If they do well (in Brazil), they pull up the rest of the economies."
China has been the top business investor in Brazil this year, buying some $4 billion in assets, according to Bloomberg.
"Even with its problems, it's a country that's too large to ignore," said Joao Augusto Neves de Castro, a director for the Americas at the Eurasia Group consultancy.
"The cost of doing business is very high, but once you're in for the long term, you make a lot of money."