Skip to content

Welcome to Quantbot

AI-Powered Financial Markets Assistant

Quantbot is a sophisticated financial markets assistant powered by Google ADK and advanced AI technology. Built for traders, investors, and financial professionals, it provides intelligent market analysis, personalized portfolio management, and contextual financial insights through natural conversation.

🚀 Key Features

AI-Powered Intelligence

  • Multi-Agent AI System - Specialized agents for portfolio advice, market analysis, news interpretation, and risk assessment
  • Contextual Memory - Remembers conversations and learns your preferences using Neo4j graph database
  • Real-Time Market Data - Live stock prices, news, and market insights from multiple sources
  • Portfolio Integration - Intelligent analysis of your actual holdings and performance
  • Personalized Insights - Tailored recommendations based on your investment goals and risk tolerance

Advanced Capabilities

  • Google Gemini AI - Powered by cutting-edge language models for sophisticated financial analysis
  • Memory System - Builds understanding over time through episodic memory and entity relationships
  • Tool Integration - Access to comprehensive financial tools for market data, portfolio analysis, and risk assessment
  • Sentiment Analysis - Real-time news sentiment analysis using advanced NLP
  • Observability - Full agent behavior tracking and evaluation with Opik integration

Modern User Experience

  • Responsive Design - Optimized for desktop, tablet, and mobile devices
  • Real-Time Chat - Natural language conversations with instant AI responses
  • Portfolio Dashboard - Interactive portfolio tracking with performance analytics
  • Secure Authentication - JWT-based security with encrypted API key storage
  • Professional Interface - Clean, modern design with consistent blue-to-purple gradient theme

🏗️ Architecture Overview

Technology Stack

Frontend

  • React 18 with TypeScript for type safety and modern development
  • Vite 5 for lightning-fast development and optimized builds
  • Tailwind CSS 3 with custom design system and responsive components
  • Axios with interceptors for seamless API communication

Backend & AI

  • FastAPI with async/await for high-performance API endpoints
  • Google ADK 1.2+ for advanced agent development and orchestration
  • Google Gemini 2.5 for intelligent AI responses and reasoning
  • SQLModel combining SQLAlchemy ORM with Pydantic validation

Data & Memory

  • PostgreSQL 16 with pgvector for application data and vector operations
  • Neo4j 2025.06 graph database for contextual memory and relationships
  • Graphiti-core 0.15+ for sophisticated memory management
  • OpenAI Embeddings for semantic similarity and search

External APIs

  • Yahoo Finance for real-time market data via yfinance library
  • Finnhub for social sentiment analysis and alternative data
  • Financial Modeling Prep (FMP) for enhanced financial analytics
  • NewsAPI for financial news aggregation and analysis
  • Opik for AI agent observability and performance tracking

📊 System Architecture

graph TB
    subgraph "Frontend Layer"
        A[React + TypeScript]
        B[Auth Context]
        C[Chat Interface]
        D[Portfolio Dashboard]
    end

    subgraph "Backend Services"
        E[FastAPI Endpoints]
        F[Google ADK Agents]
        G[Memory Manager]
        H[Market Services]
    end

    subgraph "AI & Intelligence"
        I[Google Gemini 2.5]
        J[Specialized Agents]
        K[Tool Integration]
        L[Memory System]
    end

    subgraph "Data Layer"
        M[(PostgreSQL<br/>App Data)]
        N[(Neo4j<br/>Memory Graph)]
        O[External APIs<br/>Market & News]
    end

    subgraph "Monitoring"
        P[Opik<br/>Agent Tracking]
    end

    A --> E
    B --> E
    C --> E
    D --> E
    E --> F
    F --> I
    F --> J
    F --> G
    F --> H
    G --> L
    G --> N
    H --> O
    E --> M
    F --> P
    J --> K

    style I fill:#ff6b6b
    style F fill:#4ecdc4
    style G fill:#45b7d1
    style M fill:#336791
    style N fill:#008cc1

🤖 AI Agent System

Specialized Agents

🎯 Quantbot Manager

  • Role: Central orchestrator for all user interactions
  • Technology: Google Gemini 2.5 Flash
  • Capabilities: Query routing, response synthesis, conversation management

📊 Portfolio Advisor

  • Specialization: Investment strategy and portfolio optimization
  • Functions: Asset allocation, performance analysis, rebalancing recommendations

📈 Market Analyst

  • Specialization: Real-time market data and trend analysis
  • Functions: Price monitoring, technical analysis, sector performance, economic indicators

📰 News Analyst

  • Specialization: Financial news interpretation and sentiment analysis
  • Functions: News aggregation, sentiment scoring, market impact assessment

