How dhivagaran2004/stock-market-prediton-using-lstm-and-news-sentiment-analysis works
This stock-forecasting application collects historical prices and news, trains an LSTM, evaluates validation predictions, adjusts forecasts using sentiment, and presents results through either a command-line workflow or browser dashboard. The graph preserves the separate data, sentiment, modeling, evaluation, and presentation stages. The main, API, and Streamlit workflows are evidenced by excerpts; README documents capabilities such as technical indicators and both interfaces. The static frontend calls the API directly. Other source paths are included only where supported by the tree; unsampled implementation details and relationships are not inferred.
Main entry points: main.py CLI workflow · frontend_app.py Streamlit dashboard · api.py Prediction API · data_fetcher.py Price collection and indicators
Components 11
User interfaces
- CLI workflow
main.py - Streamlit dashboard
frontend_app.py - Browser dashboard
frontend/script.js - Prediction API
api.py
Market data
- Price collection and indicators
data_fetcher.py - Yahoo Finance
News sentiment
- News retrieval and scoring
news_sentiment.py - NewsAPI
Forecasting and evaluation
- LSTM preparation and forecasting
lstm_model.py - Metrics and sentiment adjustment
trainer.py
Other components
- Analyst
Connections 18
- Analyst → CLI workflow: runs
README.md - Analyst → Streamlit dashboard: configures
README.md - Analyst → Browser dashboard: submits
frontend/script.js - CLI workflow → Price collection and indicators: fetches and features
main.py - CLI workflow → News retrieval and scoring: gets sentiment
main.py - CLI workflow → LSTM preparation and forecasting: trains and predicts
main.py - CLI workflow → Metrics and sentiment adjustment: evaluates and adjusts
main.py - Streamlit dashboard → Price collection and indicators: loads features
frontend_app.py - Streamlit dashboard → News retrieval and scoring: loads sentiment
frontend_app.py - Streamlit dashboard → LSTM preparation and forecasting: trains and predicts
frontend_app.py - Streamlit dashboard → Metrics and sentiment adjustment: evaluates and adjusts
frontend_app.py - Browser dashboard → Prediction API: posts prediction request
frontend/script.js - Prediction API → Price collection and indicators: fetches and features
api.py - Prediction API → News retrieval and scoring: gets sentiment
api.py - Prediction API → LSTM preparation and forecasting: trains and predicts
api.py - Prediction API → Metrics and sentiment adjustment: evaluates and adjusts
api.py - Price collection and indicators → Yahoo Finance: requests history
data_fetcher.py - News retrieval and scoring → NewsAPI: requests articles
news_sentiment.py