We consider a simple pure exchange economy with two assets, one riskless, yielding a constant return, and one risky, paying a stochastic dividend, and we assume trading to take place in discrete time inside an endogenous price formation setting. Traders demand for the risky asset is expressed as a fraction of their individual wealth and is based on future prices forecast obtained on the basis of past market history. We describe the evolution of price and wealth distribution in the general case where any number of heterogeneous traders is allowed to operate in the market and any smooth function which maps the infinite information set to the present investment choice is allowed as agent's trading strategy. We give a complete characterization ...