Skip to content

Default-off external cash-flow facts and Modified Dietz returns - #712

Merged
Pigbibi merged 7 commits into
mainfrom
cashflow-0230/external-flow-twr
Oct 17, 2026
Merged

Pigbibi merged 7 commits into
mainfrom
cashflow-0230/external-flow-twr

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Accept optional externalFlow.v1 through the existing authenticated, account-bound facts receiver and compute native-currency Modified Dietz returns and chained-index drawdown when complete flow windows and real valuations are available. Invalid or incomplete calculations keep returns/drawdown null and propagate the actual reason to the existing performance API and SummaryCards/ReturnsCard.

This branch includes a normal merge of main 6a00df408caa7932f09630906a4917e91e430b84. It preserves the merged equity-history and #718 display behavior, the compatible schema union, and the reviewed Kimi type patch. The final EMPTY compatibility adjustment retains the legacy date flag when a member has no real in-range dates; its exact constructed input produces the same complete apply output as 49bec3cdf9a3858c4ecf32957cb95eb47fdf233a. This is compatibility preservation, not evidence of a production defect.

Validation is bound to head 646e4bf1a7d3d360521bf1c33e4a0f852dac0b56, tree a62ca2a6a6ac6450fa8adaaeb9b97eab3ddf20d9:

  • Independent non-author Codex CLI review: PASS.
  • Original fixed regressions: 8 entrypoints, 90 named checks passed; all earlier failure assertions retained.
  • Existing core/apply checks: 27/27; actual in-process Worker/SQLite checks: 24/24; original components' bilingual visible-body checks from actual synthetic API outputs: 68/68. Counts are separate layers, not distinct scenarios to add together.
  • The exact EMPTY input is a portable direct-core compatibility regression; its normal production-route reachability is not established.
  • Cumulative diff against the merged main is the same 11-file set as the original reviewed draft. No order/execution/sizing/risk/strategy configuration, workflow, dependency or generated-asset changes.
  • Schema SHA256: 4000015c6683f43b7ee1e546957bf095d059c6952cce070645f20598f51c6429. Kimi types SHA256: dff60c94d602721c530427fd5e8b02ac22f2dd9d7de94a7b314dd547aecb6662.

CONSOLE_EXTERNAL_FLOW_ENABLED remains OFF unless exactly true. OFF and ON-with-no-source preserve legacy behavior. Modified Dietz is explicitly approximate; no FX aggregate or manufactured zero flow is introduced. Assets and legacy daily P/L/calendar remain unchanged.

No Console/Schwab deployment, collection enablement, real-account call, production backfill, secret/IAM change or new resource is part of this PR integration. Companion Schwab #536 remains unchanged: its collector/report-writer wiring, raw/projection composition, actual pagination/history completeness and source attestation still require separate work. Local/CI validation does not establish real collection or production recovery. Merge is gated on successful CI at the exact reviewed head.

Pigbibi and others added 3 commits October 17, 2026 02:46
D Cashflow Author and others added 4 commits October 17, 2026 22:48
Retain main history members, coverage, recovery contracts and #718 metadata.
Resolve three compatibility conflicts in the authorized five paths; frontend
contracts use approved exact C bytes. Propagate Dietz failure reasons without
changing asset amounts, calendars or disabled/no-source behavior.

All other changes are inherited by the normal draft/main merge. Local only.
@Pigbibi Pigbibi changed the title [NEEDS TRADING-DIFF] Default-off external cash-flow facts and return calculation Default-off external cash-flow facts and Modified Dietz returns Oct 17, 2026
@Pigbibi
Pigbibi marked this pull request as ready for review October 17, 2026 16:12
@Pigbibi
Pigbibi merged commit 68c4953 into main Oct 17, 2026
7 checks passed
@Pigbibi
Pigbibi deleted the cashflow-0230/external-flow-twr branch October 17, 2026 16:16
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