Back to portfolioAgentic Trading Hub
Agentic Trading Hub
Data & AIQuant Trading Case Study

Agentic Trading Hub

An autonomous quant trading platform where AI agents select strategies, manage risk, and execute trades on Hyperliquid — with 10 deterministic strategies, multi-agent consensus, and live sentiment analysis.

Trading strategies

10

Breakout, mean reversion, funding arbitrage, liquidation cascade, entropy regime, and more.

AI agents

3 layers

Trade Planner, Analyst reviewer, and multi-model Consensus Engine with weighted voting.

Features engineered

50+

Trend, volume, volatility, funding, orderflow, and stochastic model features across 5 timeframes.

Risk controls

12 gates

Notional caps, leverage limits, drawdown throttling, cooldown windows, slippage checks, and more.

The Problem

What this project had to solve

Manual trading is slow, emotional, and inconsistent. Most quant systems are either fully deterministic (missing context) or fully AI-driven (hallucination risk). Agentic Trading Hub combines both: deterministic signals for precision, AI oversight for context, and hard risk gates for safety.

Agentic Trading Hub was built to automate the full trading lifecycle: from market data ingestion and feature engineering, through AI-driven strategy selection, to risk-gated execution on Hyperliquid perpetuals. The system combines deterministic quant signals with LLM-powered oversight.

The backend is a FastAPI async service with PostgreSQL, Redis, Qdrant vector memory, and Temporal for durable workflow orchestration. The frontend is a React 18 operator console built with Vite, TanStack Query, and Tailwind CSS. Ten trading strategies cover breakouts, mean reversion, funding arbitrage, liquidation cascades, and entropy regime detection.

What makes the system distinctive is the multi-layer AI architecture: a Trade Planner agent selects strategies and sizes positions, an Analyst agent reviews decisions for risk flags, and a Consensus Engine aggregates votes from multiple LLMs with capability-weighted scoring. All decisions flow through a hard risk engine and safety controller before reaching the Hyperliquid SDK for execution.

What changed

Operators get a unified platform where strategy deployment, AI oversight, risk management, and exchange execution work as a single pipeline — with full observability into every decision, trade, and P&L metric.

Why it was hard

Combining deterministic quant strategies with non-deterministic LLM agents in a latency-sensitive trading loop required careful separation of concerns: signals must be reproducible, AI adjustments must be bounded, and execution must be atomic with reconciliation against live exchange state.

Constraints

  • Execution must be atomic and reconcilable — positions on Hyperliquid must match internal state at all times.
  • LLM costs must be budget-capped per deployment with circuit breakers and fallback chains.
  • Strategy signals must be deterministic and reproducible — AI can adjust sizing but cannot override signal logic.

My role

  • Designed the full architecture: orchestration pipeline, agent hierarchy, risk engine, execution layer.
  • Built 10 trading strategies with multi-timeframe feature engineering (50+ features).
  • Implemented multi-agent consensus with capability-weighted voting across OpenRouter, Mistral, and Ollama.
  • Integrated Hyperliquid SDK for live order placement, position tracking, and WebSocket orderflow.
  • Built the operator console (React) for deployment management, trade monitoring, and agent analytics.

Proof

What the product actually looks like

Real screens from the product — each one supports a specific argument about clarity, control, or observability.

Operator DashboardCommand CenterClick to view full size

Operator Dashboard

Real-time overview of deployments, P&L, agent runs, and system health in a single operational surface.

Designed for operators, not traders — every metric serves a decision.

Strategy DeploymentsDeployment EngineClick to view full size

Strategy Deployments

Configure and deploy trading strategies with venue, budget, schedule, and risk parameters.

Each deployment is an isolated unit with its own budget, schedule, and risk profile.

Trading StrategiesStrategy CatalogClick to view full size

Trading Strategies

10 deterministic strategies with configurable parameters, regime awareness, and multi-timeframe alignment.

Strategies are deterministic — AI adjusts sizing and timing, never the signal logic.

Agent AnalyticsAI ObservabilityClick to view full size

Agent Analytics

Per-agent decision breakdowns, confidence calibration, cost tracking, and consensus agreement metrics.

Every LLM invocation is tracked: tokens, latency, cost, and decision outcome.

Trade HistoryExecution LogClick to view full size

Trade History

Full trade lifecycle: intent → order → fill → P&L with regime labels and strategy attribution.

Post-trade review feeds back into the confidence store for future calibration.

Decisions

Tradeoffs that shaped the product

The strongest work is visible in the choices made under pressure, not just in the final interface.

Deterministic signals + AI sizing over fully autonomous agents

Challenge

LLMs hallucinate. Letting AI generate raw trading signals introduces unpredictable risk.

Decision

Strategies produce deterministic signals. AI agents can approve, veto, or adjust position size (0.5x–2.0x) — but never override the signal direction or entry logic.

Tradeoff

Limits the AI's freedom, but ensures every trade has a reproducible, auditable origin.

Multi-agent consensus over single-model decisions

Challenge

Any single LLM can have blind spots, model drift, or temporary degradation.

Decision

A Consensus Engine aggregates votes from 2+ LLMs with capability-weighted scoring (Claude Opus: 1.0, Haiku: 0.65, etc.). Agreement scores gate execution confidence.

Tradeoff

Higher latency and cost per decision, but significantly more robust risk assessment.

Temporal workflows over simple cron jobs

Challenge

Trading pipelines have multi-step dependencies with failure modes at each stage.

Decision

Temporal provides durable workflow orchestration with automatic retries, state persistence, and visibility into every step of the evaluation pipeline.

