In this paper we study the dynamics of a simple asset pricing model describing the trading activity of heterogeneous agents in a "stylized" market. The economy in the model contains two assets: a bond with risk-less return and a dividend paying stock. The price of the stock is determined through market clearing condition. Traders are speculators described as expected utility maximizers with heterogeneous beliefs about future stock price and with heterogeneous estimation of risk. In particular, we consider traders who base their investment decision on different time horizons and we analyze the effect of these differences on the price dynamics. Under suitable parameterization, the stock no-arbitrage "fundamental" price can emerge as a stable fixed point of the model dynamics. For different parameterizations, however, the market shows cyclical or chaotic price dynamics with speculative bubbles and crashes. We find that the sole heterogeneity of agents with respect to their time horizons is not enough to guarantee the instability of the fundamental price and the emergence of non-trivial price dynamics. However, if different groups of agents are characterized by different trading behaviors, the introduction of heterogeneous investment horizons can help to decrease the stability region of the "fundamental" fixed point. The role of time horizons turns out to be different for different trade behaviors and, in general, depends on the whole ecology of agents' beliefs. We demonstrate this effect discussing a case in which the increase of fundamentalists time horizons can lead to cyclical or chaotic price behavior, while the same increase for the chartists helps to stabilize the fundamental price.