How imanoop7/financial-analysis--multi-agent-open-source-llm works
Project type and purpose
• This is an open-source, multi-agent financial analysis tool built as a single-page Streamlit application.
• It orchestrates several analysis “agents” (technical, fundamental, sentiment, risk, competitor) using crewai and LangChain, pulls market data via yfinance, and runs local LLMs via Ollama.
File structure
• Top-level:
• app.py – Streamlit front-end and entry point
• crew.py – agent orchestration setup using crewai
• requirements.txt – Python dependencies
• tools/ – one module per analysis agent:
• yf_tech_analysis_tool.py
• yf_fundamental_analysis_tool.py
• sentiment_analysis_tool.py
• risk_assessment_tool.py
• competitor_analysis_tool.py
Additional README insights
• Dependencies: crewai, langchain, ollama, yfinance, streamlit, plotly
• Features: real-time data, chart pattern recognition, financial analysis, sentiment, risk, competitor analysis, strategy recommendations, interactive charts
Main components
a. Streamlit UI (app.py) – user input, dashboard
b. Orchestrator (crew.py + crewai) – spawns and coordinates agents
c. Analysis Agents (tools/*.py) – modular analyzers
• Technical analysis agent
• Fundamental analysis agent
• Sentiment analysis agent
• Risk assessment agent
• Competitor analysis agent
d. Data Sources
• yfinance (external API)
• (Possibly local cache or in-memory)
e. LLM Engine
• Ollama local server
• LangChain wrappers
f. Visualizations
• plotly for charts
g. Dependencies & Config
• requirements.txt
• environment variables for API keys (if any)
Relationships and interactions
• User enters stock symbol → Streamlit UI
• UI calls the Orchestrator API in crew.py
• Orchestrator spins up each Analysis Agent in parallel
• Technical & Fundamental agents fetch data from yfinance
• Sentiment agent may pull social sentiment or news (via LLM)
• Risk & Competitor agents optionally use data + LLM
• Each agent uses LangChain to wrap prompts and send requests to Ollama
• Agents return structured results (JSON/dicts) to Orchestrator
• Orchestrator aggregates all agent outputs into a unified report
• UI receives aggregated report → renders charts (plotly) & text
Architectural patterns and design principles
• Agent-based, modular plugin architecture: each tool file is an interchangeable component
• Separation of concerns: UI / orchestration / data-fetching / LLM communication / visualization
• Concurrency: parallel analysis pipelines for responsiveness
• Extensibility: new tools = new .py module in tools/ + registration in crew.py