DEV Community

Albin Manoj
Albin Manoj

Posted on

Test HTML Conversion

System Architecture

Algo Master: Algorithmic Trading Platform Overview

A comprehensive 3-tier microservices architecture powering intelligent algorithmic trading

6 Services 45+ API Entities 6 Brokers 100+ ML Features 3 Domains

Table of Contents

01 Platform Architecture 04 Technology Stack 02 Three-Tier Design 05 Data Flow 03 Service Communication 06 Key Modules

Section 01

Platform Architecture

The system is organized as a three-tier microservices architecture with dedicated services for data, compute, and presentation.

System Architecture Diagram

React Frontend Port 3030

Trading UI Analytics Dashboard Real-time Charts Options Scanner Strategy Builder

Strapi Middleware Port 1343

API Gateway Authentication CORS Handling Request Proxy Cron Tasks

Python FastAPI Port 8100

Order Execution Greeks Engine ML Models Strategy Logic Backtesting

WebSocket Server

Port 8766

PostgreSQL

Port 5432

Redis

Port 6379

Section 02

Three-Tier Design

Each tier is independently deployable with clear responsibilities and well-defined interfaces.

R

React Frontend

The presentation layer providing a rich trading experience with real-time data visualization and interactive analytics.

MUI v6 TradingView Charts Redux Socket.io Capacitor Mobile

S

Strapi Gateway

The middleware layer handling authentication, request validation, response formatting, and proxying to the Python backend.

Request Validation Response Formatting Auth Middleware CORS Cron Tasks

P

Python Backend

The compute layer powering all trading logic, quantitative analysis, machine learning, and broker integrations.

FastAPI Async Multi-Broker Greeks Engine ML Pipeline WebSocket Streaming

Section 03

Service Communication

Request lifecycle from user interaction to response rendering, flowing through all three tiers.

User Action

React App

Strapi Proxy

Python API

Broker / DB

Response

UI Update

Section 04

Technology Stack

A modern stack chosen for performance, developer experience, and production reliability.

Layer Technology Purpose
Frontend React 18 Component-based UI with concurrent rendering
MUI v6 Material design component library
TradingView Professional charting with custom indicators
Redux Toolkit Global state management
Socket.io Real-time data streaming to UI
Middleware Strapi v4 Headless CMS and API gateway
Bookshelf ORM Database abstraction layer
Axios HTTP client for Python API proxy
Backend FastAPI Async Python web framework
SQLAlchemy ORM and database toolkit
Pandas / NumPy Data manipulation and numerical computing
Scikit-learn / XGBoost / PyTorch Machine learning and deep learning models
Redis / aioredis Async caching and pub/sub messaging
Database PostgreSQL Primary relational database
Cache Redis In-memory cache, session store, pub/sub
Infra PM2 Process manager for Node.js services
Docker Containerization and deployment
Uvicorn ASGI server for FastAPI

Section 05

Data Flow

End-to-end data pipeline from market data ingestion through ML prediction to order execution.

Market Data Ingestion

Broker feeds stream via WebSocket, normalized and stored in the MarketData table with real-time tick updates for LTP, volume, and open interest.

Feature Engineering

Over 100 features computed from OHLC data, open interest changes, Greeks surfaces, technical indicators, and time-of-day signals.

ML Prediction

12 signal sources including LSTM, Transformer, and ensemble models aggregated into a unified trading score ranging from 0 to 100.

Strategy Execution

Orders placed through a multi-broker factory pattern supporting Alice Blue, Upstox, and four additional brokers with unified order interfaces.

Monitoring & Analytics

Real-time P&L tracking, Greeks exposure dashboard, dealer flow analysis, and strategy performance metrics rendered on the frontend.

Section 06

Key Modules

Core functional domains of the platform, each covered in dedicated deep-dive blogs.

Δ

Options & Greeks

Black-Scholes pricing engine with real-time IV surface computation, dealer flow analysis tracking institutional positioning, and strike-level Greeks visualization.

Black-Scholes IV Surface Dealer Flow OI Analysis

ML & Deep Learning

LSTM and Transformer models for time-series forecasting, XGBoost signal aggregation across 100+ features, and unified scoring pipeline.

LSTM Transformer Signal Aggregation 100+ Features

Trading Strategies

Automated straddle management, crush recovery systems, martingale position sizing, and momentum-based option scanning with configurable parameters.

Straddle Crush Recovery Martingale Momentum Scanner

Backtesting

Historical straddle backtester with multi-leg support, derivatives simulator with intraday time-of-day modeling and IV surface prediction.

Straddle Backtester Derivatives Simulator IV Prediction Historical Replay

Reference

Port Mapping

Service endpoints and their network protocols for local development and production deployment.

Port Service Protocol
3030 React Frontend HTTP
1343 Strapi Middleware HTTP
8100 Python FastAPI HTTPS (self-signed)
8766 WebSocket Server WSS
5432 PostgreSQL TCP
6379 Redis TCP

Algo Master Platform · Algorithmic Trading System

Top comments (0)