Zerodha and Groww give you a brokerage. Smallcase gives you curated baskets. Cresta gives you a reasoning engine.
| Zerodha / Groww | Smallcase | Wealthfront | Cresta | |
|---|---|---|---|---|
| AI Stock Scoring | β | β | Partial | β Ensemble ML (LSTM + XGBoost + ARIMA + FinBERT) |
| Explainable Signals | β | β | β | β Sentiment / Risk Fit / Valuation breakdown |
| Indian Language Support | β | β | β | β Hindi, Gujarati & Punjabi |
| 7-day Price Forecast | β | β | β | β Walk-forward validated ensemble |
| Email Watchlist Alerts | β | β | β | β Trigger-based, configurable |
| Risk Profiling (ML) | β | β | β | β XGBoost + NFCS 2021 real survey data |
| Email Verification | β | β | β | β Token-based, 24-hour expiry |
Built for the 200M+ Indians who invest without institutional-grade tooling.
Cresta dynamically classifies users as Conservative, Moderate, or Aggressive based on Age, Income, Investment Goals, and Risk Tolerance.
- Model: XGBoost Classifier
- Dataset: 25,000 profiles β 2,578 real NFCS 2021 Investor Survey respondents (FINRA Foundation) augmented with 22,422 synthetic profiles generated via SEBI income capacity guideline distributions and empirical behavioral noise.
- Accuracy: 68% (Validated on heterogeneous synthetic noise)
- Aggressive Recall: 97% β solved the high-bias "Moderate" issue
Explainable AI (XAI) β Feature Importance:
| Feature | Importance |
|---|---|
| Risk Tolerance | 61.35% |
| Income | 17.81% |
| Investment Goal | 14.75% |
| Age | 3.88% |
| Experience | 2.21% |
- Architecture: Attention-LSTM Hybrid + XGBoost + ARIMA Ensemble
- Attention Mechanism: Applies learned temporal weights across LSTM hidden states, allowing the model to selectively focus on the most predictive time steps rather than treating all historical observations equally.
- Ensemble Weights: (0.70 LSTM / 0.10 XGBoost / 0.20 ARIMA) selected via validation MAPE minimization across walk-forward folds β LSTM dominates long-horizon trend capture while ARIMA stabilizes short-term variance.
- Features (16): Close, Volume, SMA (5, 20), RSI (14), MACD, Bollinger Bands, OBV, FinBERT Sentiment (daily NSE-listed company headlines via yfinance news API, aggregated as mean sentiment score per ticker across all articles published within 24 hours), USD/INR Exchange Rate, India VIX, Crude Oil Futures
- Validation: Strict Walk-Forward Validation (3-fold expanding window, minimum 45-day folds) β no look-ahead bias
- Seed: Fixed at 42 for full reproducibility
- Dataset: 20 years of historical Nifty50 daily data (via Kaggle &
yfinance)
Forecasting Performance (Walk-Forward Validated):
| Ticker | Sector | Avg Ensemble MAPE | Status |
|---|---|---|---|
| RELIANCE.NS | Energy/Conglomerate | 1.33% | β Verified |
| TCS.NS | IT Services | 3.85% | β Verified |
| INFY.NS | IT Services | 2.69% | β Verified |
| HDFCBANK.NS | Banking | 2.67% | β Verified |
| ICICIBANK.NS | Banking | 2.51% | β Verified |
| SUNPHARMA.NS | Pharma | 0.82% | β Verified |
| MARUTI.NS | Auto | 7.66% | β Verified |
| ONGC.NS | Energy | 4.30% | β Verified |
Average Ensemble MAPE across test set: 3.23% (Dramatic improvement from ~11-18%)
Raw Market Data (OHLCV + News Headlines)
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Feature Engineering β
β RSI Β· MACD Β· Bollinger Β· SMA Β· OBV Β· β
β India VIX Β· USD/INR Β· Crude Β· FinBERT β
βββββββββββββββββββββ¬ββββββββββββββββββββββββββ
β 16 features
ββββββββββββ΄βββββββββββ
βΌ βΌ
βββββββββββββββ βββββββββββββββ
β Attention- β β XGBoost β
β LSTM β β Regressor β
β (temporal) β β (tabular) β
ββββββββ¬βββββββ ββββββββ¬βββββββ
β β
βΌ βΌ
βββββββββββββββ βββββββββββββββ
β ARIMA β β FinBERT β
β (baseline) β β (NLP sent) β
ββββββββ¬βββββββ ββββββββ¬βββββββ
βββββββββββ¬ββββββββββββ
βΌ
ββββββββββββββββββ
β Ensemble β
β 0.70/0.10/0.20β
βββββββββ¬βββββββββ
βΌ
AI Score + BUY / SELL / HOLD
7-day Price Forecast
graph TD
Client[React + Vite Frontend] <-->|HTTPS / REST API| Nginx[Nginx Reverse Proxy]
Nginx <-->|Gunicorn| Django[Django 5 Backend]
Django <-->|Task Queue| Redis[Redis Broker]
Redis <--> Celery[Celery + Celery Beat]
Celery <-->|Train/Predict| PyTorch[Attention-LSTM Engine]
Celery <-->|Analyze News| FinBERT[HuggingFace NLP]
Django <-->|Classify Risk| XGBoost[XGBoost Profiler]
Django <--> Postgres[(PostgreSQL)]
PyTorch <--> YF[yfinance API]
erDiagram
USER ||--o{ PORTFOLIO : owns
USER {
int id PK
string email
string password_hash
}
INVESTOR_PROFILE ||--|| USER : belongs_to
INVESTOR_PROFILE {
int id PK
int age
decimal income
int risk_tolerance
string user_class "Aggressive/Moderate/Conservative"
boolean email_verified
}
PORTFOLIO ||--o{ HOLDING : contains
PORTFOLIO {
int id PK
decimal total_value
decimal cash_balance
}
HOLDING ||--o{ ALERT : triggers
HOLDING {
int id PK
string ticker
decimal quantity
decimal average_buy_price
}
STOCK_PREDICTION {
string ticker PK
json history_array
json future_forecast_array
timestamp last_updated
}
ALERT {
int id PK
string ticker
string signal "Buy/Sell/Hold"
boolean is_active
}
PAPER_TRADE {
int id PK
string ticker
string action "BUY/SELL"
decimal quantity
decimal price_at_trade
timestamp created_at
}
WATCHLIST_ALERT {
int id PK
string ticker
decimal target_price
string condition "ABOVE/BELOW"
boolean triggered
}
- 7 Global Exchanges: BSE SENSEX, NSE NIFTY 50, FTSE 100, NYSE/DOW, IBOVESPA, NIKKEI 225, ASX 200
- Geographic Sync: Angular-distance phi detection ensures correct exchange card appears when that continent faces the camera
- Live Data: BSE SENSEX and NSE NIFTY 50 prices fetched live from backend API
- Theme-Aware: Globe adapts palette for Light and Dark mode via
ThemeContext
- Dark Mode: Deep charcoal
#121212Β· Light Mode: Cool off-white#f0f4f8 - Animated Background: Canvas-based breathing gradient with 3 independent radial emerald glows + 45 floating market data numbers (SENSEX values, βΉ prices, β²βΌ indicators)
- Complete cyanβemerald migration across all components, Tailwind config, and CSS variables
- Sentiment (40 pts): FinBERT NLP on daily NSE-listed company headlines
- Risk Fit (40 pts): Stock Beta matched against ML-classified user risk profile
- Valuation (20 pts): Price positioning relative to 52-week high/low
- Natural language reasoning generated per stock for full fiduciary transparency
- Dynamic green/red chart coloring across all charts based on price direction
- Growth Forecast: historical line colored by trend, AI forecast in blue with confidence shading
- Portfolio chart, holdings sparklines, market indices all follow same logic
- JWT with 15-minute access tokens and HttpOnly refresh rotation
- Email Verification: Token-based verification for all new signups (24-hour expiry, SMTP delivery)
- Google OAuth integration
- Stock ticker inputs validated against NSE/BSE suffix whitelist
- Computational DoS mitigation via PostgreSQL prediction cache
- Production:
SECURE_SSL_REDIRECT,X-Frame-Options: DENY, strict HSTS
react-i18nextsupporting English, Hindi, Gujarati, and Punjabi- All UI components, ML reasoning strings, and alerts translatable
- Real-time P&L tracking via
yfinance - Smart Buy/Sell/Hold alerts based on moving average crossovers
- Email watchlist price trigger alerts via SMTP
- Paper trading and watchlist alert models
- Live ticker tape: SENSEX, NIFTY, BANK NIFTY, NIFTY IT, NASDAQ, S&P 500, USD/INR, GOLD
| Category | Technology | Purpose |
|---|---|---|
| Frontend | React 18, Vite, TailwindCSS, COBE | UI, routing, globe visualization |
| Backend | Django 5, DRF | API layer, ML serving, alert triggers |
| Database | PostgreSQL | Users, holdings, watchlist, alerts |
| Cache | Redis | ML results, live ticker data |
| Auth | JWT + Google OAuth | Authentication, email verification |
| ML | PyTorch, XGBoost, statsmodels, FinBERT | Ensemble advisory engine |
| MLOps | MLflow | CV loss curves, model versions, hyperparameters |
| DevOps | Docker, Nginx, Gunicorn | Containerization, production serving |
| i18n | react-i18next | English, Hindi, Gujarati, Punjabi |
git clone https://github.com/Cypher-redeye/Cresta.git
cd Cresta
docker-compose up --build- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8000/api/
# Backend
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Fill in values
python manage.py migrate
python manage.py runserver
# Frontend
cd frontend
npm install
npm run dev| Variable | Description |
|---|---|
SECRET_KEY |
Django secret key |
DEBUG |
False in production |
DATABASE_URL |
PostgreSQL connection string |
REDIS_URL |
Redis connection URL |
ALLOWED_HOSTS |
Comma-separated allowed hosts |
CORS_ALLOWED_ORIGINS |
Frontend URL(s) |
EMAIL_HOST_USER |
SMTP sender address |
EMAIL_HOST_PASSWORD |
SMTP app password |
FRONTEND_URL |
Frontend URL for email verification links |
- Oracle Cloud Deployment β full ML stack on 4 OCPU / 24GB RAM free tier
- Portfolio Backtesting β simulate historical strategy vs Nifty50 benchmark with Sharpe ratio, drawdown, CAGR
- Options Chain Analyzer β IV and Greeks visualization for F&O traders
- Mutual Fund Coverage β extend AI scoring to top 50 Indian MFs
- Mobile App β React Native port with push-based watchlist alerts
- SEBI Compliance Pipeline β auditable reasoning logs for RIA regulations
- Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory. Neural Computation, 9(8), 1735β1780.
- Vaswani, A., et al. (2017). Attention Is All You Need. NeurIPS.
- Araci, D. (2019). FinBERT: Financial Sentiment Analysis with Pre-trained Language Models. arXiv:1908.10063.
- Chen, T., & Guestrin, C. (2016). XGBoost: A Scalable Tree Boosting System. KDD '16.
- Markowitz, H. (1952). Portfolio Selection. Journal of Finance, 7(1), 77β91.
Om Sharma AI Engineering Student Β· Parul University Β· Batch 2023β2027
Built end-to-end as a final year capstone project. Every architectural decision is production-intent.
Cresta is a production-ready, highly localized Robo-Advisory platform demonstrating the viable intersection of behavioral finance, deep learning, and modern web architecture.













