Within the framework of the heterogeneous agent paradigm, we establish a stochastic model of speculative price dynamics involving of two types of agents, fundamentalists and chartists, and the market price equilibria of which can be characterised by the invariant measures of a random dynamical system. By conducting a stochastic bifurcation analysis, we examine the market impact of speculative behaviour. We show that, when the chartists use lagged price trends to form their expectations, the market equilibrium price can be characterised by a unique and stable invariant measure when the activity of the speculators is below a certain critical value. If this threshold is surpassed, the market equilibrium can be characterised by more than two invariant measures, of which one is completely stable, another is completely unstable and the remaining ones may exhibit various types of stability. Also, the corresponding stationary measure displays a significant qualitative change near the threshold value. We show that the stochastic model displays behaviour consistent with that of the underlying deterministic model. However, when the time lag in the formation of the price trends used by the chartists approaches zero, such consistency breaks down. In addition, the change in the stationary distribution is consistent with a number of market anomalies and stylised facts observed in financial markets, including a bimodal logarithmic price distribution and fat tails