Carry trades and endogenous regime switches in exchange rate volatility