How hartejnayar/candle-stick-predictor works
Candle Stick Predictor is a financial-ML research platform with a Streamlit dashboard. Its documented research workflow turns OHLCV history into rolling windows, pattern labels, chart images and technical features; visual and numerical models are compared and fused for short-horizon direction prediction, then evaluated chronologically and through backtests. The graph preserves the documented pattern, explainability, dashboard and backtesting branches. Source excerpts are mostly empty, so edges reflect README-described behavior rather than uninspected implementation details.
Main entry points: dashboard.py Dashboard Views · dataset.py Dataset Windows · app.py Streamlit UI · backtesting.py Backtest View
Components 26
Dashboard
- Streamlit UI
app/app.py - Dashboard Views
app/pages/dashboard.py - Chart Views
app/components/charts.py - Prediction Panel
app/components/prediction_panel.py - Explanation Panel
app/components/explanation_panel.py - Metrics Panel
app/components/metrics_panel.py - Backtest View
app/pages/backtesting.py
Market Data Preparation
- Market Data
- Data Download
src/data/downloader.py - OHLCV Cleaning
src/data/preprocessing.py - Dataset Windows
src/data/dataset.py - Pattern Engine
src/patterns/candlestick_patterns.py - Pattern Labels
src/patterns/pattern_labels.py - Chart Images
src/visualization/image_generator.py - Technical Features
src/features/feature_engineering.py
Modeling
- Vision Transformer
src/models/vit.py - Numerical Models
src/models/baselines.py - Feature Fusion
src/models/fusion_model.py - Model Training
src/training/train.py - Inference Engine
src/prediction/predictor.py
Research Evaluation
- Model Evaluation
src/evaluation/metrics.py - Attention Explainability
src/evaluation/explainability.py - Backtesting Engine
src/backtesting/backtest.py - Risk Performance
src/backtesting/performance.py - Backtest Strategy
src/backtesting/strategy.py
Other components
- Researcher
Connections 27
- Researcher → Streamlit UI: uses
README.md - Market Data → Data Download: supplies OHLCV
README.md - Data Download → OHLCV Cleaning: provides history
- OHLCV Cleaning → Dataset Windows: forms windows
README.md - Dataset Windows → Pattern Engine: detects patterns
README.md - Pattern Engine → Pattern Labels: provides labels
README.md - Dataset Windows → Chart Images: renders images
README.md - Dataset Windows → Technical Features: derives features
README.md - Chart Images → Vision Transformer: encodes visuals
README.md - Technical Features → Numerical Models: encodes features
README.md - Vision Transformer → Feature Fusion: provides embeddings
README.md - Numerical Models → Feature Fusion: provides embeddings
README.md - Feature Fusion → Model Training: trains classifier
- Model Training → Model Evaluation: chronological validation
README.md - Model Training → Inference Engine: serves inference
- Streamlit UI → Dashboard Views: shows dashboard
README.md - Dashboard Views → Chart Views: shows charts
README.md - Dashboard Views → Prediction Panel: shows predictions
README.md - Dashboard Views → Explanation Panel: shows attention
README.md - Dashboard Views → Metrics Panel: shows metrics
- Prediction Panel → Inference Engine: requests predictions
- Explanation Panel → Attention Explainability: visualizes attention
README.md - Streamlit UI → Backtest View: runs backtests
README.md - Backtest View → Backtesting Engine: runs simulation
README.md - Backtesting Engine → Backtest Strategy: applies strategy
- Backtesting Engine → Risk Performance: calculates risk
README.md - Backtest View → Metrics Panel: shows results