Statistical analysis engine and prediction system for Romanian Lottery (6/49)
A Python/Flask web application that analyzes 60+ years of Romanian Lottery draw history to generate statistically-informed number combinations. Combines classical statistics, frequency analysis, and multiple prediction models with a schema-48 wheeling system.
- 60+ years of historical data — 1958 to present, auto-updated twice weekly via scraper
- Multiple prediction models — frequency analysis, gap/overdue detection, hot/cold number tracking, co-occurrence chi-square
- Schema 48 wheeling — 12 guaranteed combinations from 9 chosen numbers (official Romanian coverage system)
- Walk-forward backtest — validate model performance against out-of-sample draws
- Noise filter — eliminates statistically improbable combinations
- Web dashboard — live stats, predictions, and combination generator via Flask UI
- Auto-update — cron job scrapes noroc-chior.ro every Thursday and Sunday at 21:00
| Component | Technology |
|---|---|
| Backend | Python 3.10+, Flask |
| Database | SQLite (60k+ rows) |
| Data scraping | requests, BeautifulSoup |
| Statistics | scipy (chi-square), collections, numpy |
| Frontend | Server-side rendered HTML templates |
| Scheduling | cron / systemd timer |
app.py Flask entry point — routes, API endpoints
modules/
ai_predictor.py Hot/cold/gap frequency analysis
noroc_predictor.py Pattern recognition for Noroc Chior variant
combo_generator.py Filtered combination generator
wheeling_system.py Schema 48 — 12 tickets from 9 numbers
stats_analyzer.py Walk-forward backtest, chi-square co-occurrence
noise_filter.py Statistical filtering of weak combinations
dashboard_v2.py HTML dashboard renderer
scripts/
fetch_noroc_chior.py Web scraper (twice-weekly auto-update)
rebuild_db_v2.py Database rebuild + deduplication
data/
loto_mindhunter.db SQLite — main history table
noroc_chior_history.csv CSV backup
git clone https://github.com/yourusername/loto-mindhunter.git
cd loto-mindhunter
pip install -r requirements.txt
# Seed the database (requires historical CSV)
python3 scripts/rebuild_db_v2.py
# Start the web server
python3 app.py
# → http://localhost:5001| Endpoint | Description |
|---|---|
GET / |
Main dashboard with stats |
GET /api/predict |
Run all prediction models |
GET /api/schema48?numbers=1,2,... |
Generate Schema 48 tickets from 9 numbers |
GET /api/stats |
Frequency, gap, hot/cold data |
GET /api/backtest |
Walk-forward backtest results |
The official Romanian Schema 48 guarantees a 3-number match if all 6 winning numbers fall within your chosen 9. It produces exactly 12 tickets covering all required combinations.
pool = [5, 12, 18, 23, 31, 37, 42, 44, 48] # your 9 chosen numbers
tickets = schema_48_variants(pool) # returns 12 tickets- Primary: noroc-chior.ro — scraped automatically
- Historical: CSV import from official Loteria Română archives (1958–2024)
flask>=3.0
requests
beautifulsoup4
scipy
numpy
Built with Python · Statistics-first approach · No magic, just math