Coffeeland is small open economy that grows coffee and imports everything else. It is on an international gold standard and everyone in coffeeland uses gold coins. Currently, all coffee is grown on the coastal plain, but beyond the coastal mountain range, there is a plateau perfect for growing coffee.
Foreign investors sell stock on their home country, purchase steel rails, picks, shovels and axes, and ship them to the small open economy along with some bags of gold coins. They hire workers to begin constructing a railroad over the mountains.
Competition for workers results in higher nominal and real wages. The least efficient coffee plantations must curtail production. Exports fall. The steel rails, picks, shovels, and axes all count as imports. And both the new railroad workers and those workers remaining on the coffee plantations increase consumption due to their higher wages, and so, imports of consumer goods rise. A trade deficit develops.
There is a modest increase in the domestic quantity of money. Those bags of gold that are being used to pay the workers are an increase in the quantity of money, but as it is actually spent by the rail company to hire the workers, they spend it on imported consumer goods and so it is re-exported.
There is no price inflation because the small open economy provides only a tiny fraction of world demand for the imported consumer goods, or the steel rails, picks and shovels.
Nominal and Real GDP both rise. While coffee production does fall, the most efficient coffee plantations continue to produce coffee. The partially finished railroad counts as the rest of output, measured at cost.
There is a great railroad boom, with a small increase in the quantity of gold coin, no price inflation, and higher nominal and real wages.
The railroad is completed and the plateau is opened to coffee cultivation. While many of the railway workers are laid off, they are soon employed in the new coffee plantations. Only the most efficient coastal plantations survive, and the total productivity of labor in coffee production is enhanced. Real and nominal wages remain high, real and nominal GDP remain enhanced, due to the additional coffee production as well as the railway services.
The railroad company earns profit and gradually repatriates is initial investment. Coffee exports expand. This is both because of enhanced productivity due to coffee being grown on more productive land, but also because the railway construction workers return to coffee cultivation. While consumer good imports are higher due to the higher real wages, there are no longer any imports of steel rails or picks and shovels. A trade surplus allows the repatriation of profits and the original investment.
In the first scenario....and they live happily ever after.
In the second scenario, the foreigners decide that they prefer tea to coffee. The demand for coffee falls as does its price. As a result, our coffee producing land suffers a deep depression. Wages are sticky, and so as coffee prices fall, the coffee plantations lay off workers, resulting in mass unemployment.
Eventually, both nominal and real wages fall. This reduces the cost of producing coffee and so coffee production recovers. While it might strain credibility just a bit, Coffeeland is so small that it doesn't produce a significant share of world coffee and so as its coffee production recovers, coffee prices remain at the same. (If, on the other hand, coffee prices fall, then this results in an increase in the quantity of coffee demanded, allowing for added real sales, increased coffee production, and additional employment of coffee workers.)
The sorts of Keynesian stories that emphasize the spending of coffee workers simply do not apply. While the spending of coffee workers on imported consumer goods would tend to reduce the sales of the foreign consumer good manufacturers, this is insignificant because the Coffeeland is so small. Further, there is expansion of nominal and real income by those working on tea plantations somewhere else in the world. Presumably they spend part of that added income on consumer goods.
While coffee production and employment do recover, both nominal and real GDP is much lower because the coffee is worth so much less.
Unfortunately for the railway company, it also takes a loss. It turns out that the railroad was a malinvestmentment. The stockholders will never be able to recover all of their initial investment. The stockmarket of coffeeland (made up of the shares of a railroad entirely owned by foreigners) crashes.
Because of the nature of railroad construction, particularly through mountains, the loss minimizing strategy for the railroad company could easily involve them maintaining the railroad in perpetuity. And real wages and real GDP would remain permanently higher than it would have been if the railroad was never built. While coffee is worth less, the plateau really is more productive.
Did the railroad boom cause the bust? No, the bust was caused by the shift in tastes away from coffee towards tea. While building the railroad was not an effective use of resources (perhaps it should have been built in Tealand,) even if it had never been built, there still would have been a decrease in nominal GDP, real GDP, nominal wages, and real wages in Coffeeland.
What about credit and debt? Watch for the next installment.