Let's get this out of the way: I'm pro-democracy, and hope that the people of Egypt get the transition to real democracy that they're calling for and deserve.

Most investors, however, seem to feel otherwise.

As evidence, consider the EGX 30 Index, which dropped more than 6% from Jan. 16 to Jan. 19, on fears that the political unrest that deposed Tunisian president Ben Ali would spread to Egypt. That drop prompted the chairman of The Egyptian Exchange to claim that foreign investors were responding to excessive political coverage of the events in Tunisia, and that the attempted suicides and acts of civil disobedience in downtown Cairo "are no more than isolated incidents that do not draw near being a national phenomenon."

That analysis clearly proved to be off the mark. Egypt is now engulfed in an uprising that aims to depose Hosni Mubarak, the country's president for the past 30 years, and install a real, functioning democracy. How has Egypt's market reacted? The EGX 30 is down another 15%, putting the entire market down more than 20% since early January. This performance has been replicated by the Market Vectors Egypt Index (NYSE: EGPT), which is down 20%, and even pushed down the broader Market Vectors Africa Index (NYSE: AFK), which is down almost 10%.

We don't all love democracy
This series of events raises a question that I've brought up before: Would you rather invest in a democracy or a dictatorship?

The clear answer seems like it would be democracy, with established property rights, the rule of law, and the fair adjudication of disputes. Yet the data says differently. The world's biggest totalitarian state, China, trades at a wide premium to its foremost democratic rivals.

Country P/E P/B
China 34.4 3.6
India 11.9 1.3
Indonesia 17.5 1.6
Brazil 12.8 1.8

Source: Motley Fool Global Gains research.

Of course, there are more than just political variables at play in these valuations, but the gap is startling. When rubber meets the road, investors appear to prefer the certainty and stability of totalitarian rule (at least, totalitarian rule that's been ostensibly friendly to business and foreign investment) to the often messy execution of democracy. Even Brazil, for example, has at times been penalized by investors for its functioning political process. Ahead of the election to replace President Lula da Silva, Brazil was the worst-performing Latin American market this past summer, with investors fearing that changes in government policy would hurt the Brazilian investment environment.

Buy the unrest
This does make some sense. No investor wants to have money on the line when (1) events are so far out of their control and (2) they will look so stupid in hindsight if they lose money. This is why investors pulled money out of South Korea earlier this year when North Korea lobbed a few missiles at its neighbors, and why investors pulled money out of Greece at the height of the bond crisis. These are scary situations that will test any investor's emotional fortitude.

And while the risk of war in Korea and the eventual outcome of the European financial crisis are still somewhat unknown, long-term investors ought to consider markets that sell off for democracy-related reasons a buying opportunity. Democracy -- and the entrepreneurial spirit that flourishes within it -- is good for capital investment, not to mention the returns one can earn on that investment over the long-term. South Africa and Indonesia, for example, offer better investment environments today, and have better long-term outlooks, than they did under formerly more repressive or controlling regimes.

That said, it's still worth protecting yourself from volatility -- political or otherwise -- when it comes to emerging markets. In Egypt, for example, the situation could well get messier before the country gets a peaceful, functioning democracy. So if you want to take advantage, think about buying some shares of the aforementioned Market Vectors Africa Index. It's down sharply on the volatility in North Africa, but holds stocks across the entire continent and companies that do business across the continent, including Sasol (NYSE: SSL), AngloGold Ashanti (NYSE: AU), and MTN Group.

A word of warning for China investors
Finally, if there's a reason to favor investing in democracies over investing in non-democracies, it's that countries that are already democracies don't need to worry about the inevitable democratic transition. This is worth thinking about if you're investing in China, a country that's censored coverage of the events in Egypt to make sure that its own citizens don't get any ideas (even though pockets of the Internet there are reportedly inspired).

Put simply, the Communist Party will not rule China forever. Sometime, somewhere, investors will have to deal with a democratic transition. And if Egypt is down 20% amid its own revolution, one can only imagine that the sell-off in China, where valuations are generally at a premium, will be worse. Think about that before you pay more than 35 times sales for a company such as Baidu (BIDU), which not only resides in that market, but has also benefited from government favor in order to succeed.