A generalized uncovered interest parity model of exchange rates