How Brazil can win back investors by Cyrus Sanati @FortuneMagazine July 3, 2013, 9:37 AM EST E-mail Tweet Facebook Google Plus Linkedin Share icons FORTUNE — The massive protests in Brazil may have subsided, but the unrest is far from over, as evidenced by the tear gas earlier this week outside the Brazil-Spain soccer game in Rio. The turmoil threatens to exacerbate an already tense situation for the nation’s shaky financial markets. The protests, which erupted last month in response to a hike in bus fares, is undermining the Brazilian government’s attempt to alleviate a potentially disastrous flight of foreign capital as investors cycle out of emerging markets. If the government doesn’t move to address the grievances of its restless and frustrated population quickly and prove to the investment community that it is still committed to responsible government spending, then the country could be setting itself up for a severe economic downturn. Brazilians rarely like to rock the boat. They have lived through dictatorships, corrupt governments and wild economic swings without much popular dissent. Indeed, this was, after all, the last western nation to ban slavery — and it didn’t come about because of a mass popular uprising, it just happened because it was time. But Brazil has changed dramatically in the last few years. Brazilians, now numbering nearly 200 million, are richer and more educated than at any time in the nation’s short history. An amazing 20% of the population, around 40 million people, have been lifted out of poverty in the past decade. At the same time, enrollment in higher education has doubled and the nation’s literacy rates among youths now tops 97%. MORE: Only the wealthy feel economic recovery These are all good things for investors to hear. A richer and more educated population usually leads to a healthy uptick in spending within the country on a variety of services and assets. This creates an upward spiral in economic growth where investors are able to reap healthy returns across a variety of markets. As such, with an abundance of exploitable natural resources and a growing service sector, Brazil was the favorite emerging market for many investors, especially those concentrated in fixed income. Investors were able to park their cash with ease and reap returns that well exceeded whatever they could get back in Europe or even in the United States. Furthermore, as a legitimate democracy with a somewhat competent legal system, Brazil also offered investors security from political risk, a rarity among emerging market economies. Brazil was so popular that foreign direct investment had held steady at around $65 billion from 2011 to 2012 even though economic growth in the country had stalled. The hope was that Brazil would bounce back. But instead of things picking up, Brazil’s economy just seems to be getting worse. Credit rating agencies Moody’s and S&P both downgraded Brazilian debt last month after the government said it was expecting a further slowdown in economic growth. Traders in Brazilian government debt tell Fortune that this is causing a major outflow of capital from Brazil’s fixed income markets. As such, dollar-denominated Brazilian bonds are down nearly 8% in the second quarter of this year, the largest such decrease for a single quarter since 2002, according to an analysis by Bloomberg. MORE: Bernanke is driving the car but can’t see the road There are a few things going on here. First, there has been a mass sell-off in emerging market debt by investors from Wall Street to London in the last two months. What started out as a trickle of selling has since turned into a stampede for the exits — with debt markets across the emerging market space taking a pounding, especially Brazil. Secondly, the rout was exacerbated by the US Federal Reserve, which signaled last month that it may be willing to raise interest rates in the not-so-distant future. The promise of higher rates, and, thus, potentially higher returns on U.S. investments, managed to lure investors away from the emerging markets and back to the U.S. Brazil’s finance ministry has quickly sprung into action to prevent the hemorrhaging of foreign capital from the nation’s debt and equity markets. It first eliminated a 6% tax foreigners had to pay to invest in Brazilian local bonds. The tax, put in place by the government in 2010 to supposedly prevent wild swings in the Brazilian currency, now levels the playing field and should draw in new investors. In addition, the government recently cut a 1% tax on currency derivatives in an attempt to boost the value of the Brazilian Real. Normally, such actions would have been enough to at least stabilize the sell-off. Investors who had hesitated to enter the Brazilian markets due to the “foreigners tax” would have jumped in the second they heard the news that the tax was history. But the tax changes haven’t been enough this time around to lure back investors. That’s because of what’s going on in the streets of Brazil’s largest cities — protests and riots. Fund managers who had stuck by Brazil during the recent market rout will now find it even harder to do so with millions of Brazilians on the street, shutting down ports, creating traffic jams, and scaring the government. What turned out to be outrage at the government for raising transit fares (which had since been reversed) has now become a protest for everything by everyone with no clear leader or agenda. Among the dozens of causes that people are protesting include: transportation costs; Native Indian rights; government spending on the 2014 World Cup and the 2016 Summer Olympics; corruption in state and local governments; and a bill in the Brazilian congress that would authorize psychologists to try and “cure” homosexuals. So far the government, led by President Dilma Rousseff, has failed miserably to contain the protests, many of which have become violent and chaotic. For example, over the weekend, hooded protesters armed with screwdrivers and slingshots set fires and attacked police outside the Confederations Cup soccer game in Rio de Janeiro. It was a terrible embarrassment for the government. MORE: Sequester shmester? The worst is yet to come So what is the government to do here? With so many different causes and no real leadership, it seems impossible to get control of the situation. But while there are many different causes, they all share a common root — corruption and mismanagement in Brasilia. Brazil’s new middle class is simply fed up with Brazil’s shoddy infrastructure, terrible medical system, super high taxes and shoddy education. The government purse continues to expand thanks to the economic boom, but it has failed to reinvest that money in a productive way. Indeed, the 40 million people who pulled themselves out of poverty did so because of a surge in commodity prices that helped fuel a boom in the service sector. The government did little, if anything, to encourage the development of the boom and kept income taxes at around 40%, by far the highest such tax rate for an emerging market economy. It is clear that the Brazilian government needs major reform. For starters, the President could send a gesture of goodwill to the protestors by reshuffling her cabinet and firing ministers who have failed to perform. She can also create an action plan that addresses all the causes and sets forth ideas on how to address the problems. She should also explain to the Brazilian people that the protests, while understandably valid to some degree, could be setting the country up to take a big economic hit. Bond traders from Lisbon to Sao Paulo tell Fortune that they are afraid of jumping back into the Brazilian debt markets because of the uncertainty surrounding the protests. Foreign direct investment last year in Brazil was around $65 billion, but is set to take a big dive in the weeks to come. The protests in Brazil aren’t going away without some proactive steps taken by the government to show that it “gets it.” So far, the Brazilian government’s usual plan of action, to do nothing and wait things out, isn’t working. The government needs to see the protests as part of a larger social revolution and should get to the roots of the problem. Investors will be waiting on the sidelines until they see that Brasilia is making a true and concerted effort to stamp out corruption and govern in a way fitting for the world’s seventh-largest economy.