Apex Quant AI — Institutional-Methodology Research Platform
apex-quant-ai
Source is private — architecture summarised below.
Paper-trading and research only — v1 has no live order-routing code path. The central design thesis is that the binding constraint in systematic trading is data correctness and overfitting control, not model sophistication. Two subsystems are front-loaded to enforce this structurally rather than by developer discipline.
A bitemporal data core where every fact carries both event_time and knowledge_time, with all research reads passing through a single as_of() boundary — structurally preventing lookahead bias.
A 16-gate validation suite enforced as a type boundary — Information Ratio against a declared benchmark, Deflated Sharpe at effective sample size, Hansen's SPA, PBO, regime robustness, capacity. No strategy reaches portfolio construction without a passing report.
Architecture is frozen at v1.2; changes require an Architecture Decision Record, and 14 ADRs exist covering the bitemporal model, validation gating, three-way sealed-holdout splits, and benchmark-relative validation. Layout: src/apex_quant/ (16 packages across 7 dependency-enforced layers, checked by import-linter in CI), services/ (4 thin process entrypoints), tests/ (unit, property, integration, benchmark, chaos), migrations/ (Alembic), docs/ (architecture, contracts, ADRs, known limitations).
Security model
Secrets only via .env or environment, never in an image layer; every secret typed SecretStr and registered with a log scrubber for automatic redaction; and an explicit acknowledgment that the live Dhan brokerage access token is a fully privileged credential regardless of the app being paper-only. Two architectural rules are enforced as build constraints: the LLM layer cannot import secrets, and cannot reach the book, risk engine, or allocations. Strategies live in a separate private repo, loaded via an entry point — nothing in src/ may import one directly.