Skip to content

feat(adjustments): prepare versioned action facts and explicit factors - #126

Merged
stefan-jansen merged 12 commits into
mainfrom
feat/action-facts
Oct 21, 2026
Merged

stefan-jansen merged 12 commits into
mainfrom
feat/action-facts

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow

Prepare versioned corporate-action facts and imported price/volume factors without changing native financial definitions or adding broker accounting.

Closes #118. Prerequisites #123 and #125 are merged. This PR targets main and incorporates it through a normal merge preserving both histories.

Implementation

  • prepare_action_inputs retains stable IDs, event/revision/source identity, raw terms and announced/available/effective/ex/entitlement/payment dates. Imported split conventions are explicit; rational terms must agree. Captured instrument membership validates source and destination IDs. Unknown applicable terms remain null with coverage, not invented consideration.
  • apply_adjustment_factors preserves raw observations and supplied definitions. Exact unique key coverage, positive finite factors, currency compatibility and reserved output fields are validated before output. Volume adjusts only when supplied. No orders, positions, entitlement or payment effects.
  • Shared FeedSpec mappings and omission/null calendar declarations are reused. Existing API/migration pages include a runnable CSV-to-facts-to-disk native/vendor example. Existing adjustment kernel defaults remain unchanged.

Executed qualification

  • The earlier complete runtime source passed 4,289 tests separately in native and ResourceWarning-error lanes, with coverage, lint, format, ty, strict docs, wheel/sdist, actionlint and hooks. Final review then reproduced one additional validation defect; that historical result does not qualify the repair by itself. All final-head hosted full-suite gates remain required.
  • Independent oracle: raw prices 200 to 98, split ratio 2 and USD3 per post-event share produce native factor 98/202, shareholder return 1.01 and prior adjusted volume 2000 from raw1000. Imported vendor factor .485 stays distinct and gives prior adjusted close97. A public regression reproduces and prevents source-method provenance overwrite on factor-table reimport.
  • Final reviewed head 79dd1e9f78b577027807824dbc1b9aa49e49dd3f additionally rejects overflow/underflow after split-ratio normalization. Three actual CSV-input regressions fail on 5a4b2ba and pass with the repair; 134 focused adjustment/handoff ResourceWarning tests, lint, format, ty and hooks pass. All seven premise/claim correct/failing-producer controls pass again on the repaired source, without waivers or deferrals.
  • Fresh wheel and sdist identify Data 0.2.2.dev28+g79dd1e9f7; all167 packaged source files match that Git revision. Both isolated installs also reject the three invalid derived-ratio cases through the actual public API.
  • Both freshly installed artifacts run the actual offline recipe through public Engineer and Diagnostic APIs. Native return .01 and preserved vendor return 1/97 pass; raw prices200/98 and volumes1000/7 remain unchanged. Qualification used Specs0.2.0, Engineer immutable source c69e7badaac012ad98b1c4b8aa9a67a952b08f5c, Diagnostic0.1.9, pandas3.0.6 and Polars2.0.0. This is source-candidate integration, not a claim that the currently released Engineer resolves with Specs0.2.
  • All27 final-head checks are completed:26success and the sole configured Python3.15 prerelease skip,with its exception-validation check successful. Both nine-platform supported and ecosystem lanes,coverage,security,strict docs and packaging checks pass on79dd. Superseded stacked/draft cancellations or exclusions are not counted as passes.

No causal as-of guarantee is claimed by this preparation API. No analytical cleaner, runtime history engine, broker, mandatory Reloaded dependency, release, tag, publication or documentation deployment.

AI assistance was used for implementation, tests and documentation. The producing workflow, substantive diff, independent financial oracles and failure controls were reviewed in the Data owner workflow.

Stefan Jansen added 9 commits October 20, 2026 16:53
…offs

Retain timestamp precision, declared label clocks and source keys. Keep sparse price panels reversible without filling observations or rounding integer prices. Exercise actual disk, calendar and recovery workflows plus an offline migration recipe.

Refs #117
Record the installed wheel/sdist consumer versions and the incompatible published Engineer boundary. Add a regression that retains a wholly null input session instead of compressing its clock.

Closes #117
…tinctions

Reproduce naive New York instants shifted to UTC incorrectly and preserve them through bounded disk reads. Keep source NaN distinct from null across price panels and retain pandas label timezones. Validate bad timezone metadata before replacing source generations.

Refs #117
Keep axis identity and native schema metadata serializable without Arrow as a runtime requirement. Exercise an actual pandas Parquet round trip retaining absent observations, nulls and source dtypes. Document the native panel APIs and remove unqualified storage timing claims.

Refs #117
Retain source terms, availability and unknown coverage without broker effects. Keep imported factor definitions explicit and reuse shared feed declarations. Refs #118.
…tor provenance

Add an offline CSV-to-disk workflow, explicit unknown-term coverage and destination-ID validation. Reject reserved factor output fields rather than silently overwrite their source method. Public workflow regression fails on e58be69 and passes after repair. Seven producer controls cover accepted premises. Closes #118.
@stefan-jansen
stefan-jansen deleted the branch feat/observation-fidelity October 20, 2026 23:14
@stefan-jansen stefan-jansen reopened this Oct 20, 2026
@stefan-jansen
stefan-jansen changed the base branch from feat/observation-fidelity to main October 20, 2026 23:17
@stefan-jansen
stefan-jansen marked this pull request as ready for review October 20, 2026 23:17
Copilot AI balanced review requested due to automatic review settings October 20, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Stefan Jansen added 2 commits October 20, 2026 19:21
Resolve squash-ancestry-only conflicts by retaining the existing qualified action code and guide. Main has the exact bfc source tree; the resolved merge tree is byte-identical to existing3947654. Preserve both histories and require fresh main-head hosted checks.
Actual finite CSV terms can overflow under reciprocal or rational normalization,or underflow to zero. Validate the canonical ratio after normalization before publishing event facts. Three public-input regressions fail on5a4b and pass with the guard;134 focused adjustment/handoff ResourceWarning-clean tests pass.
@stefan-jansen
stefan-jansen merged commit cbe2efa into main Oct 21, 2026
27 checks passed
@stefan-jansen
stefan-jansen deleted the feat/action-facts branch October 21, 2026 00:35
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.

Prepare validated corporate-action facts and explicit adjustment bases

2 participants