SMART INVEST AGENT AI-Powered Stock Market Intelligence for Indian Equity Markets NSE / BSE | Real-Time Signals | Gemini AI | 3D Immersive UI
INSPIRATION
India has over 14 crore demat account holders, yet the vast majority trade on instinct, tips, and delayed news — while institutions run sophisticated AI systems, real-time scanners, and quantitative models. The gap between retail and institutional investing has never been wider, and it is almost entirely an information and tooling gap. Smart Invest Agent was built because every retail investor deserves the same quality of signal, analysis, and insight that hedge funds have access to. A promoter quietly buys ₹12 crore of their own stock. A classic cup-and-handle forms on a mid-cap over 6 weeks. An earnings call contains a buried upward guidance revision. An institutional-grade system catches all three before the news cycle does.
WHAT IT DOES
Smart Invest Agent is a full-stack AI platform that monitors Indian equity markets around the clock and surfaces actionable intelligence through four specialized engines: Opportunity Radar (AI Agent) An autonomous agent that scans thousands of data points across NSE/BSE — insider trading disclosures, bulk deals, corporate announcements, and quarterly results — and detects high-confidence buy/sell signals. Google Gemini AI provides the reasoning layer, explaining precisely why each signal was triggered with cited evidence. Chart Pattern AI A real-time technical analysis engine that automatically identifies classic formations across the full NSE/BSE universe, including Double Bottoms and Tops, Ascending and Descending Triangles, Head and Shoulders patterns, and Support and Resistance breakouts. Each pattern is scored with a historical success rate, giving investors a statistically grounded context for every alert. Market Chat AI A dedicated financial AI assistant built on Gemini that can analyze stock-specific news and sentiment, explain complex company earnings in plain language, provide real-time quotes, and draw historical comparisons — all within a conversational interface that understands the user's portfolio context. Video Engine (AI Reels) A content generation engine that analyzes daily market trends and produces viral-ready, 3-part social media scripts for Instagram Reels and YouTube Shorts in seconds. Built for financial content creators who need to move as fast as the market. Notion MCP Knowledge Base Integrated via the Notion Model Context Protocol, every insight the platform generates is automatically logged, structured, and made searchable across five persistent databases: Signals Tracker, Pattern Outcomes, Research Notes, Reels Archive, and Chat Memory. The AI gains long-term memory — six months of signals, outcomes, and analysis.
HOW I BUILT IT
The platform is built as a Dockerized full-stack application with a clean separation between a Python backend and a Next.js frontend, connected via WebSocket for real-time streaming. Backend — FastAPI on Python 3.13 The core API is built with FastAPI for high-throughput async endpoints. Market data is sourced via yfinance with APScheduler running background hydration jobs that pre-compute dashboard data so every page load stays under 50ms. SQLAlchemy manages persistence across PostgreSQL (production) and SQLite (development). The Gemini AI SDK powers all LLM reasoning tasks — signal analysis, pattern explanation, chat responses, and script generation. Frontend — Next.js 16 with Turbopack The UI is built on Next.js 16 with Turbopack for fast hot-reloading. Three.js via React Three Fiber renders the immersive 3D scene. Framer Motion handles all transitions and micro-interactions. Recharts powers the 2D data visualization layer. Zustand manages global application state. The entire interface runs in a premium dark-mode aesthetic designed to feel closer to a Bloomberg terminal than a consumer app. Notion MCP Integration The Notion MCP server is configured as a tool in all Gemini API calls that require persistence. The AI itself creates, queries, and updates Notion pages as a natural part of its reasoning — no separate webhook pipeline. An APScheduler job runs bidirectional sync every 5 minutes, pushing new signals to Notion and pulling back any status changes analysts make manually. Tech Stack: FastAPI · Python 3.13 · Gemini AI · yfinance · SQLAlchemy · Next.js 16 · Three.js · Framer Motion · Recharts · Zustand · Docker · PostgreSQL · APScheduler · WebSocket · Notion MCP
CHALLENGES I RAN INTO
Real-time data without a paid feed — NSE and BSE do not provide free real-time APIs. A background hydration architecture using APScheduler pre-fetches and caches market data on a rolling basis, achieving sub-50ms dashboard loads without any paid data subscription. Pattern detection accuracy vs. speed — Running a CNN-based pattern recognition model across 1,700+ NSE stocks in near-real-time required careful batching, parallel processing, and aggressive caching. Confidence thresholds were carefully calibrated against historical backtests before surfacing any alert. Notion MCP bidirectional sync consistency — Keeping the Notion knowledge base in sync with PostgreSQL without race conditions or duplicates required careful idempotency design. Every record carries a Notion page ID once synced, and a last-write-wins strategy with timestamp comparison handles pull-back of status changes. 3D performance on mid-range hardware — The Three.js Financial Universe scene required level-of-detail rendering, frustum culling for off-screen nodes, and debounced data binding to stay smooth on mid-range laptops without sacrificing visual fidelity.
ACCOMPLISHMENTS THAT I'M PROUD OF
Sub-50ms dashboard load times achieved without a paid real-time data feed, using background hydration architecture. End-to-end signal pipeline: from a corporate filing on NSE to a structured, AI-reasoned alert in the UI in under 90 seconds. Notion MCP knowledge base that gives the AI genuine long-term memory across all four feature agents, compounding in value with every interaction. Chart pattern detection running across the full NSE universe with backtested success rates, not just static pattern matching. A Video Engine that turns daily market data into publish-ready social media scripts — bridging financial intelligence and content creation. A 3D immersive interface that makes institutional-grade data feel accessible and enjoyable to explore.
WHAT I LEARNED
MCP as memory architecture — Notion MCP is not just a CRM integration — it is a viable long-term memory layer for AI systems. Giving the AI the ability to read and write structured knowledge as part of its reasoning chain fundamentally changes what it can do across sessions. Latency is a product feature — In financial applications, perceived latency directly affects trust. The engineering effort to achieve sub-50ms loads paid dividends not just in performance but in how users perceived the platform's reliability and credibility. Explainability over accuracy — Users consistently preferred a signal with a clear, cited reasoning chain over a higher-confidence signal with no explanation. Gemini's ability to generate structured justifications was as important as the underlying signal detection logic. Background workers as UX — APScheduler running silent background jobs that pre-compute everything before a user loads a page is one of the highest-leverage UX improvements possible for data-heavy applications. 3D UI requires disciplined scope — Three.js gives infinite creative freedom, which makes scope creep easy and performance degradation likely. The most important decision was defining exactly what belongs in 3D and what belongs in the 2D overlay — and not crossing those lines.
WHAT'S NEXT FOR SMART INVEST AGENT
Mobile Application — A React Native mobile app with push notifications for high-strength signals. Mobile is where retail investors spend most of their time — the Opportunity Radar's value multiplies with instant alerts on phones. Options Chain Intelligence — Extending the Chart Pattern AI to cover F&O data — unusual options activity, open interest changes, and put/call ratio shifts — adds an entirely new signal layer that institutional traders monitor closely. Portfolio-Aware Recommendations — Integrating broker APIs (Zerodha Kite, Groww, Upstox) to give the Market Chat AI live portfolio context, enabling recommendations that account for existing allocation, concentration risk, and tax implications. Community Intelligence Layer — Building a shared signal feed where verified users can annotate the Notion knowledge base with their own analysis and outcome tracking — turning the platform's institutional memory into a collective intelligence resource. Backtesting Studio — A self-serve backtesting interface that lets users define custom signal criteria and run them against 5 years of NSE historical data, with results automatically stored in the Notion Pattern Outcomes database.
Smart Invest Agent | Built for the ET Markets AI Hackathon | NSE/BSE Intelligence Platform
Built With
- fastapi-(python-3.13)
- framer-motion
- google-gemini-ai-sdk
- next.js-16-(turbopack)
- recharts
- tailwind-css
- three.js-(react-three-fiber)
- yfinance
Log in or sign up for Devpost to join the conversation.