Part of #409 (milestone: Account Margin Admission).
Problem
docs/account-risk.md (untracked draft) is a useful general primer on account-level risk: vocabulary, layered constraints, market-type rules, invariant tests. But it was written against a different codebase:
- It references
RunPortfolio, service/portfolio_runner.go, multi-account.md, ExecutionVenue, and AccountManager, none of which exist here.
- It misdiagnoses the 4.6x SPY backtest. The real cause: the unbounded fixed-fraction sizer, an empty risk engine in
cmd/trader/backtest, and a simulator with no margin policy.
- It proposes an API that conflicts with accepted ADRs:
float64 values (ADR-004)
- a single
RiskManager that sizes, resizes, and approves (ADR-006 and ADR-029)
- halt, flatten, and kill switch inside risk rather than live guards (architecture: operational guards are separate from trade risk)
Scope
Rewrite and commit docs/account-risk.md so it:
Acceptance criteria
Part of #409 (milestone: Account Margin Admission).
Problem
docs/account-risk.md(untracked draft) is a useful general primer on account-level risk: vocabulary, layered constraints, market-type rules, invariant tests. But it was written against a different codebase:RunPortfolio,service/portfolio_runner.go,multi-account.md,ExecutionVenue, andAccountManager, none of which exist here.cmd/trader/backtest, and a simulator with no margin policy.float64values (ADR-004)RiskManagerthat sizes, resizes, and approves (ADR-006 and ADR-029)Scope
Rewrite and commit
docs/account-risk.mdso it:Sizer, strict approve/reject risk, live guards separate, and no resizing inside risk;Acceptance criteria