How jaysurya046/news_accuracy_analysis-nifty-50- works
This repository benchmarks Nifty 50 trade setups and support/resistance predictions from Indian financial news sources. The documented workflow runs data generation, period comparisons and best-source selection, dataset preparation, model training, prediction backtesting, visualization, and report generation. Separate scraping scripts collect news and trade setups; analysis and model stages evaluate predictions against market data. The README documents the pipeline stages, while the source excerpts show selected scraper, comparison, backtest, and reporting behavior; links involving unsampled implementations reflect README documentation rather than inspected calls.
Main entry points: run_pipeline.py Pipeline runner · compare_both_periods.py Period comparisons · backtest_predictions.py Prediction backtesting · generate_backtest_report.py Backtest reports
Components 20
Collection and generation
- Pipeline runner
run_pipeline.py - News scraping
src/scrapers/scrape_news_articles.py - Trade setup scraping
src/scrapers/scrape_mint.py - Setup generation
src/data_generators/generate_1year_nifty50_all_sources.py - Raw market and news data
- Source setup datasets
Comparison and preparation
- Path configuration
src/config.py - Period comparisons
src/analysis/compare_both_periods.py - Range comparisons
src/analysis/compare_nifty_ranges.py - Best-source selection
src/analysis/merge_and_select_best.py - Dataset preparation
src/analysis/prepare_dataset.py - Processed predictions
Modeling and evaluation
- GBM training
src/models/train_gbm.py - Prediction backtesting
src/models/backtest_predictions.py - Model artifacts
Visualization and reporting
- Charts and dashboards
src/visualization/visualize_backtest.py - Backtest reports
src/visualization/generate_backtest_report.py - Reports and figures
Other components
- Analyst
- News websites
Connections 29
- Analyst → Pipeline runner: runs stages
- Pipeline runner → Setup generation: runs generation
- Pipeline runner → Period comparisons: runs comparisons
- Pipeline runner → Dataset preparation: runs preparation
- Pipeline runner → GBM training: runs training
- Pipeline runner → Prediction backtesting: runs backtest
- Pipeline runner → Charts and dashboards: runs visualization
- Pipeline runner → Backtest reports: runs reports
- News scraping → News websites: requests articles
src/scrapers/scrape_news_articles.py - Trade setup scraping → News websites: fetches setups
src/scrapers/scrape_mint.py - News scraping → Raw market and news data: saves articles
src/scrapers/scrape_news_articles.py - Trade setup scraping → Source setup datasets: extracts predictions
- Setup generation → Source setup datasets: generates datasets
- Period comparisons → Path configuration: loads paths
src/analysis/compare_both_periods.py - Period comparisons → Source setup datasets: reads predictions
src/analysis/compare_both_periods.py - Period comparisons → Processed predictions: writes comparisons
src/analysis/compare_both_periods.py - Range comparisons → Processed predictions: writes range results
- Best-source selection → Processed predictions: writes selected sources
- Dataset preparation → Processed predictions: prepares datasets
- GBM training → Processed predictions: trains from data
- GBM training → Model artifacts: saves model
- Prediction backtesting → Path configuration: loads paths
src/models/backtest_predictions.py - Prediction backtesting → Processed predictions: reads predictions
src/models/backtest_predictions.py - Prediction backtesting → Processed predictions: writes metrics
src/models/backtest_predictions.py - Charts and dashboards → Processed predictions: charts results
- Charts and dashboards → Reports and figures: saves figures
- Backtest reports → Path configuration: finds inputs
src/visualization/generate_backtest_report.py - Backtest reports → Processed predictions: reads metrics
- Backtest reports → Reports and figures: writes summaries