Multi-agent modeling and simulation of a stock market