AI-Powered Market Sentiment & Volatility Intelligence Platform
A cutting-edge financial analysis tool that combines sentiment analysis from FinBERT AI with real-time market data to provide actionable insights for stock trading and portfolio management.
Keywords: sentiment analysis, stock market, AI trading, FinBERT, financial analysis, volatility analysis, RAG, vector database, LLM, market intelligence, technical analysis, stock screening, alpha detection, quantitative finance, machine learning, NLP, financial AI, trading signals, market sentiment
โ ๏ธ DISCLAIMER This repository was developed with the assistance of AI tools and is intended for educational and research purposes only. The code, models, and recommendations provided herein should not be used in production environments or for actual trading decisions without thorough review, validation, and testing by qualified professionals. No warranty is provided regarding accuracy, reliability, or suitability for any particular purpose. Users assume all risks associated with the use of this software.
Real-world demonstration of production-grade AI engineering applied to financial market intelligence:
- Bridge AI & Finance: Practical application of LLMs, RAG, vector databases, and NLP transformers in quantitative finance
- End-to-End Product Thinking: From data ingestion โ AI analysis โ interactive visualization โ professional reporting
- Engineering Excellence: Showcasing async architecture, comprehensive testing (114 tests, 76% coverage), CI/CD, and modular design patterns
Business Impact:
- Alpha Detection Engine: Auto-identifies high-sentiment, low-volatility opportunities with intelligent risk scoring
- Market Intelligence Map: Interactive quadrant visualization revealing strategic positioning across 4 zones: Alpha, Hype, Danger, Oversight.
- Professional PDF Reports: Client-ready analysis with market map visualization and actionable insights
- Competitive Analysis Agent: Autonomous peer-universe research with sector narrative, confidence scoring, and competitive PDF export
AI/ML Engineering:
- FinBERT Sentiment Analysis: Fine-tuned transformer model (ProsusAI) for financial news sentiment scoring
- RAG Sector Insights: ChromaDB vector search + LLM generation for sector-wide commentary
- Config-Driven Sector Control: Dedicated Sector News tab for Sector DB operations plus Config tab for editable ticker-sector mapping
- Multi-LLM Support: Provider abstraction layer with graceful fallback (OpenAI/Anthropic/HuggingFace FREE models)
- Multi-Agent Orchestration: Lightweight
asynciosupervisor with specialized worker agents for autonomous sector research
Technical Architecture:
- 10x Faster with Async: Parallel processing across 50+ tickers using
asynciopatterns - Startup Performance Telemetry: Initial load now emits per-step timing logs (page config, session init, sidebar, tabs) visible in the Logs tab
- Testing Excellence: 114 unit tests with mocking, fixtures, edge cases (timeout, rate limits, malformed data)
- CI/CD Pipeline: GitHub Actions with automated lint, test, coverage, and security scanning using
uvfor 10-100x faster builds - Security First: Automated security scanning with Bandit, Safety, pip-audit, and Trivy; SARIF results uploaded to GitHub Security
- Code Quality: Pre-commit hooks (Black, isort, flake8, mypy) ensuring consistent, production-ready code
Interactive UI Walkthrough - See the platform in action with real-time sentiment analysis, quadrant mapping, and intelligent insights. More screenshots (PNG) are available in docs/images/ for full-resolution stills and reference.
View Sample PDF Report - Professional market analysis report generated by the platform
The Senticor Market Map positions stocks in four strategic zones:
- ๐ข Alpha Zone: Positive sentiment + Low volatility
- ๐ต Hype Zone: Positive sentiment + High volatility
- ๐ด Danger Zone: Negative sentiment + High volatility
- โช Oversight: Negative sentiment + Low volatility
Tech Stack: Streamlit, FinBERT (Transformers), LangChain, ChromaDB, OpenBB Platform, Plotly, Pytest
Architecture: Modular layered design with separation between presentation, business logic, and utilities.
๐ For detailed system architecture, module breakdown, and data flows, see docs/ARCHITECTURE.md
๐ For the new Competitive Analysis Agent workflow and output schema, see docs/COMPETITIVE_ANALYSIS.md
๐ New to the project? Start with the comprehensive learning guide: docs/LEARNING_GUIDE.md
The Senticor Engine UI is fully responsive and optimized for mobile devices! Access your market intelligence on-the-go with:
- Auto-responsive layouts that stack on mobile (< 768px)
- Touch-friendly controls with minimum 44x44px touch targets
- Collapsible sidebar for maximum screen real estate
- Responsive charts that scale to fit any screen size
- Optimized typography with device-specific font sizes
๐ See full mobile features and testing guide: docs/MOBILE.md
Quick Mobile Access:
# Run Streamlit with network access
streamlit run src/app.py --server.address 0.0.0.0
# Then visit from your mobile device:
# http://<your-computer-ip>:8501- Python 3.11 or higher
- pip package manager
- Virtual environment (recommended)
# Clone the repository
git clone https://github.com/yourusername/ai-senticor-engine.git
cd ai-senticor-engine
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the application
streamlit run src/app.pyTo prevent Streamlit from sending usage statistics, create or edit the config file:
# Create the Streamlit config directory
mkdir -p ~/.streamlit # On Windows: %USERPROFILE%\.streamlit
# Add the following to ~/.streamlit/config.toml
[browser]
gatherUsageStats = falseThis disables telemetry and keeps your usage data private.
Some data providers require API keys. OpenBB Platform uses a centralized credential system.
Environment Variables
# Create a .env file in the project root
OBB_FMP_API_KEY=your_fmp_key_here
OBB_POLYGON_API_KEY=your_polygon_key_here
OBB_BENZINGA_API_KEY=your_benzinga_key_here
OBB_ALPHA_VANTAGE_API_KEY=your_av_key_hereProvider-Specific Keys:
- FMP (Financial Modeling Prep): Get free key
- Polygon.io: Get free key
- Benzinga: Get key
- Alpha Vantage: Get free key
- Intrinio: Get key
Note: Yahoo Finance (yfinance) does not require an API key.
-
Launch the App
streamlit run src/app.py
-
Configure RAG Sector Analysis (Optional)
- Enable/disable Sector News Analysis in the sidebar
- Select LLM provider: HuggingFace (Free), OpenAI, or Anthropic
- Choose model and temperature settings
-
Configure Ticker-Sector Mapping
- Open the "โ๏ธ Config" tab
- Edit the Ticker-Sector Mapping table (add/remove tickers or update sectors)
- Click Save Mapping Changes
- Sidebar tickers are read-only and automatically sourced from this mapping table
-
Run Analysis
- Click "๐ Run Engine" to fetch data and generate insights
- Alpha flags automatically appear in sidebar
-
Explore Results
- View the Market Map for overall positioning with sortable market summary
- Check "๐ฏ Alpha Flags" in the sidebar for top opportunities
- Use "Company Intelligence" tab for detailed stock analysis with risk-adjusted recommendations
- Use "Competitive Analysis" tab for peer-universe intelligence, signal comparison, and confidence-scored narrative
- Use the "๐ฐ Sector News" tab for:
- Sector DB controls (clear DB, load all sector news)
- Lookback window selection from 1D to 1M (default 7D)
- Browsing all persisted sector news with filtering
- Use the "โ๏ธ Config" tab for persistent ticker-sector mapping management
- Use the "๐ Logs" tab to inspect startup timing breakdown on first load (helps identify slow initialization steps)
- Custom ticker-sector overrides are persisted locally at
data/custom_sector_mapping.json - Overrides are loaded automatically on app startup/rerun
- Reset in Config clears both session state and the JSON override file
- Generate Report
- Download PDF report for documentation or presentations
- Download Competitive PDF report from the Competitive Analysis tab
All configuration is centralized in src/config.py for easy customization:
- LLM Providers: Configure OpenAI, Anthropic, or HuggingFace models
- Risk Thresholds: Adjust alpha detection sentiment/volatility thresholds
- Data Sources: Switch between yfinance, Polygon, FMP, and other providers
- Visualization: Customize chart heights, colors, and quadrant zones
- Analysis Parameters: Configure headline counts, trading days, temperature settings
For detailed RAG and sector news configuration, see docs/RAG_SECTOR_NEWS.md.
# Dockerfile included in repository
docker build -t senticor-engine .
docker run -p 8501:8501 senticor-engineRun tests locally:
python -m pytest -qCI runs automatically at .github/workflows/ci.yml on push and PRs.
- See
CONTRIBUTING.mdfor contribution guidelines and how to run tests. - File issues or feature requests at the repo Issues page.
- For quick questions, open an issue and tag maintainers.
MIT โ see LICENSE for details.
- FinBERT: ProsusAI for the financial sentiment model
- OpenBB: For providing comprehensive financial data API
- Streamlit: For the amazing web framework
See docs/ROADMAP.md for the complete product roadmap.
Upcoming Highlights:
- ๐ค Competitive Analysis Agent v2.0 - Extend current shipped multi-agent pipeline with LangGraph memory, hypothesis generation/testing, and deeper pattern mining
- ๐ Backtesting Engine - Historical performance analysis with Sharpe ratio, max drawdown, and strategy validation
- ๐ Real-time Streaming - WebSocket integration for live price updates and sentiment feeds
- ๐ Portfolio Optimizer - Modern Portfolio Theory (MPT) with efficient frontier calculation
- ๐ฏ ML Volatility Forecasting - LSTM/GARCH models for volatility prediction with uncertainty quantification
- ๐ง Alert System - Configurable notifications via email/SMS/Slack for alpha opportunities
- ๐ User Authentication - Multi-user support with portfolio tracking and personalized watchlists
- ๐ฑ API Backend - REST/GraphQL API for programmatic access and third-party integrations
โญ If you find this project useful, please consider giving it a star!


