Skip to content

panicAtTheCompile/the-house-problem

Repository files navigation

the-house

The House Problem

Overview

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

Problem Statement

For each round:

  • A hidden value V ∈ [0,1000] is generated.
  • Every market maker receives a noisy signal:
$$s = V + \epsilon$$

where:

$$\epsilon \sim \mathcal{N}(0,50^2)$$

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.


Strategy Design

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

Repository Structure

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.md

Data Analysis

The 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.


Simulation Framework

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.


Optimization Approach

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.


Key Concepts Explored

  • Market Making
  • Bid-Ask Spread Dynamics
  • Adverse Selection
  • Liquidity Provision
  • Quantitative Pricing
  • Simulation-Based Optimization
  • Competitive Multi-Agent Systems

Example Quote Structure

The strategy generates quotes of the form:

$$bid = s - \frac{spread(s)}{2}$$ $$ask = s + \frac{spread(s)}{2} + skew$$

where spread dynamically changes depending on market conditions and signal confidence.


Results

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.


Technologies Used

  • Python
  • NumPy
  • Pandas
  • Matplotlib
  • Jupyter Notebook

Running the Project

Clone the repository:

git clone https://github.com/your-username/the-house-problem.git

Install dependencies:

pip install pandas numpy matplotlib

Launch notebook:

jupyter notebook

Future Improvements

Potential extensions include:

  • reinforcement learning market makers
  • probabilistic fill modeling
  • Bayesian value estimation
  • multi-agent self-play
  • dynamic spread adaptation
  • learned adverse-selection detection

Author

Harshita Pulavarti

Built as an exploration of competitive market-making systems, simulation-driven strategy optimization, and adversarial pricing dynamics.

About

House price prediction using regression analysis; auction history dataset, feature engineering, and statistical visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors