BackTrade
BackTrade is a sophisticated trading backtesting platform designed for professional traders and quantitative analysts. The platform provides a deterministic environment where users can launch trading sessions at any historical timestamp, execute trades as if operating in real-time during past market conditions, and access detailed performance analytics.
About This Project
Overview
BackTrade is a sophisticated trading backtesting platform designed for professional traders and quantitative analysts. The platform provides a deterministic environment where users can launch trading sessions at any historical timestamp, execute trades as if operating in real-time during past market conditions, and access detailed performance analytics.
Core Capabilities
- Historical Trading Simulation: Launch trading sessions at any historical timestamp with full market data replay
- Multi-Session Management: Run multiple concurrent trading sessions with different instruments and parameters
- Real-Time Controls: Interactive time controls with play/pause functionality and variable speed settings (0.5x, 1x, 2x, 5x, 10x)
- Advanced Analytics: Comprehensive trading performance metrics and detailed session analytics
- Professional Tools: Position management, risk controls, and sophisticated order execution
- Subscription Tiers: Role-based access control with tiered subscription system
Features
Trading Features
- Multi-Session Management: Run multiple concurrent trading sessions with different instruments
- Real-Time Simulation: Interactive time controls with play/pause and variable speed settings -Position Management: Open, modify, and close positions with real-time P&L tracking
- Advanced Analytics: Comprehensive trading performance metrics and session analytics
- Multiple Instruments: Support for various trading instruments (XAUUSD, EURUSD, etc.) and timeframes
- Historical Data: Full historical candlestick data stored in ClickHouse for fast retrieval
Platform Features
- User Authentication: Secure JWT-based authentication with refresh tokens
- Role-Based Access Control: Tiered subscription system (User, Trader, Expert, Admin)
- Subscription Management: Stripe integration for payment processing and subscription management
- Dataset Management: Upload, process, and manage trading datasets
- Email Notifications: Automated email notifications for account events
- Modern UI: Intuitive React-based interface with interactive candlestick charts
- Background Processing: Asynchronous job processing with RabbitMQ
- Object Storage: MinIO integration for dataset file storage
- Caching Layer: Redis-based caching for improved performance
Infrastructure Features
- Microservices Architecture: Separate services for API, Worker, and Scheduler
- Database Migrations: Automated Prisma migrations with health checks
- Queue Retry System: Automatic retry mechanism for failed jobs
- Health Monitoring: Comprehensive health checks for all services
- Security Hardening: Non-root containers, capability dropping, and security best practices
- Cloudflare Tunnel: Secure remote access without exposing ports
Architecture
BackTrade is built as a modern, scalable monorepo using pnpm workspaces and Turbo for efficient build orchestration.
Services
The platform consists of the following services:
| Service | Description | Port (Dev) | | --------------------- | ---------------------------------------- | ----------- | | Frontend | React web application served by Nginx | 5173 | | Backend API | Express.js REST API server | 21799 | | Worker | Background job processor for async tasks | - | | Scheduler | Scheduled tasks and queue retry handler | - | | PostgreSQL | Primary relational database | 5432 | | Redis | Caching and session storage | 6379 | | ClickHouse | Analytics database for time-series data | 8123, 9002 | | MinIO | Object storage for datasets | 9000, 9001 | | RabbitMQ | Message queue for job processing | 5672, 15672 | | Nginx | Reverse proxy (production only) | 80 | | Cloudflare Tunnel | Secure remote access (production only) | - |
Gallery
Click on any image to view it in full size
Documentation & Files
Download project documentation or preview files directly in your browser