Implementation Guide
This example demonstrates a production-ready Crunch implementation, with an the internal name of “Condor”. It is a financial prediction competition where participants predict asset price distributions over various time horizons. This example showcases a more advanced, real-world architecture featuring:- Asynchronous worker architecture (Predict, Score, Report)
- Distribution-based predictions and scoring
- Production-grade infrastructure with PostgreSQL
- Complete local development environment with Docker
Source Code
The complete Condor implementation is available in the condorgame
repository.
What You’ll Learn
We’ll guide you through 4 essential components of a production Coordinator setup:1
Prediction Task Definition
Understanding the Condor prediction challenge - forecasting asset price distributions over
multiple time horizons, including the TrackerBase interface that all participant models must
implement.
2
Model Implementations (Cruncher Side)
Exploring the base class interface and example models that participants create to compete in the
game. Learn how models receive market data via tick() and generate predictions via predict().
3
Coordinator Workers Architecture
Deep dive into the three-worker architecture: - Predict Worker: Real-time model
orchestration and prediction collection - Score Worker: Distribution-based scoring with
rolling windows - Report Worker: Leaderboard and metrics API
4
Local Development Setup
Running the complete stack locally with Docker, including the Model Orchestrator, PostgreSQL
database, and all three workers. Test with example models before going live.
Architecture Overview
The Condor architecture separates concerns into specialized workers:Prediction Task Definition
Next, we’ll explore the Condor prediction task and the TrackerBase interface that all models must
implement.