Finance · 2026
Vigil
A self-improving trading research agent — it scans market history for setups, proves why they worked, and trades the survivors.
4 Validation gates
Finance
2026
Key decisions
- Validation gates are stacked and ANDed — a hypothesis must survive in-sample, out-of-sample, walk-forward and Monte Carlo with its parameters frozen — because the failure mode that matters is a promoted false positive, and a rejected real edge is the cheaper error.
- LLM-proposed setups are declarative DSL data interpreted against an indicator whitelist — no eval, no exec — because the component that expands the search space is the least trustworthy one and must never hold execution capability.
- Live trading requires two independent interlocks and disarms on every restart, because an autonomous money-moving agent's only safe default state is disarmed.
- Kill criteria are compiled from each hypothesis at promotion and machine-enforced on live stats, because a kill rule that needs a human trigger-pull at the moment of loss will not be pulled.
The failure mode is false positives
A scanner that tries hundreds of setups will find something that looks profitable by luck alone, so the whole pipeline is built around rejecting its own discoveries. The scan sweeps eight built-in families — RSI reversion, MA cross, gap reversion, volume breakout, Bollinger reversion, momentum, weekday seasonality, opening-range breakout — plus LLM-proposed DSL families, long and short, and gates survivors on trade count, profit factor, t-stat, an effect-size floor and a deflated Sharpe ratio that corrects for the number of trials already run.
An LLM then argues why each survivor works — who is on the other side of the trade, and when the effect breaks — and a critic-defender-judge debate tries to kill the mechanism. What survives debate is validated with its parameters frozen: in-sample, out-of-sample, anchored walk-forward, and a Monte Carlo null over return-shuffled paths, all four required, every run recorded.
A quiet day is the gate working, not the gate broken. A scan that returns zero setups is the guards doing their job, not a bug.
The model proposes; only data executes
The component that expands the search space is the least trustworthy one, so it never holds execution capability. LLM-proposed setups are declarative DSL documents — validated against a strict indicator whitelist, evaluated through the same interpreter as the built-in families. No generated code is ever executed, which is what makes the self-improvement loop safe to run: a genetic generation mutates and crosses over the DSL pool each cycle, and it can only ever name whitelisted indicators and bounded exits.
Promotion emits a declarative strategy spec, and the falsification prose in the hypothesis is compiled into machine-enforced kill criteria on the spec itself. The execution agent demotes a strategy the moment its own predicted failure conditions show up in live round-trip stats — the kill rule does not wait for a human trigger-pull at the moment of loss. What the system learns feeds back: every hypothesis is embedded into a semantic memory, promotion rates per family and per debate verdict go into the proposer’s prompts, and every demotion is written up as an autopsy the next round reads.
Autonomy with a hand on the interlock
Everything ships paper-only, and each step toward real money is explicit and
reversible. Live requires VIGIL_LIVE_ARMED=true and the dashboard ARM
toggle, and every restart disarms. Orders pass a risk manager (notional,
position, gross-exposure and correlation-cluster caps, a daily-loss halt),
compliance checks that fail closed, and broker reconciliation that halts
trading on divergence. The kill switch stops new orders and never blocks exits,
and every action lands in a hash-chained audit log.
The dashboard is the operator’s surface: equity and exposure, the live agent feed, hypothesis lineage with every gate result, and the Lab — autonomy level, the payoff matrix the agent learns from, and the autopsies of the strategies it killed.