Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Analysis API with uAgents

Welcome to the Stock Analysis API project using uAgents! This project leverages uAgents to provide detailed stock information, news, and analysis based on fundamental and quarterly results.

Stock Analysis

Table of Contents

Features

  • Search Stock Using Google Finance: Get detailed information about a specific stock.
  • Get Stock News By Scraping Google Finance: Retrieve 5 recent news related to a specific stock.
  • Get Stock Data From Yahoo Finance: Get Fundamental data like PE, EPS and last 3 quarter result.
  • Analysis using Gemini: Perform analysis on a stock based on its fundamentals and quarterly results on Gemini 1.0 Pro.

Installation

Backend and Agent

  1. Clone the repository:

    git clone https://github.com/your/repository.git
    cd StockAdvisor/Backend/agent
  2. Set up a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run all agents:

    cd agents
    python get_stock.py 
    python get_news.py
    python get_analysis.py
  5. Run the Flask app:

    cd ..
    python app.py

Usage

  1. Ensure the backend is running:

    python app.py
  2. Access the endpoints:

    • Get Stock Data: GET /api/stocks/<stock_name>
    • Perform Analysis: GET /api/analysis/<stock_symbol>
    • Perform Analysis: GET /api/news/<stock_symbol>

uAgents Endpoints

The uAgents handle specific types of requests related to stocks. Here are the main agents and their functionalities:

  • Stock Agent: Retrieves stock data based on the stock name.
  • News Agent: Provides news related to a stock symbol.
  • Analysis Agent: Performs analysis based on stock fundamentals and quarterly results.

Running the Streamlit App

To run the Streamlit frontend, follow these steps:

  1. Navigate to the repository root:

    cd StockAdvisor/frontend
  2. Ensure the backend is running:

  3. Run the Streamlit app:

    streamlit run streamlit_app.py
  4. Access the Streamlit app: Open your browser and go to http://localhost:8501.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages