Skip to content

Add replayable portfolio accounting and SQLite experiments - #6

Merged
asoracca merged 3 commits into
mainfrom
feature/replayable-experiments
Sep 22, 2026
Merged

asoracca merged 3 commits into
mainfrom
feature/replayable-experiments

Conversation

@asoracca

Copy link
Copy Markdown
Owner

Portfolio runs now retain ordered audit events and content identities, allowing atomic SQLite storage and exact replay from saved configuration and prices. The original seven-ledger API and close-signal/next-open/close-mark timing remain.

  • Add a versioned two-symbol synthetic OHLC demo with expected ledgers, rejection and exit.
  • Add typed accounting records, input/configuration/source hashes, memory and SQLite stores, explicit SQL migration, constraints, transactions, indexes and window-function reports.
  • Add exact replay, comparisons under matching assumptions and separate slippage sensitivity.
  • Fix minimum commissions on reduced fills, prevent sale fees from creating negative cash, and release terminal reservations. Document missing/stale-bar and corporate-action policies.
  • Extend offline CI and record seeded measurements, environment and query plans.

Validation: 37 local tests, lint, golden output and all replay/reporting commands passed. Measured 9,838 audit events over 50,400 synthetic rows in 4.82 seconds median across three runs on the documented machine.

Limits: daily bars, floating-point accounting and complete in-memory histories. Exact replay requires matching source and dependency versions; unflagged data problems cannot be inferred automatically.

PR #5 was inspected and remains separate; this change does not duplicate or merge its strategy-selection research.

@asoracca
asoracca merged commit 172f4cb into main Sep 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant