How amritsinha06072022/lob-imbalance-predictor works
This repository is a scripted limit-order-book prediction workflow: collect public Binance depth snapshots, derive snapshot features and timestamp-based forward labels, train models with purged chronological validation, and produce evaluation figures. The main stages are documented in the README and the sampled source confirms their data handling and call relationships. The model-training and evaluation stages are separate entry points; evaluation reuses model-training utilities. The notebook is exploratory, so it is not mapped as a runtime stage.
Main entry points: evaluate.py Holdout visualizer · model_training.py Purged model training · data_fetcher.py Snapshot collector · features.py Feature and label builder
Components 11
Market Data
- Snapshot collector
src/data_fetcher.py - Raw snapshots
Feature Engineering
- Feature and label builder
src/features.py - Feature table
Modeling
- Purged model training
src/model_training.py - Trained classifiers
src/model_training.py - Split and load utilities
src/model_training.py
Evaluation
- Holdout visualizer
src/evaluate.py - ROC and importance plots
Other components
- Pipeline operator
- Binance public API
Connections 15
- Pipeline operator → Snapshot collector: starts collection
README.md - Snapshot collector → Binance public API: requests depth
src/data_fetcher.py - Snapshot collector → Raw snapshots: writes snapshots
src/data_fetcher.py - Pipeline operator → Feature and label builder: builds dataset
README.md - Feature and label builder → Raw snapshots: reads snapshots
README.md - Feature and label builder → Feature table: writes features and labels
src/features.py - Pipeline operator → Purged model training: trains models
README.md - Purged model training → Feature table: loads table
README.md - Purged model training → Split and load utilities: uses split logic
src/model_training.py - Purged model training → Trained classifiers: fits and scores
src/model_training.py - Pipeline operator → Holdout visualizer: generates figures
README.md - Holdout visualizer → Feature table: loads table
README.md - Holdout visualizer → Split and load utilities: imports holdout helpers
src/evaluate.py - Holdout visualizer → Trained classifiers: fits classifiers
src/evaluate.py - Holdout visualizer → ROC and importance plots: writes plots
src/evaluate.py