Skip to content

Add frozen-portfolio capital sweeps with lagged monetary turnover caps - #89

Merged
initial-d merged 2 commits into
mainfrom
codex/capital-capacity-20261122
Nov 22, 2026
Merged

initial-d merged 2 commits into
mainfrom
codex/capital-capacity-20261122

Conversation

@initial-d

Copy link
Copy Markdown
Owner

Summary

A frozen weight portfolio requests very different monetary trades at one million and ten billion. Add a capital-capacity sensitivity API and CLI that replays the same saved targets across every supplied account size with shared strictly lagged monetary turnover caps.

Caps use a full prior window and exclude the order date; unavailable history is recorded separately from observed zero turnover. Each account starts in cash at the saved evaluation start, while prior turnover still informs its first cap. The uncapped reference uses the same directional permissions. Report fills, actual cash, missed targets, normalized NAV and complete per-capital ledgers without retraining or picking a best scenario.

mlquant capacity reuses panel/weight/prediction artifacts, requires a source category and currency, accepts explicit vendor amount-unit conversion, and preserves ordinary backtest files. This is a sensitivity policy against lagged monetary turnover, not a proven real-market capacity bound or a model of order queues/impact.

Type of change

  • Feature
  • Test or benchmark

Reproducibility

  • Added tests and independent Decimal monetary-budget/ledger verification.
  • Documented timing, reference, units, missing-history and execution assumptions.
  • No private data, credentials or large generated artifacts committed.
  • Solo contribution.

Validation

  • Full local suite: 548 passed, with two existing LibreSSL/CVXPY warnings.
  • Ruff on src, tests and audit script; git diff --check passed.
  • Actual CLI replay on frozen 500x200 synthetic inputs at 1 million, 100 million and 10 billion.
  • Independent 60-digit Decimal reconstruction of all 40,000 lagged caps and three full ledgers; maximum NAV error / initial capital 1.56e-14.
  • Current/future turnover mutation, consistent monetary-unit conversion, liberal-cap reference, hand-calculated capital pressure, coverage, bankruptcy, and output-preservation controls passed.
  • CI runs a two-capital replay after its complete synthetic pipeline.

Raw synthetic audit retains every result. The largest constructed account loses less because it stays 98.6% in cash, illustrating why exposure and fills must be read with returns. No public-data performance snapshot or alpha claim is added.

@initial-d
initial-d merged commit 476f62a into main Nov 22, 2026
3 checks passed
@initial-d
initial-d deleted the codex/capital-capacity-20261122 branch November 22, 2026 06:37
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