Strategy laboratory
Where agents and humans collaborate: an explicit strategy lifecycle, immutable versioning, and clear agent boundaries.
The strategy laboratory is where agents and humans collaborate. Every strategy moves through an explicit lifecycle, and every change creates a new immutable version.
The lifecycle
- Idea → HypothesisA testable claim
- Formal specificationEntry/exit rules, feature requirements
- Historical test → Robustness testBacktest + out-of-sample
- Shadow mode → Paper tradingLive data, no/sim capital
- Human approvalGovernance gate
- Limited productionVery small capital
- Evaluation → Promotion or rejectionMeasured, then decided
What a strategy version pins
An immutable version captures everything needed to reproduce a trade:
| Pinned | Examples |
|---|---|
| Logic | Entry rules, exit rules, scoring weights |
| Inputs | Feature definitions, data requirements, model versions |
| Risk | Risk policy, position sizing |
| Scope | Supported exchanges and chains |
| Status | Draft → testing → paper → production → rejected |
The common strategy interface
Every strategy implements one interface, so the engine can run them interchangeably:
class TradingStrategy(Protocol):
strategy_id: str
strategy_version: str
def evaluate(self, context) -> StrategySignal | None:
... # returns a signal candidate — never places an orderIt must declare supported markets and timeframes, required history and data sources, parameters, entry / exit / invalidation conditions, risk assumptions and known limitations.
The reference strategy — Momentum Breakout Spot V1
The first lab is not meant to guarantee profit; it exists to validate the whole chain end-to-end. Scope: Spot, long-only, liquid quotes, no leverage, no shorting.
Close breaks the prior 20-candle high, volume confirms (≥2× median), momentum is positive and normalized momentum clears the threshold τ — plus spread, slippage, liquidity and data-quality gates.
ATR stop (optionally tightened to the breakout level), then risk-first sizing bounded by every capital, liquidity and exchange limit.
Exit on any of:
- stop-loss
- take-profit
- trailing stop
- close below breakout
- momentum fades
- volume collapses
- spread/liquidity emergency
- max holding time
- circuit breaker
Agent boundaries
| Agents | |
|---|---|
| May | Propose strategies, create hypotheses, suggest features, generate experiments, interpret results, recommend promotion/rejection. |
| May not | Silently modify a production strategy, change capital limits, activate execution, delete failed experiments, overwrite historical results. |