Skip to main content
The Quant Flow upgrades the autonomous decision loop from simple heuristics to an quantitative pipeline. Ten modules replace hardcoded edge estimation with factor-based alpha modeling, formal hypothesis lifecycle management, regime-aware strategy selection, and constraint-aware portfolio optimization.

Architecture

The quant flow wraps Rust primitives (MarkovRegimeModel, VpinDetector, prediction_greeks, cornish_fisher_var, etc.) into a cohesive pipeline that runs inside the oversight loop.

Regime Detection

Classifies fund-level market regime using a 3-state Hidden Markov Model (calm/volatile/crisis) with trend and mean-reversion overlays.
Regime transitions trigger research events. The research pipeline filters strategy types by regime: trending regimes favor directional strategies, quiet/mean-reverting regimes favor market-making.

Multi-Factor Alpha Model

Replaces the naive edge = 0.05 * fitness with a 7-factor model that self-calibrates using information coefficients (IC).

Prediction Market Factors

Factor weights are proportional to IC_IR (mean IC / std IC). Factors with negative IC get sign-flipped. The model reweights automatically as outcomes are recorded.

Hypothesis Framework

Tracks trading ideas through a formal lifecycle with Bayesian updating and statistical validation.

Hypothesis Lifecycle

Competing hypotheses for the same market are tracked. The best hypothesis (highest confidence * edge) wins deployment priority. SQLite persistence survives restarts.

Signal Ensemble

Combines multiple signal sources with IC-weighted blending and redundancy detection.
Signals with correlation > 0.7 are penalized to avoid double-counting. IC and hit rate are tracked per signal for dynamic reweighting.

Research Intelligence

Event-driven research triggers replace purely timer-based scanning.
Attribution chains track which triggers led to profitable deployments, allowing the system to prioritize trigger types that generate alpha.

Portfolio Optimization

Constraint-aware optimizer that replaces simple equal-weight allocation.
Uses Kelly-based expected returns + Ledoit-Wolf shrinkage covariance + projected gradient descent with constraint projection. Drift-based rebalancing replaces time-only rebalancing. Enable in FundConfig:

Risk Analytics

Regime-conditional risk limits, Cornish-Fisher tail risk, and portfolio Greeks.
Enable regime-conditional risk in FundConfig:

Alpha Decay Tracking

Monitors edge erosion and predicts when strategies should be retired.
The autopilot uses decay tracking to auto-retire strategies whose edge has decayed below threshold.

Execution Intelligence

VPIN toxicity detection, inventory risk management, and execution scheduling.
VPIN alerts feed into the adaptive execution tuner as Rule 5 (toxicity-driven spread widening).

Performance Attribution

Fund-level alpha/beta decomposition, strategy contribution, and cost analysis.

Oversight Loop Integration

All 10 modules are wired into the FundManager oversight loop automatically:

Configuration

Three new fields on FundConfig control the quant flow:
The quant modules are always instantiated and available via properties (fund.regime_detector, fund.alpha_model, etc.) even when optimization_enabled and regime_risk_enabled are False. The flags only control whether they replace the defaults in the oversight loop.

Rust Primitives Used