Overview
The Quantitative Trading Bot is a comprehensive algorithmic trading platform that combines machine learning models, technical analysis strategies, and real-time market data processing to execute trades across multiple asset classes. The system integrates a Next.js frontend for visualization and strategy management with a FastAPI backend handling data ingestion, model inference, and trade execution. With a portfolio value exceeding $152K and a documented 66.7% win rate, the platform demonstrates production-grade quantitative finance capabilities from signal generation through execution and performance analysis.
Key Features
Real-Time Trading Dashboard
The dashboard provides a live view of market conditions, active positions, pending orders, and account performance. Price charts with configurable timeframes display candlestick data overlaid with technical indicators including RSI, MACD, Bollinger Bands, and moving averages. Portfolio allocation is visualized through interactive pie charts and treemaps. A real-time order book display shows bid/ask depth for active trading pairs. The dashboard updates via WebSocket connections to ensure minimal latency between market events and visual representation.
- Live Price Charts - Candlestick charts with configurable timeframes and technical indicator overlays
- Portfolio Overview - Real-time asset allocation, P&L tracking, and exposure analysis across positions
- Order Management - Active orders, execution history, and one-click order modification or cancellation
- Account Metrics - Running P&L, Sharpe ratio, maximum drawdown, and daily/weekly/monthly performance summaries
Strategy Builder
The platform includes a visual strategy builder where users can configure, combine, and backtest trading strategies before deploying them live. Pre-built strategies include RSI Mean Reversion, Moving Average Crossover, and ML-based Price Prediction. Each strategy exposes configurable parameters such as lookback periods, threshold values, position sizing rules, and stop-loss/take-profit levels. Strategies can be combined into ensemble models where multiple signals are weighted and aggregated before generating a final trade decision.
AI News Signals with 5-Gate Trust Scoring
A distinctive feature of the platform is its AI-powered news analysis pipeline that processes financial news articles through a 5-Gate trust scoring system. Each news item passes through gates evaluating source credibility, factual consistency, sentiment alignment with market data, temporal relevance, and historical accuracy of the source. Only signals that pass all five gates with sufficient confidence scores influence trading decisions. This multi-gate approach dramatically reduces false signals from sensationalized or unreliable news sources.
TCN (Temporal Convolutional Network) System
The ML pipeline features a Temporal Convolutional Network architecture for time series prediction that provides advantages over traditional RNN approaches. The TCN processes historical price data, volume, technical indicators, and engineered features through dilated causal convolutions, capturing both short-term patterns and long-range dependencies in market behavior. The regime detection module achieves 82% confidence in identifying market states such as trending, mean-reverting, and volatile regimes, allowing the strategy selection to adapt dynamically to current conditions.
Backtesting Engine
Before deploying any strategy to live trading, the backtesting engine simulates performance against historical data. The engine accounts for realistic trading conditions including slippage, commission costs, market impact, and partial fills. Walk-forward analysis prevents overfitting by dividing historical data into rolling train/test windows. Performance metrics include Sharpe ratio, Sortino ratio, maximum drawdown, Calmar ratio, win rate, profit factor, and risk-adjusted return comparisons against benchmark indices.
ML SHAP Explainability
Every ML-generated trading signal includes SHAP (SHapley Additive exPlanations) values that decompose the prediction into feature contributions. This transparency allows traders to understand exactly which factors drove a particular buy or sell recommendation. SHAP waterfall plots visualize the contribution of each input feature, enabling informed decisions about whether to follow or override ML suggestions. This explainability layer builds trust in the automated system and satisfies potential regulatory requirements for algorithmic trading accountability.
Technical Implementation
The frontend is built with Next.js using React, TypeScript, and TanStack Query for efficient server state management. Three.js powers 3D portfolio visualizations, while Recharts handles traditional charting needs. The backend uses FastAPI with Python, featuring async SQLAlchemy for database operations and Redis for caching, rate limiting, and pub/sub messaging between services. The ML pipeline leverages TensorFlow and PyTorch for model training and inference, with scikit-learn for feature engineering and preprocessing. PostgreSQL stores all trading data, model artifacts metadata, and user configurations.
- Next.js frontend with TanStack Query, Recharts, and Three.js for visualization
- FastAPI backend with async SQLAlchemy, Redis queue workers, and APScheduler
- TensorFlow/PyTorch for TCN model training, inference, and regime detection
- PostgreSQL for trade history, model metadata, and strategy configurations
- Redis for caching, pub/sub, and distributed task queuing
- SHAP for ML model explainability and feature importance analysis
Purpose and Context
The Quantitative Trading Bot was developed as a comprehensive exploration of applying modern ML techniques to financial markets. Beyond the trading functionality itself, the project serves as a demonstration of full-stack engineering across Python and TypeScript ecosystems, real-time data processing at scale, production ML operations with model versioning and monitoring, and building user-facing tools that make complex quantitative systems accessible. The 5-Gate trust scoring for news signals and SHAP-based explainability represent innovations that address real challenges in algorithmic trading: information quality and decision transparency.



