HeliQuant

Architecture

How the firm runs — ten specialist desks debate, the PM decides, and the LLM signs off on every floor trade.

HeliQuant is structured like a trading firm: specialist desks produce domain reads, researchers argue bull-vs-bear, and a Portfolio Manager synthesizes one disciplined decision per cycle — and, via the PM sign-off merge, that same PM now signs off on every trade the continuous floor proposes. Ten specialist desks call an LLM analyst; two more (flow-intel and whale) fold in as pre-computed stances — twelve analyst voices in all.

How a decision flows

Every desk pulls real data (no placeholders) from a live source, an LLM interprets it into a stance, the debate stress-tests it, and the PM turns the weighted picture into a single recorded decision.

Activity flow — one cycle from gather to a recorded ENTER / ABSTAIN

The 3-phase loop

Phase 1 — Analysis

Each of the specialist desks runs a real tool (no placeholders) over fresh data and returns a stance and a confidence. On NEAR AI Cloud each desk is one Qwen/Qwen3.8-27B call; the debate and PM run on z-ai/glm-5.3-flash.

Phase 2 — Debate

A bull and a bear/risk researcher argue using only the desk outputs, then rebut each other (deep model, 2 rounds). Dissent is surfaced, not averaged away.

Phase 3 — Decision (PM)

The Portfolio Manager weighs the desks ranked by learned reliability, applies a hard risk/reward ≥ 2:1 gate, and outputs ENTER (only on a validated edge) or ABSTAIN. The decision's hash is anchored on NEAR.

One cycle, end to end

Sequence of a single cycle — driver to on-chain seal

The discipline gates

  • No validated edge → ABSTAIN. validated_edges.json is allowed to be empty. An edge must be earned (see Self-learning).
  • R:R ≥ 2:1. Even a validated edge abstains when the structure doesn't pay.
  • Macro event-risk. Around FOMC/CPI, BTC/ETH de-risk — volatility ~2× but direction is noise (research-backed), so the firm won't bet direction into a scheduled print.
  • AGGRESSIVE is earned. Fractional-Kelly, capped at 3% risk / 5× leverage, with a 20% drawdown breaker — unlocked only when an OOS-validated edge's live signal fires.

The continuous trading floor

Alongside the LLM org, a campaign runs a continuous paper floor at live prices. It computes its own deterministic desk votes — flow-intel signals, z-score positioning extremes, and the Hyperliquid whale read, with no LLM call (campaign.py · desk_votes) — and then, as the final gate, asks the LLM PM to sign off on the candidate (the merge). Before that sign-off, a setup must clear an ordered entry-quality pipeline (below). Approved positions are sized on a warm/cold ladder (proven winners boosted up to 1.6×, proven losers half-size + throttled) and timed on a dynamic horizon (3h fade / 4h trend / 24h validated edge). Stops are calibrated per asset from realized excursions (MFE/MAE — the fixed 2.5× TP was reached only 0–21% of the time), trend trades trail to let a run go, and it learns from every close and every abstention. Every position is a little state machine:

Campaign position lifecycle — open, manage, exit, learn

The entry-quality pipeline

A candidate setup must clear an ordered stack of discipline gates before the floor opens it. Each gate is a per-asset skip — abstaining one asset never stalls the rest (the loop scans the whole basket every step). The goal is not to predict tops (impossible on an efficient tape) but to systematically refuse bad entries. The live, deployed gate list is surfaced on /campaign as entry_gates.

The entry-quality pipeline — a setup clears every gate or it abstains (newest gates in green)

The three green gates stop the floor buying exhausted moves — the "entered at the top, TP never reached" failure:

  • TV 1h-vs-1D alignment — reads TradingView's free multi-timeframe consensus. When the daily trend opposes the 1h signal, the entry is a counter-daily bounce; the floor fades it (half size, short hold) or, on strong opposition, abstains.
  • Smart-money whale veto — when high-conviction Hyperliquid whales (≥2, real net notional, proven ROE) sit against the trade, the floor won't buy the top they're shorting. The LLM org already reasons about this whale-vs-price divergence; this is its algorithmic counterpart on the no-LLM floor.
  • Over-extension — refuses a fresh entry once price has already run >2.5 ATR past its 1h mean (or is decelerating). Enter a trend early / on a pullback, never the stretched tail.

The final gate is the LLM PM sign-off (the merge): once a candidate clears every algorithmic gate, the floor hands the live signals to the LLM Portfolio Manager for a one-call APPROVE / VETO. It fails open on an LLM outage so the floor never freezes — the algorithmic gates have already vetted the setup.

A symmetric fee-breakeven guard sits on the exit side: a near-TP lock only banks a win that clears the round-trip cost, so a sub-fee "win" (NEARTP) is never booked. None of these is an edge — they are discipline. The floor's honest expectation on a no-edge directional book is still ~breakeven, and no edge has been validated on NEAR (the registry is empty). Rigorous, un-flattering metrics on the real ledger (Sharpe, Sortino, max-drawdown, with annualised figures withheld until the sample earns them) are served at /performance and shown on the Dyno page.

The floor is self-driving: any read of /campaign or /trades (and every keep-alive ping of /run-cycle) opportunistically advances a step in the background — lock-guarded, opening new positions at most once every CAMPAIGN_STEP_MIN = 4 min while resolving matured positions every ~60 s so exits stay snappy — and it keeps trading on real traffic even if the external pinger lapses.

Stack

  • Brain: multi-provider LLM abstraction (BYO keys). With HQ_PROVIDER=nearai, every call runs on NEAR AI Cloud in a TEE and is signed (desks on Qwen/Qwen3.8-27B; debate, PM and sign-off on z-ai/glm-5.3-flash). Groq is the fallback; a fallback call is marked unverified
  • Data: Bitget (market) · Hyperliquid (whale) · Allora (decentralised-AI macro) · DeFiLlama (NEAR fundamentals) · Nansen / Elfa (smart-money & social) · GeckoTerminal (Rhea pools) · NearBlocks (on-chain) · Google TimesFM 2.5 (next-day realized-vol forecast, optional; EWMA fallback)
  • Execution: Bitget Demo futures (long + short, API v3, paptrading header) — paper at live prices; NEAR, BTC, ETH and XRP fill on the demo, the rest stay paper. Runs from Railway (iad)
  • Chain: NEAR testnet — one core contract (soulbound NEP-171 identity · reputation · validation credentials · job escrow · vault · anchor) · musdc (NEP-141) · allora · Rhea pool for swaps · executor = OutLayer Agent Custody wallet
  • Hire per job: NEAR Agent Market worker (firm/market_worker.py) takes one asset per job and returns the decision, its anchor and the TEE proofs
  • Always-on: Railway service + Supabase state · driven by an uptime pinger + self-driving floor

On this page