docs: C10 — strategy result is a broker-independent position table
Supersede 'broker is part of the strategy'. A strategy outputs a time-ordered table of position events (event_ts, action[buy/sell/close], position_id, instrument_id, volume; open time = opening event's event_ts, so no open_ts; unsigned volume, direction in action). Brokers become downstream swappable plugins: a deterministic frictionless sim-optimal broker yields synthetic pip-equity for neutral comparison/optimization; realistic broker plugins add currency friction/constraints for viability/deploy. Stays within C7 (scalar columns). Updates CLAUDE.md invariant 7, the walking-skeleton line, provenance, and the day-in-the-life doc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,11 +72,15 @@ design decision, not a refactor, and belongs in the ledger.
|
||||
makes a live external call mid-replay. (See `~/.claude/CLAUDE.md` for the
|
||||
IONOS consent rule: external LLM calls happen at the recording/live-source
|
||||
edge, with explicit per-session consent, never inside a backtest.)
|
||||
7. **The broker is part of the strategy.** The broker node is fixed in a
|
||||
strategy and identical in sim and live (one accounting path → one equity
|
||||
curve shape). "Same strategy, different broker" = swap the broker *profile*
|
||||
it is parameterized with. Live order-routing/reconciliation is an external
|
||||
adapter outside the strategy graph.
|
||||
7. **Strategy result is a broker-independent position table.** A strategy
|
||||
outputs not an equity curve but a time-ordered table of position events
|
||||
(`event_ts, action[buy/sell/close], position_id, instrument_id, volume`; a
|
||||
position's open time is its opening event's `event_ts`); the set of open
|
||||
positions at t is its state. Brokers are downstream, swappable plugins that
|
||||
turn this table into an equity curve — never part of the strategy. Neutral
|
||||
evaluation uses a deterministic, frictionless sim-optimal broker producing
|
||||
synthetic equity in **pips**; realistic broker plugins add real
|
||||
friction/constraints in currency for viability and deploy.
|
||||
8. **Deploy artifacts are frozen.** Hot-reload (cdylib) is an authoring-loop
|
||||
tool only. The live bot is a statically-linked, versioned, frozen artifact —
|
||||
never hot-swapped (audit trail: this bot = this commit).
|
||||
|
||||
Reference in New Issue
Block a user