|
| 1 | +# AI Stock Analyst Agent using Gemini 2.0 Flash (exp) |
| 2 | + |
| 3 | +The **AI Stock Analyst Agent** leverages **Reflex**, **Agno** and **Gemini 2.0 Flash (exp)** to provide advanced financial analysis. It allows users to get comprehensive insights into stock market performance by analyzing individual stocks and their metrics. The app queries relevant data from stock sources, including historical prices, market analysis, and recommendations, to answer user queries about stocks and financial performance. |
| 4 | + |
| 5 | +## Note |
| 6 | + |
| 7 | +Educational Purpose Only: This project is intended for educational purposes only to demonstrate the power of AI in stock analysis. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Features |
| 12 | + |
| 13 | +- **Stock Analysis:** Analyze individual stocks, including key metrics like P/E ratio, market cap, EPS, and 52-week highs and lows. |
| 14 | +- **Watchlist Management:** Add or remove stocks from your personalized watchlist for easy monitoring. |
| 15 | +- **Gemini 2.0 Flash Integration:** Utilizes Google's Gemini 2.0 Flash for fast, accurate, and dynamic responses. |
| 16 | +- **Real-Time Market Data:** Get live stock data, analyst recommendations, and company news from reliable sources like Yahoo Finance. |
| 17 | +- **Custom Financial Reports:** In-depth analysis, including executive summaries, professional insights, and risk disclosures. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Getting Started |
| 22 | + |
| 23 | +### 1. Clone the Repository |
| 24 | +Clone the GitHub repository to your local machine: |
| 25 | +```bash |
| 26 | +git clone https://github.com/reflex-dev/reflex-llm-examples.git |
| 27 | +cd reflex-llm-examples/ai_stock_analyst_agent |
| 28 | +``` |
| 29 | + |
| 30 | +### 2. Install Dependencies |
| 31 | +Install the required dependencies: |
| 32 | +```bash |
| 33 | +pip install -r requirements.txt |
| 34 | +``` |
| 35 | + |
| 36 | +### 3. Set Up Gemini API Key |
| 37 | +To use the Gemini 2.0 Flash model, you need a **Google API Key**. Follow these steps: |
| 38 | +Go to [Google AI Studio](https://aistudio.google.com/apikey), get your API Key, and set it as an environment variable: |
| 39 | + ```bash |
| 40 | + export GOOGLE_API_KEY="your-api-key-here" |
| 41 | + ``` |
| 42 | + |
| 43 | +### 4. Run the Reflex App |
| 44 | +Start the application: |
| 45 | +```bash |
| 46 | +reflex run |
| 47 | +``` |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## How It Works |
| 52 | + |
| 53 | +1. **Stock Query:** Ask questions like "Analyze AAPL's performance" or any other stock symbol. |
| 54 | +2. **Gemini 2.0 Flash:** The app generates a detailed report with metrics like the latest stock price, P/E ratio, market cap, analyst recommendations, and more. |
| 55 | +3. **Real-Time Data:** The app integrates with Yahoo Finance and other tools to get real-time market insights. |
| 56 | +4. **Watchlist:** Add stocks to your watchlist for easy monitoring and analysis over time. |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Why AI Stock Agent? |
| 61 | + |
| 62 | +- **Real-Time Data Access:** Provides live stock information, analyst insights, and historical data to give you a full picture of stock performance. |
| 63 | +- **Smart Financial Analysis:** The agent uses the power of Gemini 2.0 Flash and Yahoo Finance tools to give you comprehensive, accurate financial reports. |
| 64 | +- **User-Friendly:** Seamless user experience with easy stock addition/removal, and clear, actionable insights. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Contributing |
| 69 | + |
| 70 | +We welcome contributions! Feel free to open issues or submit pull requests to improve the app. |
| 71 | + |
| 72 | +--- |
0 commit comments