Part of Crucible — a Nous Ergon product: a harness for rigorous AI/ML experiments in finance, an equity research-and-trading system instrumented end-to-end. Repo and S3 names use the underlying project codename
alpha-engine.
System-overview entry point. Detailed module documentation, blog posts, the live dashboard, and metrics validation live on the public site.
nousergon.ai · Blog · Modules · Architecture
A multi-agent orchestration system that researches, decides, and acts — and measures and tunes itself in the process. Equities trading is the substrate: a domain where decisions are unambiguous, outcomes are continuously verifiable, and agentic behavior is observable end-to-end.
Four capabilities define the system:
- Multi-agent orchestration — six LangGraph sector teams, a CIO, and a macro economist scan the S&P 500+400 (~900 stocks) weekly. Each sector team runs a quant ReAct → qual ReAct → peer review flow before submitting 2–3 recommendations. The CIO gates new entrants per a configurable cap. Outputs at key stages are evaluated by a rubric-based LLM-as-judge layer.
- Stacked meta-ensemble prediction — three specialized Layer-1 models (LightGBM momentum, LightGBM volatility, and a research-score calibrator) feed a Layer-2 Ridge meta-learner alongside research-context and raw macro features. Predictions flow into a downstream risk-gated executor.
- Autonomous self-improvement — a backtester evaluates the system's own outputs each week, runs parameter sweeps, and writes four optimized configs back to S3. Research, predictor, and executor read those configs on cold-start; the system retunes itself weekly without manual intervention.
- End-to-end measurement substrate — signals are persisted to
research.dbandsignals.json, predictions topredictions/{date}.json, fills to a SQLite trade log backed up to S3, and daily P&L toeod_pnl.csv. The presentation layer is a view, not a measurement layer; numbers source from existing module outputs.
The substrate is equities; the pattern is general. The orchestration, measurement, and learning loops apply anywhere multi-agent collaboration and durable instrumentation matter.
| Phase | Focus | Status |
|---|---|---|
| Phase 1 | Build the system end-to-end | ✅ Complete — 6 modules, 7 public repos, full pipeline running |
| Phase 2 | Reliability + measurability buildout | 🟡 Current — pipeline reliability, every decision point measurable, autonomous feedback loop |
| Phase 3 | Parameter tuning toward alpha | ⏳ Next — operates on the substrate Phase 2 is making trustworthy |
| Phase 4 | Live capital | ⏳ Gated on sustained Phase 3 outperformance |
Per-phase key objectives, the Phase 2 → 3 transparency-inventory gate, and Phase 3 → 4 alpha gating live on the nousergon.ai home page (canonical source). Forward-looking work tracking lives in ROADMAP.md.
| Module | Repo | Today |
|---|---|---|
| Data | alpha-engine-data |
~50 features × ~900 tickers × 10y in ArcticDB; weekly refresh + daily delta |
| Research | alpha-engine-research |
6 sector teams + CIO + macro economist; weekly scan; rubric-based LLM-as-judge on key stages |
| Predictor | alpha-engine-predictor |
Layer-1 LightGBM momentum + LightGBM volatility + research-score calibrator → Layer-2 Ridge meta-learner; 21 features in production inference |
| Executor | alpha-engine |
Risk-gated paper trading via IB Gateway; 4 entry-trigger types; ATR trailing stops |
| Backtester | alpha-engine-backtester |
Weekly evaluator + autonomous optimizers writing 4 configs to S3 (scoring weights, executor params, predictor veto, research params) |
| Dashboard | alpha-engine-dashboard |
Read-only Streamlit; powers nousergon.ai (public) and console.nousergon.ai (private, Cloudflare Access) |
Plus two supporting repos: a public shared library alpha-engine-lib (logging, freshness gates, trading-calendar arithmetic, ArcticDB helpers, agent decision capture, LLM cost tracking) used by all 6 modules, and a private alpha-engine-config repo holding proprietary scoring weights, agent prompts, model parameters, and other tuned values. Disclosure boundary: architecture and approach are public; specific weights, prompts, and thresholds are private.
Module-level data flow. Three Step Functions — weekly, weekday morning, and EOD — orchestrate the modules; per-pipeline orchestration diagrams follow.
flowchart LR
Data[Data<br/>prices · macro · features<br/>RAG corpus]
Research[Research<br/>6 sector teams + CIO + macro economist<br/>incl. LLM-as-judge]
Predictor[Predictor<br/>L1 momentum/vol GBMs + research calibrator<br/>+ L2 Ridge meta-learner]
Executor[Executor<br/>risk-gated sizing + intraday daemon]
Backtester[Backtester<br/>eval + parity + 4 config optimizers]
Dashboard[Dashboard<br/>nousergon.ai + console.nousergon.ai]
Data --> Research
Data --> Predictor
Research --> Predictor
Research --> Executor
Predictor --> Executor
Executor --> Backtester
Backtester -.config auto-apply.-> Research
Backtester -.config auto-apply.-> Predictor
Backtester -.config auto-apply.-> Executor
Data -.read-only.-> Dashboard
Research -.read-only.-> Dashboard
Predictor -.read-only.-> Dashboard
Executor -.read-only.-> Dashboard
Backtester -.read-only.-> Dashboard
EventBridge cron(0 0 ? * SAT *) — Sat 00:00 UTC (Fri 5–8 PM PT).
flowchart LR
Trigger((Sat<br/>00:00 UTC)) --> P1
P1[DataPhase1<br/>EC2 SSM<br/>30 min] --> RAG
RAG[RAGIngestion<br/>EC2 SSM<br/>30 min] --> R
R[Research<br/>Lambda · 15 min<br/><i>incl. LLM-as-judge</i>] --> P2
P2[DataPhase2<br/>Lambda<br/>10 min] --> Train
Train[PredictorTraining<br/>EC2 spot<br/>90 min] --> BT
BT[Backtester<br/>EC2 spot · 120 min<br/><i>eval + parity + 4 config optimizers</i>] --> Notify((SNS))
EventBridge cron(5 13 ? * MON-FRI *) — 6:05 AM PT.
flowchart LR
Trigger((6:05 AM PT)) --> Inf
Inf[PredictorInference<br/>Lambda] --> Start
Start[StartExecutorEC2] --> Boot
Boot[Trading EC2 boots<br/>systemd] --> Plan
Plan[Executor Planner<br/>~6:15 AM PT] --> Daemon((Executor Daemon<br/>~6:20 AM PT))
The daemon runs through the trading day, executing urgent exits at open and timing entries via intraday triggers (pullback, VWAP, support, time-expiry). Daemon shutdown after close (~1:15 PM PT) triggers the EOD pipeline.
Triggered by daemon shutdown — single authoritative path, no redundant cron.
flowchart LR
Trigger((Daemon shutdown<br/>~1:15 PM PT)) --> Post
Post[PostMarketData<br/>SSM on ae-trading<br/><i>EOD OHLCV → ArcticDB</i>] --> EOD
EOD[EODReconcile<br/>NAV · α · positions<br/>trades.db + EOD email] --> Stop((StopTradingInstance))
AGPL-3.0-only — see LICENSE. Commercial licenses available — contact brian@nousergon.ai.