Repository navigation
feat: add causal raw corporate-action accounting - #166
Merged
Merged
Conversation
Adopt the immutable Specs temporal contract, keep legacy config payloads readable, and make explicit None select observation semantics. Qualify the next API boundary separately from the retained 0.1.13 candidate.
Regenerate lock metadata offline after the direct immutable source dependency. Preserve all other package versions and source identities; the public locked Zipline builder now succeeds.
Include first-period execution costs in returns and drawdown without adding a synthetic bar. Store the baseline in schema 3 and preserve schema 2 and beta readers. Adds real Engine failing-base regression coverage for issue #155. Also includes the requested maintainer batching guidance.
…xports Enable explicit bar capture while retaining complete account observation keys, including all-cash dates. Extend the existing schema 3 artifact with optional holdings and strict keys, retain unavailable legacy capture, and preserve equal-time execution order. Advances #155; capital flows and installed consumer qualification remain open.
…ication Reproduce the shared Python 3.15 failure through uv resolution. Bind selected packages, artifacts, markers and lock declarations while excluding the resolver prerelease permission alone. Preserve raw identities and all 17 accepted measurement records, and keep actual dependency drift rejection. Full suite: 2320 passed, 14 skipped. Fixes qualification of #151.
Apply validated delta/target schedules before decisions using actual marked NAV and preserve pre/post-flow valuations. Chain subperiod returns, retain reported NAV separately from investment wealth, and persist ordered flow applications. Extend accounting invariants to include independently recorded external capital without changing their tolerance. Adds public Engine and artifact regressions and a runnable guide. Advances #155; full qualification and migration integration remain open.
Use a real uv-generated self-contained lock instead of requiring every platform package and build backend in the runner cache. Preserve the failing-base producer operation and the actual dependency-drift rejection control. Addresses the clean-runner failures at 7233675 without changing validator or runtime behavior.
Capture the multiplier and declared currency used for each fill and export signed quantity. Preserve unknown legacy units and cost inclusion rather than reconstructing them from later configuration. Adds actual Engine/Parquet unit checks. Advances #155.
Capture post-fill and last-observed-session holdings through the existing account and fill journal, with explicit completeness and sequence keys. Keep investment returns on the original bar timeline and roll back observations with failed immediate callbacks. Reuse one marked snapshot implementation; preserve a valid zero mark in both carried valuations and open-trade PnL. The zero-mark regression fails twice on b49307a; focused account/lifecycle checks pass. Advances #155.
Keep detailed mark provenance out of ordinary valuation loops and enable timestamp history only when requested. Custom/legacy feeds may omit the new optional capital-events attribute. The real legacy feed run fails before the fix and passes afterward; 39 account/lifecycle/runtime checks pass, including the existing runtime regression gate. Advances #155.
…sions Add Broker.record using the existing journal, callback transaction and portable artifact encoding. Retain carried values on actual bar keys, preserve nonfinite values, expose decoded records, and reject unsupported values before mutation. Persist the optional versioned component with strict observation checks and a runnable guide. Advances #155 and the record adapter foundation of #156; 131 focused checks pass.
Preserve accepted performance samples after the bounded default-path review. Qualify raw action ledger, exact input preparation and observable account/artifact contracts. Closes #157
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owning issue
Closes #157. Advances #156; futures variation cash, dated rolls and final installed migration journeys remain separate accepted batches.
Outcome
Apply explicit raw split, dividend, stock distribution and cash/security conversion facts through the existing DataFeed, Engine, broker and account ledger. Native declared terms recognize receivables; the explicit
zipline_3_2method retains qualified rounding/payment recognition. Preserve raw observations and quote timestamps, original fills and requested order quantities. Adjust pending/partial orders and release covered short collateral. Converted identities reject new orders.Persist action and entitlement lineage with observed receivables in schema 5, including combined benchmark artifacts. Older artifacts remain readable and unavailable action history stays unavailable. Add a complete runnable corporate-action guide, navigation and executable documentation checks.
Regression and correctness evidence
1ac18708a289b54a5e8a4a5c7ac0adac9bac34ea: 13 valid public Engine workflows failed on the missing DataFeed API. Independent split/entitlement/conversion arithmetic and passing controls are retained.a5c84936e3f9216c090a8a5c7f2a507d91a51212: convenience-runner action forwarding, physical entitlement precedence and effective conversion before strict expiry validation each failed through public workflows. The corrected Engine tests pass, including actual installed Data identity selection.cf649ac06fddce76f6caa2403cd8494ac84f72ad, and actual ML4T Datac3b9db80a66397420fb27adeccc762559dd41e07snapshots cover 20 long/short split, reverse/partial-order, cash-after-sale and own/cross-stock scenarios. Compare full closing orders/positions/fills/cash/NAV. Sixteen mechanical-price cases also match premarket traces. Four boundary cases distinguish ex/record dates, own-share delivery and extra price moves.Verification
Final reviewed head is
66b213482431f4cf68e0a65639d128511eade7a3. Full source/coverage and numerical runs were collected ate7995b427dfd65847b669a0d1f1326f5531dd1eb; every package source file is unchanged at the final head. All 104 non-version Python modules in the final wheel are byte-identical to that qualified wheel. The final commit adds real producer contract tests and refreshes generated evidence/docs; its full installed suite and exact docs identity were checked again. Hosted CI qualified this exact head; ordinary squash merge 9493bcb completed on 2026-10-22T00:14:37Z.Compatibility and publication
This is the next-version source boundary, not a modification of the preserved 0.1.13 release candidate. Native no-action account defaults remain unchanged. Raw actions require declared raw input basis, publication, currency and economic terms; no terms or executable quotes are invented. Data owns normalization and prepared facts. No Reloaded package is a production dependency. General merger/tax-lot/FX parity is not claimed.
No release, tag, publication or deployment is included.
AI assistance
OpenAI Codex assisted with implementation, regression and contract tests, documentation, original-framework captures and this PR text. The source diff, financial semantics and actual executed evidence were reviewed in the owning maintenance session. Accountability remains with the maintainer.