How nhannguyenhcm95/lotto-quant-lab works
LOTTO-QUANT LAB is a browser-based lottery statistics and backtesting application for southern Vietnam lottery draws and Vietlott games. Its principal workflow selects a game or station, loads and normalizes draw history, runs independent quantitative models, combines their rankings, and presents analysis in the UI. A separate walk-forward backtest evaluates predictions against later draws while guarding against lookahead bias. The README documents live-source crawling and visualizations; sampled code supports the normalizer and several model details, but not every runtime connection, so those links are cited to the README where applicable.
Main entry points: ensemble.js Ensemble Ranker · input-normalizer.js Input Normalizer · app.js Application · data-service.js History Service
Components 20
Draw Data
- Vietlott Crawler
xo-so/netlify/functions/crawl-vietlott.js - XSMN Crawler
xo-so/netlify/functions/crawl-xsmn.js - History Service
xo-so/js/data-service.js - Game Config
xo-so/js/config.js
Quantitative Analysis
- Input Normalizer
xo-so/js/algorithms/input-normalizer.js - Poisson Model
xo-so/js/algorithms/poisson.js - Markov Model
xo-so/js/algorithms/markov.js - Monte Carlo
xo-so/js/algorithms/monte-carlo.js - Frequency Gap
xo-so/js/algorithms/frequency-gap.js - Moving Average
xo-so/js/algorithms/moving-average.js - Association Rules
xo-so/js/algorithms/association-rules.js - K-Means Clustering
xo-so/js/algorithms/clustering.js - Ensemble Ranker
xo-so/js/algorithms/ensemble.js
Backtesting
- Backtest Engine
xo-so/js/backtest-engine.js - Walk-Forward Runner
xo-so/scripts/run-walk-forward.js
Application UI
- Application
xo-so/js/app.js - UI Controller
xo-so/js/ui-controller.js - Chartist SVG
xo-so/js/chartist.umd.js
Other components
- Researcher
- Minh Ngọc
Connections 28
- Minh Ngọc → Vietlott Crawler: provides draws
- Minh Ngọc → XSMN Crawler: provides draws
- Vietlott Crawler → History Service: supplies history
- XSMN Crawler → History Service: supplies history
- Game Config → History Service: configures games
xo-so/js/data-service.js - Researcher → Application: selects game
- Application → History Service: loads history
xo-so/js/app.js - Application → Ensemble Ranker: requests analysis
xo-so/js/app.js - Application → Backtest Engine: requests backtest
xo-so/js/app.js - Poisson Model → Input Normalizer: normalizes history
xo-so/js/algorithms/poisson.js - Markov Model → Input Normalizer: normalizes history
xo-so/js/algorithms/markov.js - Monte Carlo → Input Normalizer: normalizes history
xo-so/js/algorithms/monte-carlo.js - Frequency Gap → Input Normalizer: reads draw events
xo-so/js/algorithms/frequency-gap.js - Moving Average → Input Normalizer: normalizes history
xo-so/js/algorithms/moving-average.js - Association Rules → Input Normalizer: normalizes history
xo-so/js/algorithms/association-rules.js - K-Means Clustering → Input Normalizer: reads draw events
xo-so/js/algorithms/clustering.js - Ensemble Ranker → Poisson Model: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → Markov Model: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → Monte Carlo: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → Frequency Gap: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → Moving Average: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → Association Rules: runs model
xo-so/js/algorithms/ensemble.js - Ensemble Ranker → K-Means Clustering: runs model
xo-so/js/algorithms/ensemble.js - Backtest Engine → Input Normalizer: canonicalizes results
xo-so/js/backtest-engine.js - Walk-Forward Runner → Backtest Engine: runs evaluation
xo-so/scripts/run-walk-forward.js - Walk-Forward Runner → Ensemble Ranker: evaluates models
xo-so/scripts/run-walk-forward.js - Application → UI Controller: updates display
- UI Controller → Chartist SVG: renders charts