Skip to content

feat(history): prepare dated identities and known-at adjusted inputs - #127

Merged
stefan-jansen merged 24 commits into
mainfrom
feat/dated-inputs
Oct 21, 2026
Merged

stefan-jansen merged 24 commits into
mainfrom
feat/dated-inputs

Conversation

@stefan-jansen

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

Copy link
Copy Markdown
Contributor

Workflow

Prepare saved source observations using dated instrument identities and revisions actually available at an explicit cutoff. Keep raw values, source symbols, missing observations and adjustment definitions. This is input preparation, not an asset database or runtime history/broker engine.

Closes #119. Prerequisite #126 is merged. This ready PR targets main at d48d849f77d3ff75d05383cbaaed9b42f6ca95b7; a normal merge preserves its existing reviewed source tree byte-for-byte. Draft/stacked trigger exclusions from earlier heads are not qualification passes.

Implementation

  • InstrumentRegistry.from_frame/resolve/lifetimes validates captured half-open identity and membership intervals, source/revision provenance and declared instrument types. Renames retain IDs; reused tickers and two venues do not merge. Listing/delisting facts remain source facts, not conclusions from missing prices.
  • prepare_adjusted_history selects known-at price/action/identity revisions. Native raw, split-adjusted and total-return views preserve source OHLCV and actual event fields. Native cash factors require an actually available ex-date close; intraday close facts must declare compatible currency. Existing adjustment formulas/defaults remain unchanged.
  • Supplied factors require an explicit basis/method and exact keys. Causal factors need actual revision identity, availability and a known nonfuture/nonstale share-basis instant. Retrospective unversioned captures retain explicitly unknown provenance. Imported merger/stock research factors do not invent account consideration.
  • Reuse FeedSpec mappings, calendar precedence and canonical session assignment, including CME overnight identity labels and nanosecond cutoffs. Preserve null quotes and absent sessions separately. Source symbols remain; metadata directs consumers to the requested price fields and stable IDs.
  • A runnable offline CSV-to-disk migration recipe retains pre-entry observations, a known-at universe, source revisions and a held-ID rename. Existing API/migration guides document source requirements and material native/imported differences.

Executed evidence

  • Frozen history source 2c4ff20504774dceb280f82a403e870ebdf96899: 4,336 tests pass separately in native and ResourceWarning-error lanes; coverage86.65%. Lint, format, ty, strict docs, wheel/sdist, actionlint and all hooks pass.
  • Normally incorporated feat(adjustments): prepare versioned action facts and explicit factors #126's derived-ratio validation repair. The combined source passes 290 focused history/registry/assets/action/storage/conversion tests with ResourceWarning errors. Seven premise/claim controls pass on correct combined code and fail on deliberate producing-code defects, without waivers or deferrals. Two additional producing controls cover cash per pre-event share and late universe-membership corrections. The guide passed strict docs/static/hooks.
  • Final source d48d849f77d3ff75d05383cbaaed9b42f6ca95b7 produces Data 0.2.2.dev41+gd48d849f7; all171 packaged source files match Git. Its tree is identical to27fca. After main reconciliation,290focused ResourceWarning tests,strict docs and hooks pass again. Fresh isolated wheel and sdist installs pass the actual recipe through public Engineer SMA/label and Diagnostic return APIs. The two warmup prices198/200 give mean199 and the same price-sensitive decision after a future999 correction. Later independent outcomes are1/99,.01,3/98,null. Raw prices/volumes, selected event IDs, ID17 and OLD-to-NEW source symbols remain intact. Wheel SHA256 c2dd036e74c82dd1d889fa89d0e48386b75721cddf70ba8ebbef7cd0a21ff2d3; sdist SHA256 e9c7b2c4656be686fe6efb80a0c1190e6fb5efc9353524ba47292997db8da09d.
  • Installed qualification uses Python3.12.11, 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 package resolves with Specs0.2. No source-path injection or forced dependency resolution.

Final main-head supported-platform, security, coverage and documentation gates remain required before merge. This producer contract does not qualify Backtest runtime/account transitions. No legacy package is a mandatory Data dependency. No release, tag, publication or documentation deployment.

AI assistance was used for implementation, tests and documentation. The actual producer workflows, source diff, financial oracles and failure controls were reviewed in the Data owner workflow.

Stefan Jansen added 22 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.
Keep stable IDs separate from renamed or reused tickers. Select actual known-at revisions, enforce half-open intervals without rounding nanoseconds, and retain original membership provenance. Refs #119.
Expose the existing private factor-producing operation for causal history preparation without changing split/dividend definitions, validation or public defaults. Refs #119.
Select actual available source revisions and explicit raw/split/total-return bases. Preserve missing observations, share units and consumer field mappings. Use canonical session assignment for overnight label cutoffs and authoritative closes before native dividend factors. Keep the owning history batch open for identity integration, supplied-factor history and final qualification. Refs #119.
Select source factor revisions and their declared share basis without recomputing vendor or merger research factors. Preserve source provenance and unknown retrospective availability, reject causal gaps and conflicting methods, and keep broker consideration unavailable. Refs #119.
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.
Preserve the existing history source tree while incorporating the qualified prerequisite history. No source behavior change.
…ppings

Retain captured display symbols while normalizing to source stable IDs. Reject ambiguous venue/lifetime mappings and output collisions before returning a result. Causal history ignores unavailable future price revisions before identity resolution and retains matched identity provenance. Related focused history,registry,assets,storage and adjustment checks:271 ResourceWarning-clean passes.
…ssions

Reuse canonical batched session assignment when instant observations meet dated session identity intervals. Require captured ex-date close currency to match cash and price units. Retain actual failing public-input controls and typed-empty coverage;274 focused ResourceWarning-clean checks pass.
Retain pre-entry observations,source identity intervals and known-at revisions through actual CSV storage. Add supplied-factor causal-basis,units,coverage and immutable-source regressions and document native versus imported definitions. Seven producing-code failure controls cover the accepted premises without waivers. Full final-revision and installed consumer qualification remains required before closure.
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.
Preserve all dated history work and incorporate the prerequisite's three source-ratio overflow/underflow regressions. Combined focused history,identity,assets,action,storage and conversion checks pass with ResourceWarning errors.
…cation

The native dated registry,source revision,raw/split/total-return and supplied-factor workflows retain source keys and missingness. Frozen history source passed4336tests per native/ResourceWarning lane and both installed artifacts passed actual public Engineer/Diagnostic consumption. The combined action-ratio repair passes288focused tests and all seven dated producer failure controls. Final current-head hosted main gates and artifact identity remain required before merge. Closes #119.
Actual captured source workflows preserve pre-event cash terms while converting the derived share basis,and retain the universe known at the earlier cutoff. Each regression passes correct code and fails its producing-operation violation. No runtime source change.
@stefan-jansen
stefan-jansen changed the base branch from feat/action-facts to main October 21, 2026 00:34
Retain the existing27fca source tree byte-for-byte while reconciling squash-only ancestry conflicts. Preserve both histories and require fresh final main-head hosted/package identity gates.290focused ResourceWarning tests and strict docs pass again.
@stefan-jansen
stefan-jansen marked this pull request as ready for review October 21, 2026 00:36
Copilot AI balanced review requested due to automatic review settings October 21, 2026 00:36

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
stefan-jansen merged commit 6763b98 into main Oct 21, 2026
27 checks passed
@stefan-jansen
stefan-jansen deleted the feat/dated-inputs branch October 21, 2026 01:10
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.

Support dated instrument identity and causal adjusted-history preparation

2 participants