FinSight AI is a production-grade multi-agent system designed to perform comprehensive investment analysis. It combines Quantitative Finance (Technical Analysis), Machine Learning (XGBoost Forecasting), and Generative AI (Llama-3 via Groq) to deliver actionable insights.
Unlike simple chatbots, FinSight triangulates data from three sources—Price Action, News Sentiment, and Company Filings—to generate professional-grade investment memos.
- 🤖 Multi-Agent Architecture:
- Quant Agent: Calculates RSI, MACD, Bollinger Bands, and runs XGBoost price predictions.
- Sentiment Agent: Analyzes market psychology using NewsAPI & VADER (Social Sentiment).
- Research (RAG) Agent: Retrieves fundamental risks from 10-K filings using Vector Search.
- Manager Agent: Synthesizes all data into a cohesive investment report using Llama-3.
- 📊 Interactive Dashboard: Built with Streamlit & Plotly. Includes Candlestick charts, moving averages, and live metrics.
- 📈 Backtesting Engine: Simulates historical performance of strategies (e.g., Golden Cross) vs. Buy & Hold.
- 💾 Robust Data Engineering:
- SQLite Database: Caches stock data for offline access and speed.
- Hybrid Fallback: Tries Database -> Fails to API -> Updates Database.
- 🐳 Production Ready: Includes Docker support, Pytest suite, and a FastAPI backend.
The system uses LangGraph to orchestrate a directed acyclic graph (DAG) of agents:
- User Input: Ticker Symbol (e.g., AAPL, BTC-USD).
- Parallel Execution: Quant, Sentiment, and RAG agents run simultaneously.
- Synthesis: The Manager Agent (LLM) receives structured JSON from all sub-agents.
- Output: A structured Markdown report + Interactive Visualizations.
- LLM & Orchestration: LangChain, LangGraph, Groq (Llama-3-70b).
- Machine Learning: XGBoost, Scikit-Learn.
- Data & Database: yfinance, SQLite, SQLAlchemy.
- Sentiment: NewsAPI, VADER Sentiment.
- Vector DB: ChromaDB / HuggingFace Embeddings.
- Frontend: Streamlit, Plotly.
- Backend API: FastAPI.
git clone [https://github.com/yourusername/finsight-ai.git](https://github.com/yourusername/finsight-ai.git)
cd finsight-aiCreate a .env file in the root directory:
GROQ_API_KEY=gsk_your_key_here
NEWS_API_KEY=your_newsapi_key
pip install -r requirements.txtRun the ingestor to populate your local SQLite database with initial data:
python -m src.data_engine.ingestor_quantOption A: Streamlit Dashboard (UI)
streamlit run src/ui/app.pyOption B: FastAPI Backend
uvicorn src.api.main:app --reloadOption C: Docker
docker build -t finsight .
docker run -p 8501:8501 --env-file .env finsightFinSight/
├── docs/ # Documentation & Architecture diagrams
├── logs/ # Application logs
├── notebooks/ # Jupyter notebooks for research & experiments
├── src/
│ ├── agents/ # LangGraph Agent logic (Quant, RAG, Sentiment)
│ ├── api/ # FastAPI backend endpoints
│ ├── data_engine/ # Database (SQLite) & Ingestion scripts
│ ├── ml_engine/ # XGBoost training, Backtesting, & Feature Engineering
│ └── ui/ # Streamlit Frontend
├── tests/ # Pytest suite
├── Dockerfile # Containerization setup
└── requirements.txt # Python dependencies
Run the automated test suite to ensure signal logic and API endpoints are working:
pytest tests/Contributions are welcome! Please open an issue or submit a pull request for any features, bug fixes, or documentation improvements.
This project is licensed under the MIT License - see the LICENSE file for details.