How shdyt13/optimizing-bbri-stock-forecasts works
BBRI Stock Forecast is a research decision-support application for comparing SVR and Random Forest stock-price forecasts. The main workflow is CSV upload, preprocessing and feature ranking, six feature-subset experiments with model tuning, prediction and evaluation, then dashboard review or Excel export. The repository also documents a separate offline analysis/reporting mode and step-by-step tuning views. Relationships reflect the sampled calls, imports, and README workflow; unsampled endpoint and offline internals are not expanded.
Main entry points: DataContext.jsx Data and API Client · main.py Forecast API · Dashboard.jsx Dataset Dashboard · trainoff.py Offline Analysis Runner
Components 18
Web Interface
- Application Shell
frontend/src/App.jsx - Dataset Dashboard
frontend/src/pages/Dashboard.jsx - Data and API Client
frontend/src/context/DataContext.jsx - Feature Selection View
frontend/src/pages/FeatureSelection.jsx - Model Evaluation View
frontend/src/pages/ModelEvaluation.jsx - Tuning Step View
frontend/src/components/HyperparameterTuningTab.jsx - Feature Experiments View
frontend/src/components/FeatureExperimentsTab.jsx
API and Orchestration
- Forecast API
backend/main.py
Forecast Experiments
- Data Preprocessing
backend/ml_pipeline.py - Feature Ranking and Subsets
backend/ml_pipeline.py - SVR and RF Grid Search
backend/ml_pipeline.py - Scenario Predictions
backend/ml_pipeline.py - Offline Analysis Runner
backend/trainoff.py
Results and Reporting
- Latest Prediction Cache
backend/main.py - Excel Export
backend/main.py - Offline Report
backend/report_offline.html - Trained Model Artifacts
backend/models
Other components
- Researcher
Connections 18
- Researcher → Dataset Dashboard: uploads CSVs
README.md - Researcher → Dataset Dashboard: starts prediction
README.md - Application Shell → Dataset Dashboard: shows workflow
- Dataset Dashboard → Data and API Client: uses data
frontend/src/pages/Dashboard.jsx - Data and API Client → Forecast API: sends CSV and requests
frontend/src/context/DataContext.jsx - Forecast API → Data Preprocessing: runs pipeline
backend/main.py - Data Preprocessing → Feature Ranking and Subsets: prepares features
backend/ml_pipeline.py - Feature Ranking and Subsets → SVR and RF Grid Search: evaluates subsets
backend/ml_pipeline.py - SVR and RF Grid Search → Scenario Predictions: predicts scenarios
backend/ml_pipeline.py - Forecast API → Latest Prediction Cache: stores results
backend/main.py - Forecast API → Excel Export: exports results
backend/main.py - Latest Prediction Cache → Excel Export: supplies cached data
backend/main.py - Data and API Client → Feature Selection View: provides results
frontend/src/pages/FeatureSelection.jsx - Data and API Client → Model Evaluation View: provides metrics
frontend/src/pages/ModelEvaluation.jsx - Researcher → Tuning Step View: reviews tuning
README.md - Researcher → Feature Experiments View: compares subsets
README.md - Offline Analysis Runner → Trained Model Artifacts: writes models
- Offline Analysis Runner → Offline Report: supports reporting