Typically investments in developing countries come from developed countries particularly the United States. Recessions in these developed countries are typically caused by rising interest rates to fend off inflation caused by excess domestic spending. Higher interest rates draw dollars from developing countries back to developed countries, draining the developing countries of funds on which their economies and stock markets depend. It is like a big sucking sound, draining the life out of developing countries.
Once inflation in the developed country has been lowered, interest rates fall, leading to more funds being invested in developing countries by investors looking for excess returns.
One way for developing countries to insulate themselves from these destructive waves of disinvestment is to institute capital controls preventing foreign money from fleeing once it has been invested in a developing country. Under capital controls, investors must receive permission to take money out of the country. Although most conservatives will argue against capital controls (if investors can’t take money out, they won’t put it in in the first place, it is argued), in fact the most successful developing countries have employed capital controls. Taiwan and Korea did it. China does it. It is simply too disruptive to long-term planning and investing to have money flooding in and out of a fragile economy at the whim of wealthy countries.