A Financial Market Model with Heterogeneous Agents