Build sequence · paper trading only

V1 first. V2 doesn’t need an edge. V4 does.

Six phases build the daily decision-support agent (V1). Four more replace its rule-based risk gate with real risk math and an agent that explains its own alerts (V2) — this doesn’t require V1 to have found an edge, only to exist. Six further phases would turn it into a continuous intraday system (V4), and that one stays gated: it only starts if V1’s strategy logic backtests with a real edge. Status as of 5 Oct 2026: all six V1 phases are settled, the honest-backtest gate has been reached and answered — no edge on this evidence — so V4 stays on hold. V2 does not depend on that gate: all four V2 phases have shipped: risk engine, explainer agent, eval harness and reasoning trace. V3 — a pivot to Indian markets — is a possible future track, not scheduled, driven by data sourcing rather than build phases, and isn’t diagrammed here. See the homepage.

V1 — foundation V2 — risk & explainability V4 — continuous extension extends this block done closed on a negative result not started

Block diagram

GATE REACHED · NO EDGE FOUND → V4 (CONTINUOUS TRADING) ON HOLD · V2 DOES NOT DEPEND ON THIS GATE V1 — DAILY DECISION-SUPPORT AGENT V2 — REAL RISK ENGINE + EXPLAINABILITY V4 — CONTINUOUS INTRADAY EXTENSION upgrades risk manager fetch→stream adds hot state one-shot→loop adds uptime alerts cron→always-on tick-rate risk check 01 Control API FastAPI 02 State & History Postgres 03 Decision Agent LangGraph 04 Sentiment Model closed — no benefit 05 Build Pipeline Docker + CI 06 Scheduled Run Cloud cron 07 Risk Engine VaR · CVaR · Kupiec 08 Explainer Agent RAG retrieval 09 Eval Harness Golden set + judge 10 Reasoning Trace Langfuse / Phoenix 11 Live Feed WebSocket 12 Hot State Redis + queue 13 Continuous Loop Worker process 14 Risk Guardrails extends V2 · tick-rate 15 Ops Watch Alerts 16 Session Scheduler Always-on
Solid arrows are build order within each track. Dashed lines show which earlier block a later one extends: V2’s Risk Engine upgrades the rule-based Risk Manager inside V1’s Decision Agent, and V4’s Risk Guardrails in turn extends V2’s Risk Engine to fire on every tick instead of once a day — nothing in V2 or V4 is built from scratch. Filled dots mark shipped phases; phase 04 is filled in red because it was completed as an investigation and closed on a negative result, which is different from being skipped.

Phase detail

V1 — build first

ships as a daily paper-trading agent
  1. 01
    Control APIdone
    FastAPI endpoints to view positions, decisions, and trigger a run manually.
  2. 02
    State & historydone
    Postgres: watchlist, price snapshots, decisions, outcomes — real schema, real joins.
  3. 03
    Decision agentdone
    LangGraph multi-agent flow, verified end to end against real Alpaca data, real OpenAI calls and a real Postgres write.
  4. 04
    Sentiment modelclosed
    Two LoRA adapters trained; both landed at or below the majority-class baseline. Ablating the node outperformed keeping it, and rewriting it as a continuous score did worse still. Closed on the negative result rather than spending ~6,000 more labelling calls.
  5. 05
    Build pipelinedone
    Dockerfile, compose stack, GitHub Actions running the suite against a real Postgres service — and failing if any test skips.
  6. 06
    Scheduled rundone
    Terraform on AWS, applied and verified live: VPC, ECR, SSM secrets, scoped IAM, GitHub OIDC deploys, and an EventBridge cron trigger — not an always-on service. The schedule ships disarmed by default, so arming it is a deliberate act.
All six settled. Five shipped; phase 04 closed on a measured negative result.

V2 — make the judgment real

