Hedging, Speculation, and Investment in Balance-Sheet Triggered Currency Crises