Regime-Switching Scalper

Production 24/7 multi-asset scalper with runtime market regime detection

Media & Demos

Role

Founder / Quant Developer

Period

2026

Category

trading

Overview

Production 24/7 multi-asset scalper that detects market regime at runtime and dynamically switches to the empirically validated specialist config for that regime. Eliminates CCXT in favour of direct Binance API WebSocket streams, achieving an additional 100ms latency reduction on top of the 10× improvement from kline buffering. Walk-forward validated across 3 years of data.

Key Highlights

  • Runtime regime detection (Trending / Ranging / Volatile) per asset per tick
  • Direct Binance API WebSocket streams — CCXT eliminated for lower overhead
  • Additional 100ms latency reduction via direct exchange connectivity
  • 10× overall latency reduction via WebSocket kline buffer vs REST polling
  • Specialist config per regime: empirically validated on 3-year walk-forward
  • 24/7 production deployment across multiple assets simultaneously
  • Distributed walk-forward backtest on Ray cluster (Oracle + Azure + DigitalOcean VMs)

Tech Stack

Python
FastAPI (Async)
WebSockets
Redis
Walk-Forward Validation
HMM / Regime Detection
Direct Binance API

What I Learned

The most critical insight was that no single parameter set is optimal across all market regimes. By classifying the market state at runtime and switching configs, the system avoids the fragility of over-optimised static strategies. Walk-forward validation was non-negotiable — in-sample performance is meaningless without out-of-sample confirmation across 3 years of regime transitions.

Chat on WhatsApp