HELIOS

System Architecture

A deep dive into the engineering behind Helios: from market data ingestion to AI-powered monitoring.

Data Flow

01

Market Data

  • WebSocket streams from Binance
  • Order book snapshots & trade ticks
  • Funding rates & open interest
  • 15-min bar aggregation
02

Strategy Engine

  • Signal generation (mean reversion + funding)
  • Entry/exit rules with Z-score thresholds
  • Position sizing with risk controls
  • Multi-market coordination
03

Execution

  • Order routing to dYdX v4
  • Venue-agnostic adapter layer
  • Fill reconciliation & position tracking
  • PnL calculation
04

Monitoring

  • AI agents for health checks
  • Bug detection on code changes
  • Trade analysis & pattern recognition
  • Alerting via webhook

Technology Stack

Execution

NautilusTrader

High-performance trading framework. Event-driven architecture with tick-level backtesting precision.

Institutional-grade event-driven architecture with Rust performance — backtesting and live execution share identical code paths.

Market Data

Binance

Primary data source for strategy signals. WebSocket streams for real-time order books, trades, and funding rates.

Deepest liquidity across crypto markets — price discovery happens here. Signals generated on Binance data transfer reliably to execution venues.

Execution Venue

dYdX v4

Decentralized perpetual futures on Cosmos SDK. On-chain order book with sub-second finality.

Decentralized execution eliminates counterparty risk. On-chain order book provides transparent, verifiable fills.

Intelligence

Claude AI

Anthropic's language model for autonomous monitoring agents and trade analysis.

Natural language interface for monitoring complex systems. Agents reason about bugs and performance in ways rule-based alerts can't.

Backend

Python

Core trading logic with async processing, NumPy/Pandas analytics, and type-safe validation.

Rich ecosystem for quantitative finance (NumPy, Pandas). Async I/O for concurrent data feeds without threading complexity.

Frontend

Next.js

React framework with server rendering, real-time updates, and Recharts visualization.

Server-side rendering for fast initial load. App Router for clean API routes co-located with the pages that consume them.

Database

PostgreSQL

Trade history, daily snapshots, and optimization results via Supabase.

Time-series trade data with JSONB for flexible optimization distributions. Supabase adds instant API layer and auth.

AI Agents

Powered by Claude

Not chatbot wrappers — autonomous agents that reason about complex system state, maintain memory across cycles, and escalate findings they can't resolve alone.

$ helios agents --architecture
supervisororchestrates cycle, dispatches tasks, aggregates reports
├─bug_detectorcode changes, runtime logs, error patterns
├─health_checkerAPI connectivity, memory, process heartbeats
├─trade_analystwin/loss patterns, exit timing, performance drift
└─backtest_comparatortrade-by-trade matching, divergence analysis
15-min cycles · persistent memory · cross-agent escalation
backtest_comparator— latest finding
2026-01-29

92.9% trade outcome alignment

Direction and timing match between backtest predictions and live execution across 82 live trades.

Entry slippage: -12.1 bps favorable

dYdX perpetuals have 2-4x tighter spreads than spot during volatile periods. Backtest uses conservative fill assumptions — live execution is outperforming the model.

Live win rate 15.9% vs backtest 10.5%

Mildly concerning — perpetual funding dynamics may create exit advantages not modeled in spot backtest. Monitoring with larger sample size.

This is not rule-based alerting. Each agent reads system state, reasons about what it finds, and produces structured analysis that a human operator would otherwise spend hours on. The supervisor coordinates the full team and maintains context across monitoring cycles.

Future agents: signal_validator, strategy_advisor, market_regime_detector, portfolio_optimizer

Optimization Process

NautilusTrader's Rust-powered backtesting engine makes exhaustive parameter sweeps practical — thousands of configurations tested in minutes, not hours.

$ helios optimization --summary
310,000+parameter combinations evaluated across 66 runs, 3 markets
34,000+passed constraint filtering (11% survival rate)
ProScore2selected strategy class — converged across 4 rounds

ProScore2 Convergence

Round 001

59.1%

pass rate · 1,680 combos

Round 003

71.7%

pass rate · 20,736 combos

Round 004

80.7%

pass rate · 3,750 combos

Best Result

3.13

Sharpe · 107% ROI

Constraint Filtering

Every configuration must pass all constraints simultaneously — no cherry-picking the best metric while ignoring risk.

  • Minimum 20 trades for statistical confidence
  • Maximum 20% drawdown threshold
  • Minimum 1.5 Sharpe ratio
  • Minimum 30% win rate
  • Walk-forward validation on out-of-sample data

Code Architecture

Core

/core
OrderPositionInstrumentAccount

Strategy

/strategy
SignalGeneratorEntryRulesExitRules

Execution

/execution
OrderExecutorPositionManagerRiskController

Data

/data
DataFeedBarAggregatorDataStore

Adapters

/adapters
BinanceAdapterDydxAdapterWebSocketClientRestClient

Agents

/agents
AgentOrchestratorBugDetectorTradeAnalyst
View live dashboard