Developing countries are giving investors a panic attack. Until quite recently, they offered attractive sources of returns to wealthy people around the world: Investors dropped $1.2 trillion into these markets in 2017 alone — more than the previous two years combined. But now money is flowing out just as fast: In just the last month and a half, investors pulled $8 billion out of bond and equity markets in developing countries.

From a historical perspective, these sorts of boom-and-bust cycles should look familiar. And there's actually a ready-made tool for addressing them: capital controls.

Unfortunately, much of the world has sort of forgotten how to use them.

Capital controls are either taxes or regulations aimed at controlling and stabilizing the flow of foreign investment into or out of a country. In 2009, Brazil put a tax on foreign purchases of Brazilian stocks and bonds. In 2010, the Thai government put a tax on returns from such purchases. And China has all sorts of regulations about what Chinese assets foreign investors can buy and under what circumstances.

But these sorts of rules are not as common as they used to be.

"Through the 1970s, capital controls were ubiquitous," J.W. Mason, an economics professor and Roosevelt Institute fellow, explained to The Week. Immediately after World War II, the necessity of capital controls was taken as a given. Indeed, the International Monetary Fund (IMF) virtually insisted on countries demonstrating robust capital controls before it would offer them a loan.

The thinking was that if a country wanted to build itself up economically, it needed to control where its wealthy citizens invested their money. Left to their own devices, those citizens would instinctively pull their money out of their home countries and park it in the currencies of already-rich nations. That bled poorer nations of the financial funds they needed to build their economies. It distorted exchange rates, which forced countries to adjust their interest rates, potentially wrecking efforts at economic investment. If the country borrowed from a creditor like the IMF, the money could leak right back out again by the same process.

The other reason for capital controls was the fear that foreign investors might treat developing countries as play things: Rush in to capitalize on some investment opportunity, then rush out just as quickly if something caused them to panic. These "hot money flows" in and out would also play havoc with exchange and interest rates.

At the time capital controls were still in vogue, the United States was already something of an outlier: It's economy was already big and powerful, and everyone used U.S. dollars for international exchanges anyway, so it didn't need capital controls. But developing countries in particular relied heavily on them, and many European countries were still strengthening their capital controls up through the 1960s.

Everything changed in the 1980s.

"It was a combination of economic thinking and interest group politics," Kevin Gallagher, a professor of global development policy at Boston University, told The Week. The sea change brought by free market thinking convinced many economists that wealthy investors collectively made better investment decisions than government bureaucracies. Therefore "countries should worry about keeping foreign investors happy," as Mason put it.

There was also a burgeoning global financial industry, particularly in the developed West, that was eager to shop its money abroad for the best returns and the most exciting investment wagers.

The combined effect of economic expertise and lobbying upended the received wisdom on capital controls. The U.S. government began pressuring countries around the world to remove barriers to the free flow of capital; the creation of the eurozone brought down those barriers among its member countries; the IMF reversed course and began insisting that countries dismantle their capital controls in order to receive loans.

It didn't work as planned.

Left vulnerable to those hot money flows, many developing countries went through boom-and-bust cycles. The East Asian financial crisis of the late 1990s was a particularly severe example. And then of course the Great Recession in 2008 set off rolling crises all over the world over the next few years.

But not all countries succumbed to the pressure. China, for instance, never relinquished its capital controls, and they remain extensive. South Korea did waver somewhat, and was hurt by the East Asian crisis. But it also largely held onto its capital controls. Japan didn't rollback its capital controls until long after the free market revolution.

And as it turns out, these countries are also the best examples of successful economic development. "The poorer countries that have succeeded in becoming rich — or at least in industrializing and becoming middle-income countries, especially in Asia — have invariably done so in an environment of strict capital controls," Mason said.

Centrist organizations like the Peterson Institute reviewed the global data in the aftermath of the Great Recession and found no correlation between a country relaxing its capital controls and improved economic growth. There was a correlation with increased risk of financial crisis, however. Another review by the IMF reached much the same conclusion.

Ongoing research by economists also dismantled the free market justification for eliminating capital controls: It turns out most global investors just don't have the information they need for unrestrained global financial markets to actually make efficient and useful investment decisions. "There are actually really elegant neoclassical all-math papers that show that regulations of capital flows make an economy better off rather than distort it," Gallagher said.

In some ways the economic world finds itself circling back to where it began after World War II. The IMF has also updated its recommendations, and now suggests that developing countries use targeted capital controls designed to discourage short-term speculative investing specifically.

It's still not clear if we're going to return to the robust Keynesian approach of strictly controlled international financial markets. The current panic amid developing world investors may turn out to be a blip rather than the start of a new crisis. Many economists now recommend capital controls to tame hot money flows, but they're still not on board with using them to corral long-term investment.

But as emerging markets go through another one of their jitters, it's worth remembering that wealthy investors are not always reliable enforcers of economic wisdom.