How shubhv123/silver_ml_model works
This repository is a silver-price prediction system. Its documented main workflow collects market and macro data, builds features, trains forecasting models, evaluates them through backtests, and presents results in a live dashboard. Separate capabilities cover news sentiment, Bayesian inference, risk management, and Qlib-based backtesting. The README establishes the main workflow and feature set; most of these subsystem implementations were not sampled, so finer runtime connections are not asserted.
Main entry points: full_model_comparison.py Model comparison · train_xgboost.py Tree models · live_dashboard.py Live dashboard · news_collector.py News collection
Components 25
Data collection
- Data pipeline
src/data/run_data_pipeline.py - Price collection
src/data/collect_price_data.py - Macro collection
src/data/collect_macro_data.py - COT collection
src/data/collect_cot_data.py - ETF collection
src/data/collect_etf_data.py - News collection
src/nlp/news_collector.py
Feature engineering
- News sentiment
src/nlp/sentiment_analysis.py - FinBERT sentiment
src/nlp/finbert_sentiment.py - Feature building
src/features/build_features.py - Sentiment features
src/features/sentiment_features.py
Prediction models
- Tree models
src/models/train_xgboost.py - Ensemble explainability
src/models/ensemble_shap.py - Deep learning
src/models/deep_learning/lstm_with_attention.py - Bayesian regression
src/bayesian/bayesian_regression.py
Evaluation and analysis
- Model comparison
src/backtest/full_model_comparison.py - Performance dashboard
src/backtest/performance_dashboard.py - Walk-forward backtest
src/backtest/walk_forward_backtest.py - Sentiment-price analysis
src/analysis/sentiment_price_correlation.py - Qlib backtest
src/qlib_integration/run_combined_backtest.py
Risk and presentation
- Position sizing
src/risk/position_sizing.py - Live dashboard
src/dashboard/live_dashboard.py
Other components
- Operator
- Market sources
- FRED
- NewsAPI
Connections 22
- Operator → Data pipeline: runs collection
- Market sources → Price collection: provides prices
- Market sources → ETF collection: provides ETF data
- FRED → Macro collection: provides indicators
- NewsAPI → News collection: provides news
- Operator → Feature building: runs engineering
- Operator → Tree models: trains models
- Operator → Model comparison: runs backtest
- Operator → Live dashboard: launches app
- News collection → News sentiment: analyzes news
- News sentiment → Sentiment features: creates features
- FinBERT sentiment → Sentiment features: creates features
- Feature building → Tree models: supplies features
- Tree models → Model comparison: compared in
- Ensemble explainability → Model comparison: compared in
- Deep learning → Model comparison: compared in
- Bayesian regression → Live dashboard: shown in
- Position sizing → Live dashboard: supports trading
- Model comparison → Performance dashboard: reports metrics
src/backtest/performance_dashboard.py - Operator → Walk-forward backtest: runs evaluation
- Operator → Sentiment-price analysis: runs analysis
- Operator → Qlib backtest: runs backtest