Skip to content

bsoberoi/Investment-Advisor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Investment Advisor Multi-Agent System

An AI-powered investment advisory system that leverages multiple specialized agents orchestrated through LangGraph to provide comprehensive stock analysis and investment recommendations. Now featuring MCP integration, FastAPI backend, real-time dashboard, and enhanced UI capabilities.

Version Information

Current Version: 1.1.0
Build Date: 2025-09-08
Python Compatibility: 3.8+
License: MIT

Version History

  • v1.1.0 (2025-09-08): MCP integration, FastAPI backend, Node.js dashboard, enhanced UI, TOML configuration
  • v1.0.0 (2025-09-01): Initial release with multi-agent architecture, GROQ integration, and comprehensive analysis

For detailed changelog, see CHANGELOG.md

Features

Core Capabilities

  • Multi-Agent Architecture: News research, financial data analysis, and expert recommendations
  • MCP Integration: Model Context Protocol server for enhanced AI capabilities
  • Automated Research: Gathers company news and financial data automatically
  • AI-Powered Analysis: Synthesizes information into actionable insights
  • Structured Outputs: Generates detailed analysis and recommendation reports
  • Extensible Design: Easy to add new agents and tools

Multiple Interfaces

  • CLI Interface: Command-line tool for direct system interaction
  • Streamlit Web UI: Interactive web interface with enhanced file management
  • FastAPI Backend: REST API for programmatic access and integrations
  • Node.js Dashboard: Real-time web dashboard with Socket.IO updates

Advanced Features

  • Real-time Updates: Live analysis status and progress tracking
  • Bulk Operations: Select and manage multiple files simultaneously
  • Custom Styling: Comprehensive CSS customization system
  • Configuration Management: TOML-based settings with environment override
  • Enhanced Error Handling: Robust error recovery and user feedback
  • Version Management: Semantic versioning with automated release tools

Quick Start

1. Installation

# Clone the repository
git clone https://github.com/bsoberoi/Investment-Advisor.git
cd Investment-Advisor

# Install Python dependencies
pip install -r requirements.txt

# Install Node.js dependencies (for dashboard)
cd dashboard
npm install
cd ..

2. Configuration Setup

# Run setup script
python setup.py

# Or use the new TOML configuration
python setup_config.py

3. Environment Variables

# Create .env file with your API keys
echo "GROQ_API_KEY=your_groq_api_key_here" > .env
echo "GROQ_MODEL=llama-3.1-8b-instant" >> .env
echo "GROQ_TEMPERATURE=0.1" >> .env

4. Running the System

CLI Interface

# Analyze a stock
python main.py analyze AAPL

# Check version
python main.py version

# Use MCP-enhanced analysis
python main.py analyze AAPL --use-mcp

Streamlit Web UI

# Launch the web interface
streamlit run ui/app.py

FastAPI Backend

# Start the REST API server
python run_fastapi.py
# Or
uvicorn api.main:app --reload --host 127.0.0.1 --port 8000

Node.js Dashboard

# Start the real-time dashboard
cd dashboard
npm start
# Access at http://localhost:3000

Architecture

Multi-Agent System

The system uses LangGraph and Groq LLMs to orchestrate four specialized agents:

  • News Agent: Gathers company-related news and updates
  • Data Agent: Retrieves financial data and statements
  • Analyst Agent: Synthesizes information into comprehensive analysis
  • Financial Expert Agent: Generates investment recommendations

System Components

  • Core Engine: LangGraph orchestration with GROQ LLM integration
  • MCP Server: Model Context Protocol for enhanced AI capabilities
  • FastAPI Backend: REST API with async support and comprehensive endpoints
  • Streamlit UI: Interactive web interface with file management
  • Node.js Dashboard: Real-time dashboard with Socket.IO communication
  • Configuration System: TOML-based settings with environment override

Output

The system generates comprehensive outputs:

  • Analysis.md: Detailed financial and contextual analysis
  • Recommendation.md: Buy/Hold/Sell recommendation with reasoning
  • Real-time Status: Live updates via Socket.IO in the dashboard
  • API Responses: Structured JSON responses from FastAPI endpoints
  • Log Files: Comprehensive logging for debugging and monitoring

Configuration

Environment Variables

Set these in your .env file:

  • GROQ_API_KEY (required)
  • GROQ_MODEL (optional, default: llama-3.1-8b-instant)
  • GROQ_TEMPERATURE (optional, default: 0.1)

TOML Configuration

The system now supports comprehensive TOML configuration via config.toml:

[project]
name = "Investment Advisor"
version = "1.1.0"

[api_keys]
groq_api_key = "your_groq_api_key_here"

[server]
host = "127.0.0.1"
port = 8000
dashboard_port = 3000

[mcp]
server_enabled = true
client_timeout = 60

See CONFIGURATION_GUIDE.md for detailed configuration options.

API Documentation

FastAPI Endpoints

Analysis Endpoints

  • POST /analyze - Submit stock analysis request
  • GET /analyze/{task_id} - Get analysis results
  • GET /analyze/{task_id}/status - Check analysis status

System Endpoints

  • GET /health - Health check
  • GET /version - Version information
  • GET /status - System status
  • GET /files - List analysis files
  • GET /files/{filename} - Download specific file

Example API Usage

# Submit analysis
curl -X POST "http://localhost:8000/analyze" \
  -H "Content-Type: application/json" \
  -d '{"symbol": "AAPL", "use_mcp": true}'

# Check status
curl "http://localhost:8000/analyze/{task_id}/status"

# Get results
curl "http://localhost:8000/analyze/{task_id}"

See FASTAPI_IMPLEMENTATION.md for complete API documentation.

Version Management

The system includes comprehensive version management tools:

Version Commands

# Show current version information
python main.py version

# Show detailed version history
python version_manager.py --show

# Create a new release tag
python version_manager.py --tag 1.2.0

# List all git tags
python version_manager.py --list-tags

# Check git repository status
python version_manager.py --git-status

Version Information

  • Semantic Versioning: Follows MAJOR.MINOR.PATCH format
  • Git Tagging: Automatic tag creation for releases
  • Changelog: Comprehensive change tracking in CHANGELOG.md
  • Build Information: Version, build date, and author tracking

Documentation

Comprehensive Guides

Technical Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published