A generalized uncovered interest parity model of real exchange rates