Agent-based simulation of a financial market