Skip to content
Back to projects

Multi-Agent Stock Analysis Platform

Streamlit application in which teams of CrewAI agents research a stock from Yahoo Finance, Reddit, Finnhub and Alpha Vantage and write an investment report. Five collaboration modes, RAG over collected evidence in Qdrant, OpenAI / Gemini / local Ollama models and built-in report scoring.

PythonCrewAILiteLLMStreamlitQdrant (RAG)OpenAIGeminiOllamaDocker ComposeyfinancePlotly

Overview

A university team project that compares different ways of organising LLM agents for the same task: producing a structured investment report for a listed company. Specialised agents (Researcher, Technical Analyst, Fundamental Analyst, Reporter, and in the debate modes a Sceptic, a Trust agent and a Leader) call tools that fetch news, analyst estimates, fundamentals, technical indicators and social sentiment. Five modes are selectable in the UI: Sequential, Parallel, Concurrent (three rounds with a shared JSON blackboard), Group Chat and Group Chat with Context Storage and RAG. Fetched evidence is stored per session in Qdrant, and a router chooses between OpenAI, Gemini and a local Ollama model, falling back to the local model when a user's daily quota is used up. The app has authentication, PDF export and a heuristic report evaluator. The output is model-generated and is not investment advice.

Key Highlights

  • ✓Five multi-agent modes compared on report score and runtime
  • ✓Concurrent mode: parallel data gathering, cross-checking round, then synthesis from a shared blackboard
  • ✓Per-session evidence store in Qdrant with retrieval for the Reporter
  • ✓OpenAI, Gemini and local Ollama models with quota-based fallback
  • ✓Data from Yahoo Finance, Reddit, Finnhub and Alpha Vantage; indicators via TA-Lib
  • ✓Login, per-user daily quota, PDF export and a heuristic report evaluator
  • ✓Containerised with Docker Compose (app + Qdrant)

Technical Deep Dive

Problem & Goal

Investment research combines heterogeneous sources: news, fundamentals, price action and social sentiment. The goal was to automate it with cooperating LLM agents and to find out which collaboration pattern gives the best reports at an acceptable cost in time and API calls.

Analysis Modes

Sequential runs four agents in a linear pipeline. Parallel runs the three specialists asynchronously and lets the Reporter merge their output. Concurrent uses three rounds: specialists gather data and post facts, then read each other's facts and add claims (with refutes_id for corrections), then the Reporter synthesises from the blackboard and Qdrant. The Group Chat modes add a Sceptic, a Trust agent and a Leader in a hierarchical debate; the CS + RAG variant also uses the context storage and evidence retrieval.

Evaluation Results

Reports were scored by the built-in heuristic evaluator (structure, data richness, professional language, actionability, sentiment balance; 0-100). Mean of 5 runs for AAPL, NVDA and GOOGL: Sequential 79.8 (99 s), Parallel 82.5 (51 s), Concurrent 88.9 (138 s), Group Chat CS + RAG 89.4 (373 s). The score measures report form, not the correctness of the recommendation; the provider used for these runs is not recorded in the repository.

My Role & Scope

Team project with Marcin Bagnowski (the repository is owned by a teammate). My commits cover the Concurrent multi-round mode, PDF report enrichment and the admin quota-reset tool, moving embeddings and sentiment analysis to a provider-agnostic setup with Ollama support, the evaluation runs and LaTeX result tables, the local-model deployment guide, and the repository documentation.

Screenshots & Images

Multi-Agent Stock Analysis Platform - Image 1
Click to expand
Multi-Agent Stock Analysis Platform - Image 2
Click to expand
Multi-Agent Stock Analysis Platform - Image 3
Click to expand
Multi-Agent Stock Analysis Platform - Image 4
Click to expand
1 / 4Use arrow keys to navigate