unblocked — no gate to clear
  1. 07
    Risk enginedone
    Historical and normal VaR/CVaR, a 60-day correlation check, and a Kupiec backtest of the risk model itself, layered on V1’s rules as a hard floor with a pre-registered 2% VaR budget. The forecasts pass Kupiec in-sample (4.4% breaches vs a naive 2% VaR’s 10.3%) but are too cautious out-of-sample. As a budget it cost $492 in-sample and gained $57 out-of-sample: no evidence it helps. Its first step found the look-ahead leak in V1’s backtests.
  2. 08
    Explainer agentdone
    A node after the risk engine that explains, in plain language, why a trade was cut or blocked, from headlines around the losses the VaR is built from. Retrieval is Postgres full-text search, with a recency-only baseline; every citation must be a headline the model was actually shown, or the explanation is flagged. On 20 recorded decisions: 20 of 20 explanations fully grounded, every no-news day left uncited, $0.06 in total — with a news window later found to sit a day late (headline dates read as times), since fixed. Whether the explanations are right, not just grounded, is phase 09’s job.
  3. 09
    Eval harnessdone
    40 of AAPL’s worst days, every candidate headline labelled, plan and every stage committed before its results. Retrieval: full-text ranking beat recency on every measure (top headline relevant 50% vs 30%) but missed the pre-registered significance bar (p = 0.12). Explanations: matched the labelled cause 65% of the time against 22% for quoting the best headline, 17 wins to 0, with 92% of causes supported. CI fails on any retrieval change until the set is re-scored. Caveat: the labels were written by Claude, not a person, and the judge and explainer are Claude models too — so this shows the three agree, not that a human would.
  4. 10
    Reasoning tracedone
    Every decision stores its full trace in the same transaction: each model call’s exact prompt and reply, model, tokens and time; every headline retrieval with ranks and scores; the VaR arithmetic; the citation check. A pre-registered check rebuilds each explanation from the trace alone: 19 of 19 on a dry run and 5 of 5 on real model output. Overhead within run-to-run noise; about 16 kB per decision. Credentials can’t reach it. Audited with one command.
None of this depends on the strategy having an edge — it makes the existing system's judgment better and its reasoning visible. All four shipped.

V4 — extend, don’t restart

on hold — the gate below was not cleared
  1. 11
    Live feedon hold
    Replaces the daily fetch with a streamed WebSocket connection to market data.
  2. 12
    Hot stateon hold
    Redis in front of Postgres for state read and written every tick, plus a queue decoupling feed from decisions.
  3. 13
    Continuous loopon hold
    The same agent logic as a long-running worker reacting to each bar instead of running once.
  4. 14
    Risk guardrailson hold
    Extends V2's risk engine to fire on every tick instead of once a day, plus a hard circuit breaker on stale data.
  5. 15
    Ops watchon hold
    Crash and staleness alerts — mandatory once something runs unattended for hours.
  6. 16
    Session scheduleron hold
    Starts at market open, flattens positions and stops at close, skips weekends and holidays.
Every block here either upgrades a numbered V1 or V2 block, or is explicitly new — nothing is rebuilt from scratch. None of it is started.

V2 does not wait on the gate below. It was tempting to lump "improve the risk logic" in with the rest of the on-hold work, but the reasoning doesn't hold up: a better risk model and an agent that can explain its own alerts make the existing V1 system more trustworthy regardless of whether the strategy ever finds an edge. That's a different claim from "run it faster and more often," which is what the gate below is actually about.

The gate before phase 11 has been reached, and the answer is no. The rule set at the start was: back-test the V1 strategy logic honestly first, because if it shows no real edge on historical data with realistic slippage, running it continuously in V4 won't create one — it will replay the same non-edge faster and with more moving parts to debug.

Seven real-LLM runs on AAPL, 5bps slippage, mark-to-market, each against buy-and-hold over its own window:

#4  in-sample, 13 months−$39
#6  out-of-sample, 6 months−$65
#7, #8  sentiment ablated−$41, −$74
#9  replicate of #4−$130
#14  continuous score node−$225
#3  pilot quarter, 4 trades+$22

Every run longer than a quarter underperformed. The single exception is a 3-month pilot with four closed trades, which beat the baseline mainly because AAPL fell over that window — buy-and-hold lost money and a largely idle system did not. The out-of-sample run was executed once, with no code, prompt or parameter changes made after seeing the in-sample result, which is what makes it worth believing.

So V4 is on hold, and that is the roadmap working as designed. The gate existed precisely to catch this before six more phases were built on top of it. Phase 06 was finished anyway — deployment is a real skill to demonstrate, and it does not depend on the strategy being profitable. V2 and V3 (see the homepage) proceed independently of this gate.