An Agent-Based Simulation of a Stock Market