We formulate a mathematical model for the optimal control of the exchange rate. The control consists of a stochastic control, and an impulse control. We give general sufficient conditions for its solution. We consider a government that has two means of avoiding the foreign exchange rate...