Maahir Garg
← Back to the archive

Feb 2026 – Jul 2026

Prediction-Market Arbitrage and Research Engine

A research engine watching Polymarket and Kalshi for the same question priced differently on each. It never places a trade, since prediction markets are restricted where I live.

Stack

Python, FastAPI, Pydantic, pytest, REST APIs

Links

Notes

Most of the free money disappears once you account for fees, thin order books, and settlement timing. Telling a real mispricing from two mismatched order books, rather than a matching bug, was the actual work: the engine needs a human to confirm a pairing before it counts as an opportunity at all.

The numbers

Architecture
Pure compute functions, read-only venue adapters, in-memory orchestration, FastAPI and Pydantic, plus a dependency-free inspection dashboard.
Matching
Requires a human-confirmed pairing before an opportunity is actionable, adds predicate-conflict checks, and excludes expired or implausible-gross rows.
Economics
Models taker fees, available liquidity, and equal-contract depth fills to preserve hedged economics.
Validation
36+ tests and live-endpoint plausibility checks cover matching, calibration, fees, malformed settings, duplicates, and API failure modes.
Operating model
Research-only and read-only, with no order placement, custody of funds, or realised P&L.