Full capability inventory.

Every component. Every integration. Every model. All included in the platform — no add-ons, no hidden tiers.

22-model ensemble across 4 tiers

The prediction engine runs all models concurrently via asyncio.gather(). Results are combined by a weighted vote (Tier weights: 25% statistical, 45% ML, 15% sentiment, 15% macro/regime) and then re-weighted by a PPO meta-controller trained via stable-baselines3.

Tier 1

Statistical Models (25% weight)

ModelMethodSignal OutputPrimary Use
ARIMAAutoARIMA parameter selectionPrice direction forecastShort-term trend
GARCH(1,1)Volatility estimationVolatility sigmaPosition sizing input
CointegrationEngle-Granger / JohansenPair spread signalNAV arbitrage
CorrelationRolling 30-day pairwiseRegime-conditional corrPortfolio construction
Kalman FilterState-space estimationSmoothed price signalNoise reduction
ProphetFacebook Prophet (seasonality)Trend + seasonalityMacro cycle signals
VARVector AutoregressionMulti-asset joint signalCross-asset dynamics
VECMVector Error CorrectionCointegrated system driftMean-reversion pairs
Tier 2

Machine Learning Models (45% weight)

ModelFrameworkSignal OutputPrimary Use
AutoGluonAutoGluon tabularDirection probabilityGeneral alpha
Gradient BoostingXGBoost + LightGBMDirectional scoreFeature-rich alpha
Random Forestscikit-learn ensembleProbability distributionStable baseline
LSTMPyTorch (CPU, no GPU)Sequence forecastTemporal pattern recognition
Tier 3

Sentiment Models (15% weight)

ModelSourceSignal OutputPrimary Use
FinBERTHugging Face (ProsusAI)Positive/Negative/NeutralEarnings text, SEC filings
NewsSentimentNews feed NLPSentiment scoreMacro news impact
MarketSentimentMarket commentaryComposite indexCrowd sentiment timing
SocialSentimentSocial flow analysisSocial momentumEarly breakout detection
UnifiedSentimentWeighted aggregateCombined scoreInput to ensemble
Tier 4

Macro / Regime Models (15% weight)

ModelMethodSignal OutputPrimary Use
HMMHidden Markov ModelBULL / BEAR / RANGE / CRISISRegime classification
RegimeModelMulti-state classifierRegime probabilityOrchestrator strategy switch
FactorModelFama-French inspiredFactor loadingsRisk decomposition
GaussianProcessBayesian inferenceProbabilistic forecastConfidence estimation
PatternModelTechnical pattern detectionPattern signalChart structure recognition

PPO Meta-Controller

A Proximal Policy Optimization agent (stable-baselines3) acts as the meta-controller. Observation space: ensemble predictions, volatility, regime, market microstructure. Action space: continuous tier weight adjustments. Trained continuously against live P&L outcomes. Results in dynamic weight reallocation — in a CRISIS regime, Tier 1 statistical weights increase; in trending markets, Tier 2 ML weights dominate.

LangGraph state machine — a structured debate before every trade

No signal reaches execution without passing through a 7-node LangGraph StateGraph. The deliberation is not cosmetic. A dissent_score > 0.7 triggers unlimited deep research loops (capped at 3). Consensus < 0.2 fast-tracks to allocation. The debate is adversarial by design.

7 Nodes — Summary

1
research_agent

Perplexity sonar-pro call for grounded market narrative

2
debate_agent

Bull / Bear / Neutral LLM agents run in parallel; dissent_score computed

3
deep_research

High-dissent path — focused Perplexity deep dive, injected back into debate

4
allocator_agent

Kelly Criterion + 4 constraints = AllocationResult

5
red_team_node

Adversarial GPT-3.5-turbo: find every reason NOT to trade

6
sanity_guard_node

Price reality check, liquidity check, hallucination detection

7
execution_agent

IC-level deal memo generation + Decision Gateway routing

Human-in-the-Loop Approval Tiers

TierTriggerTimeoutChannel
Auto-Executeconfidence > 0.85ImmediateDirect to broker
Trader Reviewconfidence 0.65 - 0.855 minutesWebSocket cockpit + Telegram
Senior Reviewconfidence < 0.6510 minutesWebSocket cockpit + Telegram

Timeout behavior: all unanswered approvals auto-reject at timeout.

8-stage sequential risk chain. Each stage is an independent veto.

Risk is not a single check. It is a pipeline. Every stage runs in sequence. Any stage can halt the trade. Nothing executes without clearing all 8.

0

MicrostructureAgent

Veto-capable

Order Book Imbalance (OBI) calculation. Hostile order wall detection (5x average volume = veto). Ensures the market can absorb the trade before models deliberate.

1

CVaR Risk Manager

Veto-capable

95th-percentile Conditional Value-at-Risk over 252-day rolling window. Position-level and portfolio-level limits enforced simultaneously.

2

Portfolio Optimizer

Veto-capable

Half-Kelly position sizing. Four constraints: correlation cap (>0.75 vs existing positions = reject), sector concentration limit, inverse-volatility sizing, ATR-based stop-loss anchoring.

3

ChaosEngine

Veto-capable

Jump-diffusion Monte Carlo: dS = μS dt + σS dW + J·S dN. Three simulation paths (Brownian, fat-tailed Pareto, crisis-cluster correlation). Stress-tests the proposed position across thousands of shock scenarios.

4

StressTester

Veto-capable

