A Rational-Expectations Model of Goods Markets