AI/ML app that analyzes news sentiment for stocks and crypto.
Live Demo: Coming soon
- Real-time News Fetch: Gets latest news for any stock ticker
- Sentiment Analysis: Uses NLP to determine positive/negative/neutral sentiment
- Visualization: Interactive charts showing sentiment over time
- Score Calculation: Composite sentiment score (-100 to +100)
- Keyword Extraction: Identifies key themes and topics
- Python - Core language
- Streamlit - Web UI
- Transformers - Hugging Face sentiment model
- NewsAPI - News data (free tier)
- Plotly - Interactive visualizations
# Clone and setup
git clone https://github.com/ianalloway/stock-sentiment-analyzer.git
cd stock-sentiment-analyzer
# Install dependencies
pip install -r requirements.txt
# Run the app
streamlit run app.py- Enter a stock ticker (e.g., AAPL, TSLA, BTC)
- Select number of articles to analyze
- View sentiment analysis results
- See composite score and visualizations
stock-sentiment-analyzer/
├── app.py # Streamlit UI
├── analyzer.py # Sentiment analysis logic
├── news_fetcher.py # News API integration
├── requirements.txt # Dependencies
└── README.md
- NewsAPI: Get free key at https://newsapi.org
Set as environment variable:
export NEWS_API_KEY=your_key_here| Ticker | Score | Sentiment | Articles |
|---|---|---|---|
| AAPL | +45 | Positive | 10 |
| TSLA | -12 | Neutral | 10 |
| BTC | +28 | Positive | 10 |
MIT - Ian Alloway