t
NVTrader
v0.1.18
[ reference architecture ]

How it works · multi-agent autonomous trading on NVIDIA

36 specialized AI agents (all live on the A2A event bus), end-to-end on a single NVIDIA DGX Spark / GB10. Trading research → cuFOLIO GPU optimization → 10-check validation → compliance-gated execution → realized-compare → post-trade drift → Phase 8 DPO closure (auto-promote trained checkpoints to local vLLM) → Phase 9 Signal Discovery (Nemotron proposes JSON-AST formulas, IC + p-value gate, Grinold-Kahn α-tilt to sleeves). Full OTel audit on every step, including LLM chain-of-thought via llm.reasoning.* spans.

[ 1 · USER INTERFACE ] NVTrader Web App · FastAPI + Tailwind · multi-tenant whitelabel Landing / Auth Portfolio · Chat Research · VLM Backtesting Models · NemoRL Observability Account · Keys Guide · Legal [ 2 · AGENT ORCHESTRATION ] A2A event bus · NeMo Agent Toolkit (NAT) observability · AIQ Deep Research · Quant Signal Discovery blueprint 36 specialized agents · 9 tiers (Phase 0–9) · on the bus · typed subscribes/emits · compliance gate at every order AND at strategy-definition layer Data Agent Feature Eng. Research × 6 (Pred./DR/Fund./Tech./Sent./AI) Signal · Meta Port. Opt (cuFOLIO) Port. Construction Compliance PM · Reporting Execution · Backtest CROSS-CUTTING (always-on · feed every solve + the PM) RegimeDetector · stress HybridRAG · KG + cuVS NeMo-RL AutoResearch NeMo-RL Feedback (PPO) Preference Learning LiveMonitor Audit (every event) PHASE 9 · LLM-DRIVEN SIGNAL DISCOVERY (4 agents · Nemotron 3 Super 120B · adapted from NVIDIA-AI-Blueprints/quantitative-signal-discovery-agent) SignalGeneratorAgent (t=0.8) SignalCodeGeneratorAgent (t=0.2) OptimizationAdvisorAgent (t=0.5) SignalDiscoveryOrchestratorAgent (t=0.3) |IC|≥0.02 · p≤0.05 gate [ 2.5 · A2A EVENT BUS — async pub/sub · 51-event vocabulary · OTel-traced via NeMo Agent Toolkit ] FORWARD ▸ DataReady → FeaturesReady → Research×3 → SignalProposed → RebalanceProposed → ...Constructed → ...Cleared → ...Approved → OrderPlaced → OrderFilled PHASE 8 ↺ OrderFilled → PreferenceRecorded → NeMoRLTrainingStarted → ...Complete → PolicyPromoted → LocalInferenceReloadStarted → next narration via policy_router PHASE 9 ↺ SignalDiscoveryRequested → ...Proposed → ...Compiled → ...Evaluated → ...Accepted → AdvisorCritiqued → loop → PromoteToSleeve · α-tilt on cuFOLIO AuditAgent: every event → data/audit/bus_events.jsonl · ReportingAgent: lifecycle roll-ups → DailyReportReady · 51 typed event contracts (StrategyVersionId stamped end-to-end) [ 3A · LLM INFERENCE — cloud + Phase 8 local vLLM via policy_router ] NVIDIA Build API · multi-model routing · DPO-promoted policies hot-load to vLLM:8024 REASONING Nemotron 3 Super 120B-a12b · 8k ctx DeepResearch · PM Phase 9 Signal Disc. reasoning_content VISION (VLM) Nemotron 3 Nano Omni 30B · multimodal Chart analysis Technical reads LOCAL (Phase 8) vLLM 0.21.0 :8024 DPO-promoted policy policy_router Hot-reload on Promoted cold-start ~30-60s [ 3B · GPU OPTIMIZATION ] cuFOLIO · cuOpt PDLP · NemoRL on CUDA PORTFOLIO OPT cuFOLIO Mean-CVaR cuOpt PDLP solver ~270ms scenario gen ~250ms cuOpt solve α ∈ [0.90, 0.99] SCENARIO GEN KDE on GPU cuFOLIO utils 500 – 50,000 scen stress overlays 2008/2020/2022/flat RL FINE-TUNE NemoRL · PPO SB3 + CUDA 12.3 NVTraderEnv (Gym) reward = realized Sharpe ~3k steps / 8s on GB10 [ 4 · MARKET DATA + RESEARCH SOURCES ] 7 sources · plug-in adapters · unified Bar / NewsItem / Filing schemas yfinance · bars Webull · snapshots Finnhub · fundamentals EDGAR · 10-K/Q Tavily · web Polygon (opt) Alpha Vantage IEX · Databento [ 5 · COMPLIANCE GATE + BROKER ABSTRACTION ] Hard / soft / warn vetos · pluggable BrokerAdapter · Approve / Override / Reject audit Compliance Agent (rules) SimBroker (local fills) Webull OpenAPI (paper) Alpaca (paper + live) IBKR · Tradier [ 6 · PERSISTENCE + AUDIT ] Encrypted-at-rest credentials · immutable decision audit · trace ledger · per-tenant data isolation User DB Encrypted API keys Decision audit (rebalance + orders) Trace ledger (NAT spans) Sim ledger RL policies [ 7 · HARDWARE + DEPLOYMENT ] NVIDIA DGX Spark · GB10 (compute 12.1) · CUDA 13.0 · PyTorch 2.12+cu130 · Docker (nvidia/cuda:13.0-runtime) · Tailscale + 0.0.0.0:8015 / :8000 · vLLM:8024 (Phase 8)
NVIDIA-owned component Compliance / risk gate 3rd-party / open-source

