THE VICTORY of Recep Tayyip Erdogan, Turkey’s president, in a referendum on April 16th is seen by many observers as a worrying step on the road to autocracy. The vote handed Mr Erdogan far-reaching new powers. But the Turkish lira, government bonds and stockmarket all gained ground as the results came in. It was a reminder that the relationship between markets and democracy is not rock-solid. Like an errant husband, investors may proclaim their fidelity to democracy but are not averse to seeing someone else on the side.

In Turkey investors may have feared turmoil if Mr Erdogan’s proposal had been defeated. It is an old, but fairly reliable, rule that investors dislike uncertainty. And the early years of Mr Erdogan’s tenure, when he was seen as a liberalising democrat, saw rapid economic growth; his transformation into an emerging autocrat has not put investors off. Since he took office, the Istanbul market has gained 760% (see chart).

An authoritarian government can provide certainty, at least in the short term. In 1922, when Mussolini took power in Italy, its equity market returned 29% and its government bonds 18%, according to Mike Staunton of the London Business School. Hitler’s accession in 1933 saw German shares return 14% and bonds 15%. True, Wall Street did even better that year under Franklin Roosevelt but still—even then, Hitler was clearly a dangerous extremist.

The world’s most developed economies tend to be democracies, and to be more open to trade and foreign investment. But as China has demonstrated, it is certainly possible to generate rapid economic growth without a democratic system. China’s stockmarket (along with Hong Kong’s) has been among the best-performing bourses this millennium.

Go back in time 100 years and investors would have been pretty suspicious of democratic governments. The pre-1914 world was dominated by governments with restricted voter franchises, in which currencies were tied to the gold standard, in part to protect the creditor classes from the ravages of inflation. The arrival of mass democracy after 1918 was followed by a boom in the 1920s but then by the Depression, stockmarket collapse and abandonment of the gold standard.

Democracies can enact policies that are not market-friendly; the interests of ordinary voters and international investors are not always aligned. If voters support trade tariffs, nationalisation or higher taxes on firms and top earners, then both stockmarkets and currencies are likely to suffer.

The great bull market of the 1980s and 1990s, on the other hand, coincided with political moves to reduce regulations, lower taxes and let capital flow freely across borders. After the fall of the Berlin Wall, many former Communist countries privatised state-owned companies and opened domestic stockmarkets. In many countries, investors could be relatively relaxed about which party took office; economic reforms were pushed through by Bill Clinton, Gerhard Schröder and Tony Blair, all politicians from the centre-left.

But the background has changed again. There are remarkable similarities between the election in America and the referendums in Britain and Turkey. In all three, the electorate was bitterly divided and the margin of victory was narrow (Donald Trump lost the popular vote but won the electoral college). In all three, the victorious side drew its support from rural areas and small towns, and was opposed by voters in the big cities. And in all three cases, it has ignored the narrowness of the majority and has argued it has a mandate for radical policy change.

Democracies work best when there is a modicum of consensus and voters are willing to accept defeat for their own side as legitimate. But that is harder when the ideological divisions are sharp and electoral systems produce “winner takes all” results. In France, for example, voters may yet be faced with a choice in the second round between a candidate from the extreme right and one from the extreme left.

This is likely to result in more radical political changes, of the type that markets do find unsettling. The general drift is towards more authoritarian, more nationalistic policies that appeal to voters whose living standards have stagnated. That process can create a chain reaction; nationalist policies in one country can provoke an adverse reaction in its neighbours and trading partners. Investors may believe that some of these authoritarian leaders will deliver policies they like in the short run—tax cuts, for example. But in the long run, this is a development that ought to concern them greatly.

Economist.com/blogs/buttonwood