Skip to content

This is a small app to test the AI Agents functionallity for forecasting purposes. Mainly focusing on function calling.

License

Notifications You must be signed in to change notification settings

john2408/stock_forecast_ai_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 Stock Price Forecaster using AI Agent & Streamlit

This is a user-friendly Streamlit application that integrates AI-based probabilistic forecasting to predict future stock prices. Powered by Hugging Face's Chronos model and Yahoo Finance, it provides interactive visualizations using Plotly, making it a powerful tool for investors and data enthusiasts.


🌟 Features

  1. Historical Stock Data Visualization:

    • Fetches and displays the past year's price and volume data for any stock ticker.
  2. AI-Powered Forecasting:

    • Uses the Chronos model from Hugging Face to generate probabilistic forecasts.
    • Forecast includes median, low, and high price estimates.
  3. AI Agent

    • uses ChatGPT-4-mini as AI Agent to make a function calling on the AWS Chronos model, which generates probabilistic forecasting.
    • Allows the user to write in natural language which forecast to generate, i.g. any company available in yahoo API and any time horizon.
    • User does not need to know the ticker, the AI Agent finds the correct ticker of the company and calls the API.
  4. Interactive Visualization:

    • Historical prices are shown as a line chart.
    • Forecast ranges (low, median, high) are displayed as an interactive Plotly chart with shaded regions.

🛠️ Installation and Setup

Prerequisites

Steps

  1. Clone the repository:
    git clone https://github.com/your-username/stock-price-forecaster.git
    cd stock_forecast_ai_agent
  2. Install dependencies
    pip install -r requirements.txt
    
  3. Run the App
    streamlit run app.py
    

🚀 Usage

  1. Enter a prompt in natural language like : Get stock price forecast for Microsoft for the next 15 days
  2. Press the Generate Forecast button.
  3. View:
    • Historical stock price data.
    • Forecasted prices with a shaded region indicating uncertainty (low to high estimates)

Sample Visualization

About

This is a small app to test the AI Agents functionallity for forecasting purposes. Mainly focusing on function calling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published