An agent-based approach to financial stylized facts