Components used (by layer)

LayerComponentRoleNotes
1 · UI FastAPI · uvicornWeb server22 REST endpoints · CORS · JSON-shaped error responses
Tailwind CDN + Inter + JetBrains MonoStylingDark theme, NVIDIA green (#76b900); tenant CSS-variable overrides
TradingView Lightweight Charts 4.2ChartsMIT · candles + volume + MA21/MA50 + buy/sell markers
2 · Agent orchestration NVIDIA NeMo Agent Toolkit (NAT)ObservabilityPer-agent spans · /api/observability/* endpoints · llm.reasoning.<role> spans capture Nemotron chain-of-thought in Phases 8/9
A2A event bus (live · src/traderspace/bus/)Async pub/subasyncio fan-out, error-isolated, OTel-traced. Ring buffer history (1000 events). REST: GET /api/bus/agents, GET /api/bus/events, POST /api/bus/trigger.
Typed event vocabulary (51 events)ContractsForward cascade + Phase 8 DPO closure (PreferenceRecorded → NeMoRLTrainingStarted → PolicyPromoted → LocalInferenceReloadStarted) + Phase 9 discovery loop (SignalDiscoveryRequested → SignalFormulaProposed/Compiled/Evaluated/Accepted → AdvisorCritiqued → PromoteToSleeve)
NVIDIA AI Q&A Blueprint (AIQ)DeepResearchLiteral blueprint adapter + in-house variant (planner → researcher → synthesizer → citer)
NVIDIA-AI-Blueprints quantitative-signal-discovery-agentPhase 9 closed loopAdapted: 4 Nemotron-driven agents (Generator t=0.8 · CodeGenerator t=0.2 · Advisor t=0.5 · Orchestrator t=0.3) · 66-operator JSON-AST vocabulary · IC + p-value acceptance gate (|IC|≥0.02, p≤0.05). Differs from upstream: AST whitelist (no exec() on LLM output) · policy_router for DPO-replaceable roles · Nemotron 3 Super 120B (vs upstream Nano-30B-A3B) · Grinold-Kahn α-tilt on cuFOLIO scenarios for backtest integration.
36-agent rosterSpecialization32 active by default + 4 example agents inactive until activated via Agent Builder. Phase 0–9 lifecycle agents wired end-to-end.
Tier 8a · DPO closure (Phase 8)Loop closurePolicyPromotionAgent auto-validates trained checkpoints (DCP → HF safetensors via NeMo-RL converter) and promotes to data/policies/registry.json · InferenceServerAgent hot-reloads vLLM on PolicyPromoted
Tier 8b · FeedbackLoop closureNeMoRLFeedback (10 fills → DPO retrain) · PreferenceLearning (every decision → DPO row) · Audit (every event → immutable JSONL)
3a · LLM inference NVIDIA Build APIHosted inferenceOpenAI-compatible REST · retry w/ backoff · tool calls + reasoning_content
Nemotron 3 Super 120BReasoningnvidia/nemotron-3-super-120b-a12b · DeepResearch · PM narration · backtest Q&A · all 4 Phase-9 Signal-Discovery agent roles
Nemotron 3 Nano Omni 30BVision (VLM)nvidia/nemotron-3-nano-omni-30b · chart technical reads
Kimi K2.6 (via Build)Tool callsmoonshotai/kimi-k2.6 · PM chat with 39 tools registered
vLLM 0.21.0 (Phase 8 local)Local inferenceOpenAI-compatible server on :8024 · hosts DPO-promoted Nemotron checkpoints · hot-reloads on PolicyPromoted · health-probed via /v1/models · cold-start ~30-60s, policy_router falls back to cloud automatically
policy_routerRouting4 decision_types (rebalance / validation / thesis / post-trade narration) each pointing at an active policy. Local vLLM when promoted + healthy, else cloud Nemotron. Routed-to + policy_id stamped into every audit row.
3b · GPU optimization NVIDIA cuFOLIOPortfolio LPMean-CVaR · KDE scenario generation on GPU
NVIDIA cuOptLP solverPDLP · ~250ms typical solve on GB10
NemoRL (in-house)RL fine-tuneNVTraderEnv (Gymnasium) · stable-baselines3 PPO · reward = period_return − turnover_cost − vol_penalty
PyTorch 2.12+cu130GPU runtimeNemoRL training auto-routes to cuda; CPU fallback
4 · Data sources yfinanceBars (EOD + intraday)Daily back to 1980+ for blue-chips; intraday rolling 60d
Webull OpenAPILive snapshots + ordersApp-key signed · prod + UAT (paper) clusters
FinnhubFundamentals / news / consensus60 req/min on free tier
SEC EDGAR10-K / 10-Q / 8-KNo key · polite User-Agent
Tavily · Polygon · Alpha Vantage · IEX · Databento · SerpAPIOptional upgradeUI-linkable per-user via account page · pluggable adapters
5 · Compliance + execution ComplianceAgentRisk gateHard / soft / warn vetos: max_position_pct, sector_pct, turnover, wash_sale, restricted_list
SimBroker · WebullBroker · AlpacaBrokerPluggable brokersSame wire shape (BrokerAdapter ABC); switch via BROKER env or per-user setting
Approve / Override / RejectPM gateOverride and Reject never submit · all 3 audit to immutable ledger
6 · Persistence User DB · per-tenant scopeAuthEncrypted-at-rest credentials · tenant data isolation · postgres-swappable for prod
Encrypted API key storeProvider credsSymmetric-key encryption · only masked prefix/suffix surfaces in UI
Decision audit + trace ledgerAuditAppend-only · auto-rotated · queryable via /api/audit/* + /api/observability/*
7 · Hardware + deployment NVIDIA DGX Spark · GB10GPUcompute 12.1 · cuFOLIO + cuOpt + NemoRL all execute here
Docker · docker-composeContainerizationnvidia/cuda:12.3.0-runtime base · GPU passthrough via --gpus all · optional postgres / phoenix profiles
TailscaleNetwork0.0.0.0:8015 → reachable via 100.103.228.71 on tailnet
NVTrader v0.1.18 ·⚠ Not financial advice ·Terms ·Privacy ·License