This project explores a competitive market-making environment inspired by real-world electronic trading systems.
Participants act as market makers in a simulated betting exchange where each round contains a hidden payout value. Every participant receives a noisy estimate of the true value and must continuously quote bid and ask prices while competing against multiple fixed-strategy operators and informed traders.
The objective is to maximize long-run expected profit while balancing:
- spread competitiveness
- fill probability
- adverse selection risk
- informed trader exploitation
The project combines ideas from:
- market microstructure
- quantitative trading
- probabilistic modeling
- simulation systems
- reinforcement learning environments
- adversarial multi-agent systems
For each round:
- A hidden value
V ∈ [0,1000]is generated. - Every market maker receives a noisy signal:
where:
Each participant must quote:
- Bid → price willing to buy at
- Ask → price willing to sell at
Punters and informed traders then choose the best available prices across all active booths.
The challenge is to design a pricing strategy that captures uninformed flow while minimizing losses against perfectly informed traders.
The final strategy was developed through:
- historical data analysis
- operator reverse-engineering
- fill competition modeling
- spread optimization
- simulation-based evaluation
- parameter search
The system dynamically adjusts spreads based on signal extremity and competitive pressure rather than using fixed-width pricing.
Core ideas implemented:
- tighter spreads in high-liquidity regions
- wider spreads near edge signals
- asymmetric protection against toxic buy-side flow
- controlled aggressiveness to avoid adverse selection
the-house-problem/
│
├── auction_history.csv # Historical market data
├── final_submission.csv # Final optimized pricing table
├── house.pdf # Competition/problem statement
├── Untitled.ipynb # Research + simulation notebook
├── plots/ # Generated visualizations
└── README.mdThe historical dataset contains:
- true payout values
- noisy market maker signals
- quotes from multiple house operators
- fills received
- realized PnL
Each operator exhibited distinct behavior patterns:
| Operator | Behaviour |
|---|---|
| Tight | Narrow spreads, high fill rate |
| Wide | Conservative pricing |
| Skewed | Directionally biased quotes |
| Noisy | High quote variance |
| Fade | Counter-signal positioning |
By reconstructing their quoting behavior, it became possible to identify pricing gaps and profitable spread regions.
A custom simulator was built to evaluate strategies under realistic competition dynamics.
The simulator models:
- competing market makers
- best-price fill logic
- informed trader behavior
- adverse selection
- spread competition
- round-level PnL
The framework enables rapid backtesting across thousands of simulated rounds.
Instead of manually choosing quotes, the strategy was parameterized and optimized systematically.
Optimization variables included:
- base spread width
- edge widening factor
- directional skew
- aggressiveness level
A large-scale parameter sweep was then used to identify profitable configurations under varying market conditions.
- Market Making
- Bid-Ask Spread Dynamics
- Adverse Selection
- Liquidity Provision
- Quantitative Pricing
- Simulation-Based Optimization
- Competitive Multi-Agent Systems
The strategy generates quotes of the form:
where spread dynamically changes depending on market conditions and signal confidence.
The final submission strategy achieved:
- competitive fill capture
- reduced toxic flow exposure
- stable long-run expected PnL
- improved robustness against informed traders
The project demonstrates how relatively simple probabilistic systems can produce complex emergent market behavior.
- Python
- NumPy
- Pandas
- Matplotlib
- Jupyter Notebook
Clone the repository:
git clone https://github.com/your-username/the-house-problem.gitInstall dependencies:
pip install pandas numpy matplotlibLaunch notebook:
jupyter notebookPotential extensions include:
- reinforcement learning market makers
- probabilistic fill modeling
- Bayesian value estimation
- multi-agent self-play
- dynamic spread adaptation
- learned adverse-selection detection
Harshita Pulavarti
Built as an exploration of competitive market-making systems, simulation-driven strategy optimization, and adversarial pricing dynamics.