Skip to content

Implement mirror-aware sizing and production risk limits #27

Description

@carndog

Outcome

Calculate live order size from explicit portfolio allocation and the Agent Portfolio virtual/real relationship while enforcing the exact revision-controlled production risk policy and objective configuration.

Acceptance criteria

  • Define the source of virtual balance, real allocation, mirror ratio and available capacity
  • Resolve and record the PortfolioRiskPolicy revision effective at the production decision instant
  • Resolve and record the PerformanceObjectiveSchedule revision and objective period effective at that instant
  • Use an immutable, freshness-validated portfolio-performance snapshot
  • Apply maximum order size, instrument exposure, portfolio exposure, daily-loss and return-protection limits
  • Include open orders and reserved pending exposure in available-capacity calculations
  • Create the approved exposure reservation atomically so concurrent decisions cannot oversubscribe capacity
  • Never increase the strategy's requested exposure, invent a trade or reverse its direction
  • Preserve genuinely risk-reducing actions when new risk is restricted
  • Handle stale or unavailable balance, valuation, policy, objective or allocation data by rejecting execution
  • Apply precision, minimum-order and rounding rules explicitly
  • Persist requested and approved sizing, all three revision references, objective period, performance snapshot, evaluator code version and rejection reasons
  • Require policy limits and objectives to be configured independently for Real execution
  • Keep real thresholds, objectives and portfolio values out of the public repository and logs
  • Prove behaviour through deterministic unit, concurrency and scenario tests
  • Default to no live allocation

Dependencies

Activity

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

Metadata

Metadata

Assignees

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions