Back to Projects
AI AutomationFinTech6 months
1

Predator Scalping System

Independent Project

Autonomous Trading Engine

<50ms
Execution Latency
p99 percentile
Adaptive
Regime Detection
Multi-condition
10x
Speedup
Via Numba JIT compilation
Auto
Recovery
3-state circuit breaker

The Challenge

Gold (XAU/USD) markets demand sub-50ms execution with adaptive regime detection. Manual trading cannot keep pace with micro-movements across volatile, trending, and ranging conditions.

The Solution

Built a fully autonomous scalping engine deploying 5 specialized AI agents that detect market regimes, predict micro-movements, and execute trades with institutional-grade risk management using LangGraph orchestration.

What It Does

Predator is a fully autonomous gold trading system that scalps XAU/USD by detecting market regimes (trending, ranging, volatile) and adapting its strategy in real-time. It processes tick data through 5 specialized agents, each handling a specific layer of the trading pipeline.

How It Works

The system uses adaptive regime detection (v2 algorithm) with MAD-based thresholds, Choppiness Index, and Kaufman's Efficiency Ratio. TimescaleDB stores time-series data with point-in-time correctness. A Champion/Challenger model registry enables A/B testing.

Process Flow

1Tick Data Ingestion (WebSocket/OANDA)
2Regime Classification (ADX + CHOP + ER)
3Strategy Selection (Trend/Range/Reversal)
4Position Sizing (Kelly Criterion)
5Execution (Sub-50ms via CCXT)
6Drift Monitoring (PSI/ADWIN)

Key Innovations

Adaptive Regime Detection v2 with hysteresis filtering
Champion/Challenger model registry with statistical testing
Real-time drift detection (PSI, ADWIN, KS-test)
Online/offline feature store with point-in-time correctness
10x speedup via Numba JIT compilation
Circuit breaker with 3-state automatic recovery

Technologies Used

Python 3.13LangGraphTimescaleDBPolarsNumPyNumbaCCXTWebSocketFastAPIStreamlitDockerRedisPostgreSQLscikit-learnADWINPSI Drift Detection

Performance Metrics

47ms
Execution Latency
End-to-end signal to execution (p99)
p99
88%
Regime Detection
Classification accuracy on out-of-sample data
+2.3%
99.9%
System Uptime
24/7 continuous operation since deployment
30d
62.5%
Strategy Win Rate
Backtested win rate on 6 months data
+1.2%

Interested in working together?

Let's discuss how AI enablement can transform your operations.

Get in Touch