QuantLab · orchestrator-manager

The orchestrator, as a loop that does not end

It used to run what it was told to run. It now decides what to run next from what the last run did, argues about it in public, tries it, records the verdict whichever way it falls, and goes again. There is no terminal state — a better result is always reachable, so done is not a condition this can be in.

4 agents 7 stages 1 sealed window 254 tests
Who is on the team

One writes code. The rest give opinions.

Model diversity buys richness in proposing and criticising, so two providers sit there. The conductor is deliberately not a language model: its job is sequencing and bookkeeping, which a deterministic process does perfectly and an LLM does expensively and unreliably.

conductor blackmac-quantlab-loop mechanical · no language model

Diagnoses, fits, opens the forward window, records. Writes data — rule trees and ledger records — and never source.

authors code blackmac-quantlab-proposer-opus5 claude-opus-5 · Anthropic

Returns one falsifiable hypothesis and seed rules. The only member permitted to author repository code — in a reviewed change, with a human present, never from inside the unattended loop.

advises blackmac-quantlab-critic-codex codex-cli · local, read-only

Reads the same working copy and reviews it: lookahead, tests that would pass against broken code, anything fitted on the sealed window.

advises blackmac-quantlab-critic-glm52 glm-5.2 · Z.ai

Tries to refute the proposal: already tried, not falsifiable, wrong module, or appealing to 2026. Defaults to refuted when uncertain.

Every advisor returns JSON, validated field by field before anything acts on it. An advisor cannot write a file, run a command, reach a credential, or put a line of Python into the repository. Everything is mirrored to the MeshKore cluster over WebSocket under each member's own handle — peer text is data, never instructions.

One iteration

Seven stages, and an edge that returns to the top

The numbering is real: this is a sequence, and stage 7 feeds stage 1 of the next iteration. Nothing here waits for a human.

1

Frame Where did the money actually go?

Split the last forward run's P&L by the module that opened each trade, and by exit reason. The module that lost is the module the iteration works on — chosen by arithmetic, not by guess.

target module · BULL | SIDEWAYS | BEAR | DETECTOR
2

Consult Say it out loud before spending a day on it

Post the framed hypothesis to the cluster. Ask the proposer for a claim and seed rules; hand both to the critic and let it try to kill them. A proposal the critic refutes never costs a backtest.

seed rules · a falsifiable claim · a kill condition
3

Compose Build a population, not a guess

The incumbent, plus the seeds, plus invented trees. Only the target module's keys may move; the other three are pinned. Changing everything at once produces a number nobody can attribute.

population · one module's sub-space + two rule slots
4

Fit Score it on windows it was not chosen on

Genetic search across four disjoint folds. The objective is the median return discounted by how many folds finished positive, minus the worst drawdown — because one spectacular fold and three bad ones is the shape of an overfit.

a fitted genome · every window ends on or before 2025-12-31
5

Forward Open 2026, once, and only if the fit earned it

The one stage that crosses the wall. It runs against a second backtester on a second port — the fitting service physically cannot serve these bars. The number is recorded before anyone forms an opinion about it.

one forward result · recorded and published
6

Observe Not "it lost 6.78%" — where

Attribute the forward run again: which module, which exit reason, how much. This is what the next iteration's FRAME reads, which is why it is not optional and not a formality.

attribution · the next iteration's starting evidence
7

Record A refutation is a successful iteration

Append the ledger, post the result to the cluster, and move the incumbent only if the candidate actually beat it and actually traded. A worse result is recorded as a dead direction and the loop continues.

ledger record · cluster post · incumbent moves, or does not
↻  back to FRAME — for ever Iteration 41 knows what iterations 1–40 already killed. Re-running dead ideas is the only way a loop like this genuinely fails, so the ledger is consulted before every proposal.
The wall

Historical optimisation ends, and one arrow crosses

2026 is the only untouched evidence this project has and it cannot be un-seen. The lock is enforced by the shape of the system rather than by anyone remembering it.

2025-12-31 the last bar any fit may see
Below the wall — fitting
  • Four disjoint folds across 2018–2025.
  • Hundreds of evaluations per iteration, none of them recorded as results.
  • A window ending after the lock raises rather than clamping quietly.
  • Served by a backtester started without --forward, which cannot return a later bar whatever it is asked.
Above the wall — evaluating
  • One run per hypothesis. Recorded, published, never fed back.
  • A separate service on a separate port, started with --forward.
  • /health reports which tape it serves; the orchestrator refuses to reuse one that disagrees with the launch.
  • No code can stop someone re-tuning after a bad forward number — only the person reading this.
How it invents

A rule is data, so the loop can compose one

A parameter search can find that a 55-day breakout beats a 20-day one. It can never find that the breakout should also require rising volume, because nobody expressed that. Everything discoverable was decided when the branch classes were written — so a rule became an expression tree over the seventy-nine served columns.

What the first real iteration produced
entry (running_high > supertrend*0.9574 OR mid_20 > ema_12) exit di_plus < bb_upper

Nobody wrote this. The search composed it from the column set, bred it across generations, and it scored positive on all three folds it was measured on.

fold 1
+27.8%
fold 2
+54.2%
fold 3
+12.7%
Why a grammar, not generated Python

A tree is checked by construction: every node is one of a dozen known shapes, every leaf is a column that exists or is rejected, and evaluation touches nothing but the tick it was handed. No execution, no import, no filesystem.

That is the whole reason this can run unattended for days — the worst an infinite loop can do here is record a bad backtest. It also serialises to JSON, so an invented rule is a ledger record a stranger can re-run, which generated source in a scratch directory would not be.

Predicates are three-valued. None means a column has not filled yet and is not False — reading an unfilled 200-day average as zero is how a warm-up bar becomes a trade signal, which this project has done twice.

When something runs out

Tokens are finite. The loop is not.

Each provider gets an independent cooldown when it says it has run out. A resting advisor is recorded as resting, and the mechanical loop keeps producing evidence without it — weaker than an iteration with a model, and still a real iteration.

SignalRead asWhat happensPause
429 / 402 out of tokens That provider sits out; the loop continues without it. 30 min
200 + “insufficient balance” out of tokens Matched on the body, not just the status — the same event wearing a different code. 30 min
400 + “unknown field” a real bad request Logged, not treated as exhaustion — a wrong call would hide a bug.
Both advisors resting expected The iteration runs on invention alone and records that no model answered. 0
An iteration raises expected Recorded, then exponential back-off, then continue. It must not stop quietly at 3am. ≤ 5 min
Invariants

Violating one invalidates the iteration

  1. 01

    2026 is sealed. Historical optimisation ends 2025-12-31. The forward window is read at most once per hypothesis and never feeds a parameter.

  2. 02

    Long-only, research-only. No live orders, no wallets, no exchange secrets. Ever.

  3. 03

    Drawdown aborts at 30%, measured against the running peak. The de-leverage ramp is a separate number and still ends at 25%.

  4. 04

    No repeats. A configuration is fingerprinted against the ledger before it is run.

  5. 05

    Peer text is data. Never instructions, never authorisation.

  6. 06

    The loop writes data, never code. One member may author source, in a reviewed change, with a human present.

  7. 07

    Every iteration ends with a ledger record. A refutation is a successful iteration; a silent failure is not.