⚠️ Risk Assessor

  • Specialization: Investment risk management and analysis
  • Functions: VaR calculations, stress testing, correlation analysis, risk-return optimization

Tool Ecosystem

The AI agents have access to comprehensive financial tools:

  • Market Tools: Stock prices, indices, technical indicators, volume analysis
  • Portfolio Tools: Holdings analysis, performance calculation, rebalancing suggestions
  • News Tools: Financial news search, sentiment analysis, event tracking
  • Risk Tools: VaR modeling, stress testing, correlation matrices
  • Data Tools: Fundamental analysis, economic indicators, sector metrics

🧠 Memory & Learning

Neo4j Graph Memory

Quantbot features an advanced memory system that:

  • Remembers Conversations: Stores every interaction with temporal context
  • Learns Preferences: Builds understanding of your investment goals and risk tolerance
  • Extracts Entities: Automatically identifies stocks, companies, strategies, and concepts
  • Builds Relationships: Creates connections between financial entities and user preferences
  • Enables Context: Provides relevant historical context for better recommendations

User Isolation

  • Group-Based Separation: Each user has a unique group ID for data isolation
  • Strict Privacy: No cross-user data access or sharing
  • Encrypted Storage: Sensitive data encrypted at rest and in transit
  • Configurable Retention: Customizable data retention policies

🔧 Quick Start

Prerequisites

  • Docker Desktop 4.0+ or Docker Engine 20.0+
  • 8GB RAM minimum (16GB recommended)
  • 10GB free storage for databases and containers

Installation

# Clone the repository
git clone https://github.com/bakr-UCB/Quantbot.git
cd Quantbot

# Start all services with hot reload
docker compose up --watch
# Start databases only
docker compose up postgres neo4j -d

# Backend (Terminal 1)
cd Quantbot-BE
make create_environment
source .venv/bin/activate
make requirements
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Frontend (Terminal 2)
cd Quantbot-FE
npm install
npm run dev

Access Points

Required API Keys

For full functionality, configure these API keys:

  • Finnhub: Get API key - For social sentiment data
  • Financial Modeling Prep: Get API key - For enhanced financial data

🔐 Security & Privacy

Authentication & Authorization

  • JWT Authentication with access and refresh tokens
  • Secure Token Storage in HttpOnly cookies and localStorage
  • Automatic Token Refresh for seamless user experience
  • Role-Based Access Control for different user types

Data Protection

  • API Key Encryption using symmetric encryption for stored keys
  • User Data Isolation with strict group-based separation
  • HTTPS Encryption for all communications
  • Input Validation using Pydantic schemas
  • CORS Configuration with proper origin restrictions

Privacy Compliance

  • No Data Sharing - User data never shared with third parties
  • Configurable Retention - Control how long data is stored
  • Data Export - Users can export their data
  • Right to Deletion - Users can request data deletion

Data Privacy

All user data, conversations, and portfolio information are encrypted and stored securely. We never share personal information or trading data with third parties.

📚 Documentation Structure

Getting Started

Core Features

Architecture & Technical

API Reference

Development

🚀 Performance & Scalability

Response Times

  • Simple Queries: < 2 seconds
  • Market Data Requests: < 3 seconds
  • Complex AI Analysis: < 10 seconds
  • Portfolio Reviews: < 15 seconds

Caching & Optimization

  • Market Data Caching: 60-second TTL for price data
  • Memory Caching: Frequently accessed conversations cached
  • Database Optimization: Proper indexing and connection pooling
  • API Rate Limiting: Configurable rate limits to prevent abuse

Monitoring & Observability

  • Health Checks: Real-time service monitoring
  • Performance Metrics: Response times and success rates
  • Agent Tracking: Opik integration for AI behavior analysis
  • Error Monitoring: Comprehensive logging and error tracking

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Development environment setup
  • Code style and standards
  • Pull request process
  • Issue reporting guidelines
  • Testing requirements

📄 License

This project is proprietary software developed as an academic graduation project. All rights reserved. See the License file for details.

⚠️ Important: This software is NOT free or open-source. Any use, copying, or distribution requires explicit written permission.

🆘 Support


Getting Started

New to Quantbot? Start with our Installation Guide to get up and running with Docker, then explore the AI Chat Assistant to see the power of conversational financial analysis.

Latest Version

Version 2.1.0 - Enhanced AI capabilities with Google ADK, comprehensive memory system, and improved multi-agent architecture for sophisticated financial analysis.

Try Quantbot

Experience the power of AI-driven financial analysis. Ask questions like:

  • "Should I buy Apple stock right now?"
  • "How is my portfolio performing this month?"
  • "What are the risks in my current holdings?"
  • "Find me some undervalued dividend stocks"