This project fetches real-time stock prices and news headlines, performs sentiment analysis, and visualizes the results.
- Fetch real-time stock prices using yfinance
- Fetch news headlines using NewsAPI
- Sentiment analysis using TextBlob
- Interactive dashboard with Streamlit
- Dockerized for easy deployment
- CI pipeline with GitHub Actions
- Sentiment Summary: Displays a bar chart of positive, negative, and neutral news counts for quick insights.
- Create a
.envfile in the project root and add your NewsAPI key:
NEWS_API_KEY=your_news_api_key_here
- Install dependencies:
pip install -r requirements.txt - Run app:
streamlit run src/app.py - Select between Real-Time or Sample Data mode.
- Enter stock ticker in the app.
- Or run with Docker:
docker build -t stock-sentiment-app .
docker run -p 8501:8501 --env-file .env stock-sentiment-app
src/- Source codedata/- Optional historical CSVsnotebooks/- Exploratory analysisDockerfile- Container setup.github/workflows/- CI pipelinerequirements.txt- DependenciesREADME.md- Project overview