Skip to content

docs: account risk and capital management primer mapped to Trader #418

Description

@rustyeddy

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions