AI-Powered Market Fraud Detection Platform for India's Securities Market
Sentinel Shield is a sophisticated, real-time AI surveillance platform designed to detect and prevent market manipulation schemes. Built for the Securities Market Hackathon, it protects retail investors from pump-and-dump scams through advanced multi-modal intelligence fusion.
Safeguard market integrity and protect retail investors by providing regulators with cutting-edge AI-powered surveillance tools that detect fraudulent activity before it causes systemic harm.
- Python 3.12+
- Node.js 20+
- Docker & Docker Compose
# Clone the repository
git clone https://github.com/harshil748/Sentinel-Shield.git
cd Sentinel-Shield
# Start the database
docker-compose up -d
# Start backend (Terminal 1)
cd backend && pip install -r requirements.txt && uvicorn main:app --reload --port 8000
# Start frontend (Terminal 2)
cd frontend && npm install && npm run dev
๐ Access the application: http://localhost:5173
Sentinel Shield employs a Trinity of Evidence approach, correlating signals from three distinct intelligence streams:
- NLP-powered analysis of social media platforms
- Real-time sentiment analysis and manipulation detection
- Entity recognition for coordinated messaging
- Multi-language support for Indian markets
- Enhanced EWMA anomaly detection
- ML Isolation Forest for pattern recognition
- Volume spike detection via statistical analysis
- Price momentum anomaly identification
- SEBI intermediary verification with trust scoring
- Entity credibility analysis
- Risk level classification
- Regulatory compliance tracking
Sentinel-Shield/
โโโ ๐ง backend/ # FastAPI Backend
โ โโโ main.py # Core AI models & API
โ โโโ requirements.txt # Python dependencies
โโโ ๐ฅ๏ธ frontend/ # React Frontend
โ โโโ src/ # Source code
โ โโโ package.json # Node.js dependencies
โ โโโ tailwind.config.js # TailwindCSS config
โโโ ๐ณ docker-compose.yml # PostgreSQL setup
โโโ ๐ ARCHITECTURE.md # Technical details
โโโ ๐ README.md # This file
Layer | Technology | Purpose |
---|---|---|
Backend | FastAPI + Python 3.12 | High-performance async API |
AI/ML | Scikit-learn + Pandas + NumPy | Anomaly detection & NLP |
Frontend | React 19 + Vite + TailwindCSS | Modern dashboard interface |
Charts | LightweightCharts | Professional financial visualizations |
Database | PostgreSQL | Time-series data storage |
Deployment | Docker + Docker Compose | Containerized services |
- Multi-timeframe analysis with trend divergence scoring
- Z-score normalization for standardized alerts
- Real-time pattern recognition
- Feature engineering with 5+ technical indicators
- Multi-dimensional anomaly scoring
- Adaptive contamination thresholds
- Manipulation keyword detection with curated patterns
- Financial context-aware sentiment scoring
- Entity extraction for coordinated messaging
- SEBI verification with dynamic scoring (5-95 points)
- Content analysis for manipulation indicators
- Risk level classification (Low/Medium/High/Critical)
- Real-time threat levels: Minimal โ Low โ Medium โ High โ Critical
- Dynamic color coding for immediate risk assessment
- Confidence scoring (0-100%) for manipulation detection
- Professional financial visualizations using LightweightCharts
- Real-time price and volume data
- Anomaly highlighting with severity indicators
- Historical alert analysis with advanced filtering
- CSV export for compliance reporting
- Deep forensic analysis with social media correlation
- 4-tier severity classification
- Real-time alert feed with timestamps
- Detailed manipulation confidence scores
Endpoint | Method | Description |
---|---|---|
/fetch_live_alert |
GET | Real-time analysis with alert generation |
/social_analysis |
GET | Social media signal analysis |
/threat_score |
GET | Current market threat assessment |
/alerts |
GET | Historical alert queries with filters |
/verify_entity |
GET | Entity verification & trust scoring |
๐ Full API Documentation: http://localhost:8000/docs
# Test real-time manipulation detection
curl "http://localhost:8000/fetch_live_alert?symbol=RELIANCE.NSE"
# Query suspicious activity in last 24 hours
curl "http://localhost:8000/alerts?symbol=RELIANCE.NSE&since_hours=24"
# Check current market threat level
curl "http://localhost:8000/threat_score"
# Backend environment variables
cd backend
cp .env.example .env
# Edit .env with your API keys (optional for demo mode)
The platform includes sophisticated simulation capabilities:
- Correlated price-volume movements with manipulation spikes
- Time-series continuity with realistic trading patterns
- Dynamic anomaly injection for demonstration
- Contextual manipulation messages based on market conditions
- Multi-platform signal generation (Telegram, WhatsApp, Twitter)
- Coordinated timing with market anomalies
- Verified vs. unverified entity scenarios
- Content-based credibility analysis
- Dynamic risk level assignment
โ
Proactive surveillance of messaging platforms
โ
Evidence correlation for enforcement actions
โ
Real-time market threat assessment
โ
Compliance monitoring support
โ
ScamAdvisor-style warnings for manipulated stocks
โ
Entity verification before following advice
โ
Educational awareness of manipulation tactics
โ
Risk management API integration
โ
Client activity monitoring for compliance
โ
Market surveillance enhancement
- Enhanced NLP for regional Indian languages
- Expanded social media platform coverage
- Real-time Telegram/WhatsApp integration
- Deepfake detection for audio/video manipulation
- Broker API integration for pilot programs
- Advanced network analysis for coordination detection
- Cryptocurrency market expansion
- Predictive manipulation modeling
- Cross-border surveillance capabilities
๐ฏ Multi-modal Intelligence Fusion - Unique correlation of social and market signals
โก Real-time Processing - Sub-second alert generation capability
๐ฎ๐ณ Indian Market Focus - Specialized for NSE/BSE and regional languages
โ๏ธ Regulatory Alignment - Direct support for SEBI priorities
โ๏ธ Scalable Architecture - Cloud-native design for enterprise deployment
We welcome contributions! Please follow these steps:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/enhancement
) - ๐พ Commit your changes (
git commit -m 'Add new feature'
) - ๐ค Push to the branch (
git push origin feature/enhancement
) - ๐ Open a Pull Request
- Follow existing code style and formatting
- Add tests for new functionality
- Update documentation as needed
- Ensure all checks pass before submitting
Team: Praesidio Analytics
Mission: Protecting market integrity through advanced AI surveillance
Email: pharshil748@gmail.com
- Technical Architecture
- Project Completion Summary
- API Documentation (when running locally)
This project is licensed under the MIT License - see the LICENSE file for details.