{"id":25877473,"url":"https://github.com/rauhanahmed/financialanalystaiagent","last_synced_at":"2025-07-18T11:05:41.542Z","repository":{"id":278929083,"uuid":"937200797","full_name":"RauhanAhmed/FinancialAnalystAIAgent","owner":"RauhanAhmed","description":"Agentic AI–driven stock analytics leveraging Phidata, Google Gemini 2.0 Flash, and Yahoo Finance. Features real-time data, interactive Plotly charts, and a Streamlit dashboard for comprehensive, actionable market insights.","archived":false,"fork":false,"pushed_at":"2025-05-29T09:56:48.000Z","size":10240,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T11:06:17.537Z","etag":null,"topics":["agentic-ai","data-visualization","finance","google-gemini","investment","phidata","plotly","stock-analysis","streamlit","yfinance"],"latest_commit_sha":null,"homepage":"https://financialanalystaiagent.streamlit.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RauhanAhmed.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-22T15:21:20.000Z","updated_at":"2025-05-29T09:56:51.000Z","dependencies_parsed_at":"2025-02-22T16:26:33.718Z","dependency_job_id":"f98cce5c-74f9-491c-8cbc-c12bbd48a4ea","html_url":"https://github.com/RauhanAhmed/FinancialAnalystAIAgent","commit_stats":null,"previous_names":["rauhanahmed/financialanalystaiagent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RauhanAhmed/FinancialAnalystAIAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauhanAhmed%2FFinancialAnalystAIAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauhanAhmed%2FFinancialAnalystAIAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauhanAhmed%2FFinancialAnalystAIAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauhanAhmed%2FFinancialAnalystAIAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RauhanAhmed","download_url":"https://codeload.github.com/RauhanAhmed/FinancialAnalystAIAgent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauhanAhmed%2FFinancialAnalystAIAgent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265746405,"owners_count":23821645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","data-visualization","finance","google-gemini","investment","phidata","plotly","stock-analysis","streamlit","yfinance"],"created_at":"2025-03-02T11:27:17.501Z","updated_at":"2025-07-18T11:05:41.534Z","avatar_url":"https://github.com/RauhanAhmed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Analysis Dashboard \u0026 Financial Analyst Agent\n\nAn advanced, AI-powered financial analysis tool that combines market data retrieval, technical charting, and natural language insights. This project leverages cutting-edge technologies and frameworks to deliver sophisticated analyses, actionable recommendations, and comprehensive market insights—all within an interactive dashboard.\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Demo](#demo)\n- [Key Features](#key-features)\n- [Architecture](#architecture)\n- [Technologies \u0026 Frameworks](#technologies--frameworks)\n- [Installation \u0026 Setup](#installation--setup)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [File Structure](#file-structure)\n- [Author](#author)\n- [License](#license)\n\n---\n\n## Overview\n\nThis project provides a complete solution for stock analysis by integrating historical market data, interactive visualizations, and AI-driven insights. At its core is the **Financial Analyst Agent**, which leverages the power of **Google Gemini 2.0 Flash** to process user queries, assess market trends, and generate clear, actionable recommendations. The accompanying **Streamlit** dashboard offers an intuitive user interface to explore stock data, visualize candlestick charts, and interact with the AI agent.\n\n---\n\n## Demo\n\nBelow is a quick demonstration of how the Stock Analysis Dashboard works:\n\n![Stock Analysis Dashboard Demo](demo/demo.gif)\n\n---\n\n## Key Features\n\n- **Real-Time Stock Data:** Integrates with **Yahoo Finance** to fetch up-to-date market data.\n- **Interactive Visualizations:** Utilizes **Plotly** to generate dynamic candlestick charts and data tables.\n- **AI-Driven Analysis:** Powered by **Google Gemini 2.0 Flash**, offering detailed insights, risk assessments, and investment strategies.\n- **Configurable Parameters:** Customizable parameters through a YAML configuration file for ease of updates and modifications.\n- **Analyst Recommendations:** Combines historical data with AI analytics to provide sophisticated market analysis and actionable recommendations.\n- **Company News \u0026 Historical Context:** While primarily focused on data trends and market analysis, the agent framework can be extended to include company news and previous data analysis for a more rounded view.\n- **User-Friendly Dashboard:** Built with **Streamlit** for rapid deployment and a responsive, intuitive UI.\n- **Modular and Extensible:** Clean architecture and modular code design facilitate easy integration of additional data sources and analytical tools.\n\n---\n\n## Architecture\n\n### Data Flow \u0026 Components\n\n1. **Data Acquisition:**  \n   - **Yahoo Finance (yfinance):** Downloads historical stock data.\n   - **CSV Ticker List:** Retrieves valid stock tickers via a YAML-configured URL.\n2. **Data Visualization:**  \n   - **Plotly:** Generates interactive candlestick charts.\n3. **AI-Powered Analysis:**  \n   - **Financial Analyst Agent:** Uses **Google Gemini 2.0 Flash** for processing queries.\n   - **Phidata Integration:** Facilitates data handling and tool management, ensuring robust analytics.\n4. **User Interaction:**  \n   - **Streamlit Dashboard:** Provides an interface for ticker selection, query submission, and data display.\n5. **Configuration \u0026 Parameters:**  \n   - **YAML File (`params.yaml`):** Stores essential parameters like the model ID, agent description, instructions, and ticker list URL.\n\n---\n\n## Technologies \u0026 Frameworks\n\n- **Python:** Core programming language.\n- **Google Gemini 2.0 Flash:** State-of-the-art language model used for deep financial analysis and generating recommendations.\n- **Phidata:** Tool for integrating multiple data sources and analytical frameworks, enabling a seamless connection between market data and AI insights.\n- **Yahoo Finance (yfinance):** API wrapper for accessing historical and real-time stock data.\n- **Plotly:** Library for creating high-quality, interactive financial charts.\n- **Streamlit:** Framework for rapidly building and deploying interactive dashboards.\n- **YAML:** Configuration management for easy updates to parameters and settings.\n- **Dataclasses:** Simplifies configuration management with Python data classes.\n- **dotenv:** Manages environment variables for secure configuration.\n- **Additional Libraries:**  \n  - **PyYAML:** For parsing YAML files.\n  - **python-dotenv:** For handling environment variables.\n\n---\n\n## Installation \u0026 Setup\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/RauhanAhmed/FinancialAnalystAIAgent.git\n   cd FinancialAnalystAIAgent\n   ```\n\n2. **Create a Virtual Environment:**\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n\n3. **Install Dependencies:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Environment Configuration:**\n\n   - Create a `.env` file in the project root and add the following environment variable:\n\n   ```env\n   OPENROUTER_API_KEY=your_api_key_here\n   ```\n\n5. **Run the Dashboard:**\n\n   ```bash\n   streamlit run main.py\n   ```\n\n---\n\n## Usage\n\n- **Dashboard Interaction:**  \n  Use the sidebar to select a stock ticker or search for a specific ticker. The main panel displays historical data and an interactive candlestick chart.\n- **AI Agent Query:**  \n  Enter your questions regarding market trends, risk analysis, or investment strategies in the designated text area. Submit your query to receive detailed, AI-powered insights.\n- **Custom Analysis:**  \n  The Financial Analyst Agent uses the configured parameters to tailor its analysis, ensuring that the recommendations are both precise and actionable.\n\n---\n\n## Configuration\n\n### `params.yaml`\n\nThis file contains crucial configuration parameters:\n\n- **modelId:**  \n  Specifies the version of the **Google Gemini 2.0 Flash** model to use (e.g., `gemini-2.0-pro-exp-02-05`).\n- **description:**  \n  Outlines the capabilities and focus of the AI agent, emphasizing data-driven, analytical approaches.\n- **instructions:**  \n  Provides guidance on leveraging all available tools and data sources for comprehensive financial analysis.\n- **tickerListUrl:**  \n  URL pointing to a CSV file with valid stock tickers.\n\n### Environment Variables\n\n- Managed via a `.env` file using **python-dotenv**.\n- Ensure sensitive data and API keys (if any) are stored securely.\n\n---\n\n## File Structure\n\n```\n├── LICENSE\n├── main.py                   # Entry point for the Streamlit dashboard\n├── financeAnalystAgent.py    # Defines the Financial Analyst Agent\n├── params.yaml               # YAML configuration file for agent parameters\n├── requirements.txt          # List of Python dependencies\n└── utils.py                  # Utility functions for fetching data and generating charts\n```\n\n---\n\n## Author\n\n🔗 **Portfolio \u0026 Contact Information**:  \n- Website: [rauhanahmed.in](https://rauhanahmed.in)  \n- GitHub: [github.com/rauhanAhmed](https://github.com/rauhanAhmed)  \n- LinkedIn: [linkedin.com/in/rauhan-ahmed](https://www.linkedin.com/in/rauhan-ahmed)  \n- Twitter (X): [x.com/ahmed_rauh46040](https://x.com/ahmed_rauh46040)  \n- Email: [rauhaan.siddiqui@gmail.com](mailto:rauhaan.siddiqui@gmail.com)\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nExplore, analyze, and gain insights from the financial markets with a blend of powerful data, state-of-the-art AI, and interactive visualizations. This project is designed to support investors, analysts, and enthusiasts in making informed decisions backed by rigorous analysis and actionable recommendations.\n\nHappy Analyzing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frauhanahmed%2Ffinancialanalystaiagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frauhanahmed%2Ffinancialanalystaiagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frauhanahmed%2Ffinancialanalystaiagent/lists"}