TradeX
Trade evolved with time.
Created on 12th April 2026
•
TradeX
Trade evolved with time.
The problem TradeX solves
🎯 The Problem
India has 190 million+ demat accounts, yet 90% of retail traders lose money in their first year.
• No safe practice ground — New traders risk real capital while learning. One bad trade can wipe out months of savings.
• Information overload — Dozens of indicators, conflicting signals, and scattered news. Traders don't know what to trust.
• Expensive tools — Institutional-grade analytics (Bloomberg, Reuters) cost ₹50,000+/year — inaccessible to students and beginners.
• Emotional trading — Without data-driven conviction, traders chase tips, panic sell, and revenge trade.
• Fragmented workflow — Switching between chart platforms, news sites, screeners, and brokers wastes time and causes missed opportunities.
✅ How TradeX Solves It
-
Risk-Free Learning Environment
Trade 15 NIFTY 50 stocks with ₹1,00,000 in virtual capital. Make mistakes, test aggressive strategies, and build confidence — without losing a single rupee. -
One Unified Conviction Score
Instead of drowning in 20+ indicators, TradeX fuses XGBoost ML prediction + FinBERT news sentiment + Connors RSI-2 into a single 0–100 Conviction Score with a clear BUY / HOLD / SELL action. No more analysis paralysis. -
Institutional-Grade AI — For Free
The same tools hedge funds use — gradient-boosted price forecasting, NLP-powered sentiment analysis, regime detection, and price-sentiment divergence alerts — accessible to anyone with a browser. -
Data-Driven, Not Emotion-Driven
Every trade decision is backed by quantifiable signals. The Confluence Engine tells you why it's recommending an action — which model agrees, which disagrees, and what the dominant signal is. -
Everything in One Place
Live prices, technical charts, AI predictions, news sentiment, portfolio tracking, risk scoring, and a global leaderboard — all in a single premium interface. No tab-switching. No paid subscriptions.
💡 In short:
TradeX bridges the gap between "I want to trade" and "I know how to trade" — by giving every aspiring trader an AI-powered sandbox to learn, practice, and build conviction before committing real capital.
Challenges we ran into
âš¡ Challenges I Faced
-
Real-Time Price Simulation Without Paid APIs
Getting realistic price movement without a paid market data API was tricky. Random noise made prices look fake. I solved this by implementing an Ornstein-Uhlenbeck mean-reversion process — a stochastic model from quantitative finance — that anchors simulated prices to real Yahoo Finance data. The result is price movement that feels authentic without needing a ₹50,000/year data feed. -
FinBERT Model Loading Time & Memory
The FinBERT transformer model is ~420MB and takes 15-20 seconds to load. This caused the first sentiment request to timeout. I fixed this by pre-warming the model in a background thread during server startup, so it's ready before any user hits the endpoint. I also added graceful fallback to mock sentiment if the model fails to load on low-memory machines. -
Fusing Three Different Signal Types Into One Score
The hardest engineering challenge was combining XGBoost predictions (continuous price values), FinBERT sentiment (categorical: positive/neutral/negative), and Connors RSI-2 (0-100 oscillator) into a single meaningful Conviction Score. Each signal has different scales, confidence levels, and update frequencies. I designed a weighted scoring system where each component contributes up to ~33 points, with regime-aware RSI mapping and confidence-scaled sentiment, so no single model can dominate the final score unfairly. -
WebSocket Price Broadcasting From a Sync Thread
The price drift loop runs in a synchronous background thread (because it uses time.sleep), but WebSocket broadcasting is async. Bridging sync-to-async in FastAPI without race conditions or event loop conflicts required creating a new event loop per broadcast cycle and carefully handling dead client cleanup to prevent memory leaks. -
XGBoost Feature Engineering & Overfitting
My first XGBoost model had great training accuracy but terrible test performance — classic overfitting. I iterated through feature engineering (adding Bollinger Band width, momentum, volatility), added regularization (L1/L2), tuned hyperparameters (subsample=0.8, colsample=0.75, min_child_weight=3), and used a proper 80/20 temporal split (not random split, which leaks future data). The final model achieves meaningful directional accuracy without memorizing noise. -
Handling yfinance Rate Limits During Startup
Downloading 1 year of OHLCV data for 15 stocks sequentially at startup was slow and sometimes hit Yahoo Finance rate limits. I added per-symbol error handling with fallback prices so one failed download doesn't crash the entire platform — the app starts with whatever data it can get.
Technologies used
