AaryanPalve5 / SAP-Stock

2 stars 2 forks source link

Stock News Sentiment Analysis Platform

sap_stocks sap_stock2

This platform provides real-time sentiment analysis on stock-related news. It fetches news from over 60 different sources and performs sentiment classification. Additionally, it integrates an AI chatbot that allows users to query the fetched news using a Retrieval-Augmented Generation (RAG) model.

Features

Technology Stack

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/stock-news-sentiment-analysis-platform.git
    cd stock-news-sentiment-analysis-platform
  2. Set up a virtual environment (optional but recommended):

    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Configure API keys/Model Manifests:

    • You need to set up environment variables or configuration files for the following APIs:
      • Gemini API (for querying news)
      • Ollama Instance (for Llama 3.2 LLM)
      • finBERT (for sentiment classification)
  5. Run the application:

    python main.py

Usage

1. Fetching and Analyzing Stock News

The platform scrapes real-time stock news and performs sentiment analysis using finBERT. The classified news is stored in a database for querying and further analysis.

2. Querying News with AI Chatbot

The platform includes a chatbot interface where users can query the news using natural language. The chatbot uses Langchain's RAG model with ChromaDB and the Gemini-1.5-Flash LLM to deliver contextual answers based on the news.

Example queries:

Project Structure

Future Improvements

Contributing

Feel free to contribute by opening issues or submitting pull requests!