Tradeoff

Adds infrastructure complexity, but eliminates silent failures and provides full auditability.

Architecture

How data flows through the system

1

Market Snapshot

Live mid-prices, funding rates, L2 books, and 50+ features are computed across 5 timeframes (1h, 4h, daily, weekly, monthly) from Hyperliquid and Finnhub news.

A complete, multi-timeframe market context ready for strategy evaluation.

2

Strategy Signal

The deployed strategy (e.g., 4h breakout, funding arbitrage) evaluates the snapshot and produces a deterministic signal: action, confidence, desired notional, and entry/stop/TP levels.

A reproducible, auditable trade proposal with no AI dependency.

3

AI Review & Consensus

The Trade Planner selects strategies and sizes positions. The Analyst reviews for risk flags and regime mismatches. The Consensus Engine aggregates multi-model votes with capability weighting.

An AI-adjusted trade plan with bounded sizing (0.5x–2.0x) and consensus confidence.

4

Risk Engine

Hard gates check notional caps, leverage limits, daily P&L loss caps, slippage estimates from L2 books, and cooldown windows. The SafetyController applies drawdown throttling and volatility targeting.

A risk verdict — approved with scale factor, or rejected with reason.

5

Execution & Reconciliation

Approved trades are submitted to Hyperliquid via the SDK (or simulated in paper mode). A reconciliation loop verifies positions every 5 minutes. Post-trade review feeds confidence calibration.

Atomic execution with continuous state reconciliation against live exchange.

Agentic Trading Hub uses a layered architecture: FastAPI serves the API and orchestrates evaluation pipelines via Temporal durable workflows. Market data flows from Hyperliquid REST/WebSocket and Finnhub into a feature store with 50+ computed features. Deterministic strategies produce signals that flow through a 3-layer AI review (Planner → Analyst → Consensus), then through a 12-gate risk engine, before reaching the execution layer. PostgreSQL stores all trades, deployments, and market data. Redis handles caching and decision stores. Qdrant provides semantic memory for similar trade pattern matching. The React operator console provides full visibility into every step.

Product surfaces

The interfaces that carry the experience

Operator Console

Operator Console

React-based command center for managing deployments, monitoring agent decisions, reviewing trades, and tracking system health across all venues.

Real-time deployment statusAgent run history and logsP&L tracking per strategySystem health monitoring
Strategy Deployments

Strategy Deployments

Deploy any of 10 strategies to paper, shadow, or live mode with configurable budgets, schedules, risk parameters, and venue targeting.

Paper / shadow / live modesPer-deployment budget capsCron-based schedulingVenue and symbol targeting
AI Agent Pipeline

AI Agent Pipeline

Three-layer AI architecture: Trade Planner for strategy selection, Analyst for risk review, and Consensus Engine for multi-model agreement scoring.

Capability-weighted consensus votingDecision caching for cost savingsCircuit breaker with fallback chainBudget-aware LLM invocation
Live Sentiment Analysis

Live Sentiment Analysis

Finnhub news ingestion with relevance scoring against crypto keywords, headline deduplication, and integration with the AI planner for sentiment-aware positioning.

Real-time news ingestionCrypto relevance scoringHeadline deduplicationLLM-integrated sentiment review
Hyperliquid Execution

Hyperliquid Execution

Full SDK integration for order placement, cancellation, position tracking, mid-price feeds, L2 book access, and WebSocket orderflow — with paper trading simulator for development.

Mainnet + testnet supportWebSocket orderflow streamingSlippage estimation from L2Position reconciliation loop
Risk Management

Risk Management

12-gate risk engine with hard guardrails (notional caps, leverage limits) and soft constraints (drawdown throttling, volatility targeting, Kelly-derived sizing).

Notional and leverage capsDrawdown throttler (3%–10%)Kelly fractional sizingCorrelation-aware portfolio heat
Trade History & Review

Trade History & Review

Full trade lifecycle tracking from intent to fill with post-trade review, confidence calibration, and semantic memory storage in Qdrant for pattern matching.

Intent → order → fill pipelinePost-trade outcome metricsConfidence store calibrationQdrant semantic memory search
10 Trading Strategies

10 Trading Strategies

Deterministic strategy library covering 4h breakout, trend pullback, funding mean reversion, funding arbitrage, OU mean reversion, liquidation cascade, entropy regime, and more.

Multi-timeframe alignmentRegime-aware strategy routingConfigurable parameters per deploymentWalk-forward backtesting support

Tech Stack

Built with

FastAPI

FastAPI

Async Python API and orchestration

PostgreSQL

PostgreSQL

Trades, deployments, market data

Redis

Redis

Cache, decision store, job queue

Framework

FastAPI 0.115Python 3.11+SQLModelPydantic SettingsReact 18.2 + Vite 5TypeScript 5.3

Data

TemporalTanStack React Query 5PostgreSQL 16Redis 7Qdrant

UI

Tailwind CSS 3Chart.js + react-chartjs-2Framer Motion

Web3

Hyperliquid Python SDKeth-account

AI

OpenRouterMistral AIOllamaLangChain Coresentence-transformersFinnhub News APILangfusestructlog

Infra

Docker Compose

Languages

PythonTypeScriptSQL

What this project proves

Quant strategy engineering (10 strategies)Multi-agent AI architectureExchange SDK integration (Hyperliquid)Real-time market data pipelinesFeature engineering (50+ features)Risk management systemsDurable workflow orchestration (Temporal)LLM cost management and fallback chainsSentiment analysis integrationVector memory and semantic search