A dynamic general equilibrium analysis of deviations from the laws of one price