Inspiration

Prediction markets are supposed to be the gold standard of collective intelligence. Put money on your beliefs, let prices aggregate information, let the market be right. But markets are made of humans and humans are slow. Prices drift, overreact, mean-revert and leave patterns in the data that repeat across hundreds of resolved markets. We wanted to know if those patterns were tradable. Pythia was built to find out.

What we learned

The biggest insight was that one model cannot capture all market regimes. A market 300 days from resolution behaves nothing like one 3 days out. Splitting by time horizon and training separate models was the single most impactful decision in the whole project. We also learned that 57% of all price candles on Polymarket have exactly zero movement. The naive target variable was useless. Filtering to only significant moves over 1% transformed a losing strategy into a profitable one.

How we built it

We pulled 144k price candles from the Polymarket CLOB API across 92 resolved markets. Three XGBoost models were trained on different time horizons with GroupKFold cross-validation split by market to prevent leakage. A Flask server loads the trained models and generates live BUY/SELL signals on active markets every 60 seconds. For full details on architecture, feature engineering and back-test methodology, see the report in the repository.

Challenges

Getting the back-test to be honest was the hardest part of the project. Early versions showed strong numbers but the methodology was flawed: splitting randomly by row meant the model saw candles from the same market in both train and test, leaking future information. Switching to GroupKFold split by market brought the metrics down to reality and made them defensible. The far bucket was the other lesson. It looked profitable until we stripped out price moves above 40% and realized the returns were driven by a handful of outlier events rather than any consistent statistical pattern. We excluded it from the live strategy entirely.

Built With

Share this project:

Updates

Submission history