Skip to content

Build auditable portfolio performance snapshots for RiskGate #53

Description

@carndog

Outcome

Produce deterministic, auditable portfolio-performance snapshots that allow RiskGate to evaluate progress against the applicable objective period without treating deposits, stale valuations or pending exposure as trading profit.

Acceptance criteria

  • Build a snapshot for an explicit portfolio, execution environment and NodaTime Instant
  • Resolve and record the exact PerformanceObjectiveSchedule revision and objective period used
  • Capture opening valuation, current valuation, base currency and valuation timestamp
  • Account explicitly for external deposits and withdrawals
  • Define treatment of realised profit, unrealised profit, fees and trading costs
  • Include current positions, open orders and reserved pending exposure
  • Record valuation source, currency-conversion inputs and freshness
  • Reject or mark the snapshot unusable when required inputs are missing, inconsistent or stale
  • Produce a stable snapshot ID and deterministic input hash
  • Keep the snapshot immutable once used by a risk decision
  • Separate the three configuration timelines from chronological valuation and execution observations
  • Support historical mode using revisions effective at simulated time
  • Support explicit comparison mode using independently pinned immutable configuration revisions
  • Make identical inputs, revisions and code produce identical progress calculations
  • Use only synthetic portfolio values and objectives in public tests
  • Add unit and scenario tests for cash flows, fees, stale data, pending exposure and period boundaries

Dependencies

Out of scope

  • Broker order submission
  • Live account credentials
  • Backtest reporting
  • Choosing strategy direction or generating signals

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