Exercise simulating a self-contained market with basic trading operations