How yashchavan05/investiq works
InvestIQ turns a user's tickers, budget, and risk limit into a persisted portfolio analysis. The main path runs from the allocator UI through the REST API and LangGraph orchestrator, which coordinates risk, forecasting, market knowledge, fundamentals, ESG, historical learning, optimization, budgeting, XAI, LLM narration, and persistence. Separate product branches support market data, news, single-agent runs, chat, dashboards, and analysis history. The orchestrator's calls are evidenced by the source index and excerpts; additional stage ordering and some UI-to-endpoint links are documented in the README or remain unverified.
Main entry points: investiq_agent.py Analysis orchestrator · main.py REST API · api.js API client · memory_tool.py Run persistence
Components 28
Investor interface
- Portfolio allocator
frontend/src/pages/AIAllocator.jsx - Agent lab
frontend/src/pages/Agents.jsx - AI assistant
frontend/src/pages/AIAssistant.jsx - Markets terminal
frontend/src/pages/Markets.jsx - History explorer
frontend/src/pages/History.jsx - Dashboard
frontend/src/pages/Dashboard.jsx
API and market access
- API client
frontend/src/services/api.js - REST API
backend/main.py - Market data endpoints
backend/main.py - News endpoint
backend/main.py - History endpoint
backend/main.py - Chat endpoint
backend/main.py
Portfolio intelligence
- Analysis orchestrator
backend/agents/investiq_agent.py - Risk analysis
backend/agents/tools/risk_tool.py - Market forecasting
backend/agents/tools/forecast_tool.py - Market news sentiment
backend/agents/tools/news_tool.py - Finance audit
backend/agents/tools/finance_tool.py - ESG assessment
backend/agents/tools/sustainability_tool.py - Portfolio optimizer
backend/agents/tools/optimization_tool.py - Capital allocation
backend/agents/tools/budget_tool.py - ROI attribution
backend/agents/tools/xai_tool.py
Learning and persistence
- Historical learning
backend/agents/tools/learning_tool.py - Run persistence
backend/agents/tools/memory_tool.py - MongoDB
backend/agents/db_config.py
Other components
- Investor
- Market data service
- News service
- Groq Llama model
Connections 31
- Investor → Portfolio allocator: sets inputs
- Portfolio allocator → API client: submits analysis
frontend/src/pages/AIAllocator.jsx - API client → REST API: posts analysis
frontend/src/services/api.js - REST API → Analysis orchestrator: runs workflow
backend/main.py - Analysis orchestrator → Risk analysis: calculates risk
backend/agents/investiq_agent.py - Analysis orchestrator → Market forecasting: forecasts returns
backend/agents/investiq_agent.py - Analysis orchestrator → Market news sentiment: gets sentiment
backend/agents/investiq_agent.py - Analysis orchestrator → Finance audit: audits finances
backend/agents/investiq_agent.py - Analysis orchestrator → ESG assessment: assesses ESG
backend/agents/investiq_agent.py - Analysis orchestrator → Historical learning: loads adjustment
backend/agents/investiq_agent.py - Analysis orchestrator → Portfolio optimizer: optimizes weights
backend/agents/investiq_agent.py - Analysis orchestrator → Capital allocation: allocates capital
backend/agents/investiq_agent.py - Analysis orchestrator → ROI attribution: explains allocation
backend/agents/investiq_agent.py - Analysis orchestrator → Run persistence: saves run
backend/agents/investiq_agent.py - Analysis orchestrator → Groq Llama model: generates narration
- Historical learning → Run persistence: reads prior runs
backend/agents/tools/learning_tool.py - Run persistence → MongoDB: reads and writes
backend/agents/tools/memory_tool.py - REST API → Market data endpoints: serves quotes
backend/main.py - Market data endpoints → Market data service: fetches prices
backend/main.py - REST API → News endpoint: serves headlines
backend/main.py - News endpoint → News service: fetches articles
backend/main.py - REST API → History endpoint: serves history
backend/main.py - History endpoint → MongoDB: queries records
backend/main.py - REST API → Chat endpoint: serves chat
backend/main.py - Chat endpoint → Analysis orchestrator: runs casual chat
backend/main.py - Chat endpoint → Groq Llama model: requests response
- Agent lab → REST API: runs agent
- AI assistant → API client: requests chat
- Markets terminal → API client: requests market data
frontend/src/pages/Markets.jsx - History explorer → API client: requests history
frontend/src/pages/History.jsx - Dashboard → API client: requests metrics
frontend/src/pages/Dashboard.jsx