Four historical crisis replays: 2008 Financial Crisis, 2020 COVID Crash, 1987 Black Monday, 2010 Flash Crash. Position fails if worst-case exceeds loss limit.

5

TailHedgingService

Advisory

Black-Scholes option pricing. Three hedging strategies recommended: OTM Put Spread, Volatility Overlay (long VIX call), Correlation Hedge (gold offset). Does not veto — recommends protective instruments.

6

RedTeamAgent

Veto-capable

Adversarial LLM (GPT-3.5-turbo) role-playing as a risk-averse analyst. Explicit prompt: find every reason not to trade. Returns veto=bool, kill_reason, risk_flags[].

7

SanityGuard

Veto-capable

Three checks: price reality (>5% LLM price deviation = hallucination veto), liquidity (order size vs ADV), structural hallucination detection (contradiction with TimescaleDB ground truth).

Direct broker connections. No middleware. No latency overhead.

HedgeVision connects directly to broker APIs using native protocols. Order lifecycle is fully tracked from placement to fill confirmation.

IBKR (Interactive Brokers)

Equities, Options, Futures

Protocol:ib-insync TWS connection
Port:4002 (paper) / 4001 (live)
Order types:Market, Limit, Stop, Bracket
Fill method:Event-driven (orderStatusEvent, execDetailsEvent)
Options:Full chain pricing via qualifyContracts()

IC Markets MT4

Forex

Protocol:REST bridge to MT4 Expert Advisor (localhost:8005)
Symbols:GBPUSD, EURUSD, USDJPY, AUDUSD + full IC Markets roster
Fill method:Polling every 2 seconds until FILLED
Order types:Market, limit, SL, TP via REST body params

Binance

Crypto

Protocol:CCXT singleton
Assets:BTC, ETH, BNB, SOL, ADA + all USDT pairs
Order types:Market, Limit, Stop-Loss, Take-Profit
Fill method:Polling via fetch_order() every 3 seconds

Paper Adapter

Safe Testing

Activated:paper_mode=True in config, or when all live brokers are circuit-broken
Behavior:Simulates fills at live Redis price +/- 0.1% slippage
Recording:Full order lifecycle recorded — identical to live behavior

NAV Arbitrage — Cross-Broker Dual Execution

Z-score spread monitoring. When |Z| > 2.0: simultaneous asyncio.gather(leg1, leg2) across IBKR + Binance or IBKR + IBKR (futures vs equity). Exit when |Z| < 0.3.

Continuous market intelligence. Three tiers of ingestion. Five quality checks.

Data flows through a multi-tier pipeline with strict quality validation before reaching TimescaleDB.

Data Pipeline

Tier 1

Crypto Core

5-minute Binance OHLCV, auto-backfill

Tier 2

Equity / Macro

Hourly — yfinance, Alpha Vantage, FRED API

Tier 3

Gap Assets

On-demand backfill triggered by DataContinuityModule

Quality Gate (5 checks)

CompletenessTemporal orderingPrice logic (High >= Low >= 0)Staleness freshnessContinuity gap detection

Intelligence Modules

ModuleData SourceOutput
WhaleScoutGlassnode, CryptoQuant, on-chainWhale score (40% on-chain / 30% wallet / 30% flow)
TranscriptScannerEarnings calls, FLTS signalsSemantic earnings surprise signal
OpenBB AdapterDark pool prints, FTD dataInstitutional flow signal
PerplexitySentimentServicePerplexity sonar-pro (real-time web)Market intelligence bundle (cached 1hr)
MicrostructureAgentLive order bookOBI, spread, wall detection, pre-trade veto
Economic CalendarFMP APIEvent-driven signal adjustments

Institutional-grade observability. Fully managed.

Complete visibility into system performance, model health, and trade execution.

Prometheus

Metrics collection (orders, fills, latency, P&L, NAV)

Grafana

Real-time dashboards — order flow, broker fill rates, drawdown

Sentry

Error tracking and alerting

New Relic APM

Distributed tracing across service calls

MLflow

Model experiment tracking, metric logging, run history

Telegram

Trade alerts, approval requests, circuit breaker notifications

APScheduler — 20 Background Jobs

From 5-minute crypto refresh to weekly ML retraining, all jobs are AsyncIOScheduler UTC-based with no drift. Jobs include crypto_ingestion, trade_lifecycle, signal_generation, position_limits, nav_scanning, pnl_snapshot, model_health, equity_ingestion, EOD sequence (reconciliation, quality gate, features, arbitrage, correlation, cointegration), and weekly ml_retraining (~120min).

Six LLM providers. Automatic fallback. Zero single point of failure.

Circuit breaker rule: 3 failures in 300 seconds marks provider as OPEN. System automatically routes to next in chain. Auto-recovery after 300 seconds + 1 success.

PriorityProviderModelPrimary Use
1Groqllama-3.3-70b-versatileDebate, critique (speed)
2Perplexitysonar-proResearch, OSINT (web-grounded)
3OpenAIgpt-4o-mini / gpt-4o / gpt-3.5-turboDeal memos, red team
4Azure OpenAIgpt-4o-miniEnterprise fallback, multi-agent
5OpenRouterFree tier modelsLow-criticality fallback
6Google Geminigemini-pro / gemini-flashLast resort, long context

LLM Chain \u2014 Prompt Assembly \u2192 Provider Routing \u2192 Response Parsing

LLM Chain Diagram