Build strategies. Backtest ideas. Analyze markets. Simulate trades.
An AI-assisted full-stack platform for algorithmic strategy development,
historical backtesting, real-time market analysis, and automated paper trading.
βββββββββββββββββββββββ
β MARKET DATA β
β Historical / Live β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β STRATEGY β
β Indicators / Rules β
β Custom Algorithms β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β AI ANALYSIS β
β Market Context & β
β Decision Support β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β TRADING ENGINE β
β BUY / SELL / HOLD β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β PAPER BROKER β
β Simulated Execution β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β ANALYTICS β
β P&L / Risk / Stats β
βββββββββββββββββββββββ
This project is a full-stack AI-powered algorithmic trading and paper-trading platform designed for developing, testing, analyzing, and simulating automated trading strategies without risking real capital.
The platform combines:
- π Real-time market data
- π§ Algorithmic trading strategies
- π¬ Historical backtesting
- π€ AI-assisted market analysis
- β‘ Automated paper trading
- π Portfolio analytics
- π‘οΈ Risk monitoring
- π§© Visual strategy development
The system follows the core algorithmic trading pipeline:
Market Data β Algorithm β Decision β Order β Monitoring
It is designed as an educational and engineering platform where trading strategies can be developed and evaluated in a controlled simulated environment.
|
|
|
|
|
|
ββββββββββββββββββ
β Market Data β
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β Data Processing β
β & Normalizationβ
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β Strategy Engineβ
β β
β Indicators β
β Conditions β
β Signals β
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β AI Assistant β
β β
β Analyze β
β Explain β
β Evaluate β
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β Trading Engine β
β β
β BUY / SELL / β
β HOLD β
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β Paper Broker β
β β
β Simulated β
β Execution β
βββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββ
β Portfolio β
β & Analytics β
ββββββββββββββββββ
ββββββββββββββββββββββββ
β CLIENT β
β β
β React + Vite β
β Tailwind CSS β
ββββββββββββ¬ββββββββββββ
β
HTTP / REST β WebSocket
β
βββββββββββββββββ΄ββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββ βββββββββββββββββββ
β API SERVER β β REAL-TIME DATA β
β β β β
β Node.js β β WebSocket β
β Express β β Market Stream β
β JWT Auth β ββββββββββ¬βββββββββ
ββββββββββ¬ββββββββββ β
β β
ββββββββββββΌββββββββββββ β
β β β β
βΌ βΌ βΌ β
βββββββββββ βββββββββββ βββββββββββββββ β
βStrategy β βTrading β β Analytics β β
β Engine β β Engine β β Engine β β
ββββββ¬βββββ ββββββ¬βββββ ββββββββ¬βββββββ β
β β β β
βββββββββββββΌββββββββββββββ β
β β
βΌ β
ββββββββββββββββ β
β Database β β
β β β
β Users β β
β Strategies β β
β Orders β β
β Positions β β
β Trades β β
ββββββββββββββββ β
β
βββββββββββββββββ
βΌ
ββββββββββββββββββββ
β AI SERVICE β
β β
β Python / FastAPI β
β AI Analysis β
β Market Context β
ββββββββββββββββββββ
| Technology | Purpose |
|---|---|
| React 18 | User interface |
| Vite | Frontend tooling |
| Tailwind CSS | Styling |
| JavaScript / JSX | Application logic |
| Recharts / Charting | Financial visualization |
| WebSocket / Socket.IO | Real-time communication |
| Technology | Purpose |
|---|---|
| Node.js | Server runtime |
| Express.js | REST API |
| JWT | Authentication |
| WebSocket | Real-time communication |
| REST API | Client-server communication |
| Technology | Purpose |
|---|---|
| Python | Data & AI services |
| FastAPI | AI service API |
| Machine Learning | Market analysis |
| LLM Integration | AI-assisted decision support |
| Technical Indicators | Strategy signals |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Local orchestration |
| GitHub Actions | CI/CD |
| Git | Version control |
algorithmic-trading-system/
β
βββ frontend/
β βββ src/
β β βββ api/
β β βββ components/
β β βββ context/
β β βββ hooks/
β β βββ pages/
β β β βββ Login/
β β β βββ Register/
β β β βββ Dashboard/
β β β βββ Market/
β β β βββ Strategies/
β β β βββ StrategyBuilder/
β β β βββ Backtest/
β β β βββ Analytics/
β β β βββ AIAssistant/
β β βββ services/
β β βββ App.jsx
β β
β βββ package.json
β βββ vite.config.js
β
βββ backend/
β βββ src/
β β βββ controllers/
β β βββ routes/
β β βββ middleware/
β β βββ services/
β β βββ strategies/
β β βββ trading/
β β βββ backtesting/
β β βββ server.js
β β
β βββ package.json
β
βββ ai-service/
β βββ app/
β β βββ models/
β β βββ services/
β β βββ routes/
β β βββ main.py
β β
β βββ requirements.txt
β
βββ database/
β βββ migrations/
β βββ seeds/
β
βββ docker/
β
βββ docs/
β βββ architecture/
β βββ api/
β βββ strategies/
β βββ deployment/
β
βββ docker-compose.yml
βββ .env.example
βββ .gitignore
βββ README.md
The platform is designed to support multiple strategy types.
Moving Average Crossover
β
βββ Fast MA > Slow MA
β β
β BUY
β
βββ Fast MA < Slow MA
β
SELL
- SMA
- EMA
- RSI
- MACD
- Bollinger Bands
- ATR
- Moving-average crossovers
- Momentum signals
- Breakout strategies
- Mean-reversion strategies
- Custom rule-based strategies
The backtesting engine allows strategies to be evaluated against historical market data before being deployed to the paper-trading environment.
Historical Data
β
βΌ
ββββββββββββββββ
β Strategy β
β Configurationβ
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Backtest β
β Engine β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββββββββββββββ
β Simulated Trade Execution β
ββββββββββββββ¬ββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββ
β Performance Calculation β
β β
β Return β
β Win Rate β
β Drawdown β
β Sharpe Ratio β
β Profit Factor β
ββββββββββββββββββββββββββββββ
| Metric | Description |
|---|---|
| Total Return | Overall portfolio performance |
| Win Rate | Percentage of profitable trades |
| Profit Factor | Gross profit / gross loss |
| Max Drawdown | Largest peak-to-trough decline |
| Sharpe Ratio | Risk-adjusted performance |
| Total Trades | Number of executed trades |
| Average Trade | Average P&L per trade |
The AI component is designed as decision support, not as an autonomous financial advisor.
It can analyze:
- Market conditions
- Technical indicators
- Strategy signals
- Historical performance
- Risk metrics
- Portfolio exposure
- Trading scenarios
Example:
USER
"Why did the strategy generate a SELL signal?"
β
βΌ
βββββββββββββββββ
β AI ANALYZER β
βββββββββ¬ββββββββ
β
ββββββββββΌβββββββββ
βΌ βΌ βΌ
RSI MACD Trend
β β β
βββββββββββΌβββββββββ
βΌ
Signal Context
β
βΌ
AI Explanation
The AI should explain why a signal occurred, rather than blindly executing trades based on an LLM response.
The platform uses simulated trading to allow users to experiment without placing real financial orders.
Signal Generated
β
Risk Validation
β
Order Created
β
Paper Execution
β
Position Updated
β
Portfolio Updated
β
P&L Calculated
β
Analytics Updated
Supported simulated operations include:
- Market orders
- Buy / Sell positions
- Position tracking
- Virtual cash balance
- Order history
- Trade history
- Unrealized P&L
- Realized P&L
- Portfolio allocation
Risk management is an important part of the trading engine.
Potential controls include:
Maximum Position Size
β
βΌ
Maximum Daily Loss
β
βΌ
Stop Loss
β
βΌ
Take Profit
β
βΌ
Maximum Open Positions
β
βΌ
Exposure Limits
The system is intended to encourage risk-aware strategy development, rather than simply maximizing returns.
The real-time engine continuously processes market information and strategy signals.
LIVE MARKET DATA
β
βΌ
DATA STREAM
β
βΌ
INDICATOR ENGINE
β
βΌ
STRATEGY ENGINE
β
βΌ
SIGNAL
β
ββββββββββββββββ
β β
βΌ βΌ
BUY SELL
β β
ββββββββ¬ββββββββ
βΌ
RISK CHECK
β
βΌ
PAPER ORDER
β
βΌ
POSITION
β
βΌ
ANALYTICS
| Module | Purpose |
|---|---|
| π Authentication | Secure user access |
| π Dashboard | Portfolio and system overview |
| π Market | Live market monitoring |
| π§© Strategies | Strategy management |
| π οΈ Strategy Builder | Visual strategy configuration |
| π¬ Backtesting | Historical strategy evaluation |
| π€ AI Assistant | AI-powered analysis |
| πΉ Paper Trading | Simulated automated trading |
| π Analytics | Performance analysis |
| π§Ύ Orders | Order and execution history |
| πΌ Portfolio | Positions and portfolio tracking |
Replace the image below with your actual application GIF.
Dashboard
β
Market Monitoring
β
Create Strategy
β
Configure Indicators
β
Run Backtest
β
Analyze Results
β
Start Paper Trading
β
Monitor Portfolio
β
AI Analysis
Make sure you have the following installed:
- Node.js
- npm
- Python 3.x
- Docker
- Git
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
cd YOUR_REPOSITORYCreate the required environment files:
cp .env.example .envExample:
NODE_ENV=development
PORT=5000
DATABASE_URL=your_database_url
JWT_SECRET=your_secret
MARKET_DATA_API_KEY=your_market_data_key
AI_API_KEY=your_ai_api_keyNever commit real API keys or secrets to GitHub.
cd frontend
npm installRun the frontend:
npm run devcd backend
npm installRun the backend:
npm run devcd ai-service
python -m venv venvActivate the environment.
venv\Scripts\activatesource venv/bin/activateInstall dependencies:
pip install -r requirements.txtStart the service:
uvicorn app.main:app --reloadThe complete platform can also be started using Docker Compose.
docker compose up --buildStop the services:
docker compose downView running containers:
docker compose psSecurity considerations include:
- JWT authentication
- Password hashing
- Environment-based secrets
- API validation
- Input sanitization
- Protected API routes
- Rate limiting
- CORS configuration
- Secure WebSocket connections
- No storage of real brokerage credentials in development
Run frontend tests:
cd frontend
npm testRun backend tests:
cd backend
npm testRun Python tests:
cd ai-service
pytestAdditional documentation can be organized under:
docs/
βββ architecture/
βββ api/
βββ backtesting/
βββ strategies/
βββ trading-engine/
βββ ai/
βββ database/
βββ deployment/
Recommended documentation:
- System Architecture
- API Documentation
- Database Schema
- Strategy Development Guide
- Backtesting Methodology
- Trading Engine Documentation
- AI Integration
- Deployment Guide
- Security Guide
- Authentication
- Dashboard
- Market interface
- Strategy management
- Portfolio interface
- Strategy configuration
- Technical indicators
- Signal generation
- Advanced strategy builder
- Strategy optimization
- Historical data processing
- Backtest engine
- Trade simulation
- Performance metrics
- Parameter optimization
- Walk-forward testing
- Simulated orders
- Position management
- Portfolio tracking
- Advanced risk controls
- Multi-strategy execution
- AI assistant foundation
- Market analysis
- Strategy explanations
- Context-aware strategy analysis
- AI-assisted backtest interpretation
- Automated CI/CD
- Monitoring
- Error tracking
- Performance optimization
- Production deployment
- Comprehensive security audit
The platform focuses on evaluating strategies using multiple dimensions rather than return alone.
STRATEGY
β
βββββββββββββββΌββββββββββββββ
βΌ βΌ βΌ
RETURN RISK CONSISTENCY
β β β
βΌ βΌ βΌ
P&L Drawdown Win Rate
ROI Sharpe Profit Factor
CAGR Volatility Avg Trade
A strategy should therefore be evaluated based on:
Return + Risk + Consistency + Robustness
Trading signals should be understandable and traceable.
Strategies should be evaluated against historical data before simulation.
Performance should always be considered alongside risk.
Market data, strategies, AI, execution, and analytics should remain independently maintainable.
The platform should support live market information and event-driven trading workflows.
The system is designed to help users understand algorithmic trading concepts through experimentation and simulation.
This project is intended for educational, research, and software-development purposes.
The paper-trading environment uses simulated transactions and does not represent actual financial execution.
AI-generated analysis and strategy outputs may be inaccurate and should not be interpreted as financial advice.
Do not use this software to make real financial decisions without appropriate professional advice, validation, testing, and risk controls.
Contributions are welcome.
git checkout -b feature/your-feature
git add .
git commit -m "feat: add your feature"
git push origin feature/your-featureThen open a Pull Request.
This project is licensed under the MIT License.
See the LICENSE file for details.





