This project is a Streamlit-based application that fetches and analyzes news articles related to a specific stock ticker. It provides sentiment analysis, summarization, and sector/ticker extraction for each article.
- Fetch news articles using the NewsAPI.
- Perform sentiment analysis using FinBERT.
- Summarize articles using BART.
- Extract related stock tickers and sectors from the article content.
news_fetcher/
├── modules/
│ ├── config.py # Configuration constants (API keys, keywords, etc.)
│ ├── news_fetcher.py # Functions for fetching news articles
│ └── text_analysis.py # Functions for text analysis (sentiment, summarization, etc.)
├── app.py # Main Streamlit application
├── README.md # Project documentation
└── requirements.txt # Python dependencies
-
Clone the repository:
git clone <repository-url> cd news_fetcher
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
streamlit run app.py
- Python 3.7+
- NewsAPI key (replace the placeholder in
config.py
with your key).
See requirements.txt
for the full list of dependencies.
- Enter a stock ticker symbol (e.g., AAPL, TSLA) in the sidebar.
- Select the number of articles to fetch.
- Click the "Fetch News" button to analyze the articles.
This project is licensed under the MIT License.