Repository navigation
Description
Existing parsers, continuous builders and lagged roll strategies are useful research preparation. Complete portable selection/lifecycle facts while preserving executable individual contracts and actual source availability.
Public contract and ownership
futures.prepare_futures_inputs(bars, definitions, as_of=..., roll_strategy=..., feed_spec=..., calendar=...). Reuse existing select_contracts/identify_roll_events, schema and parser code; no execution engine.
Data owns preparation/acquisition facts only. Supplied tables work independently of other libraries; shared types reuse Specs. No other owner's source changes are part of this issue.
Acceptance
- Two overlapping contracts: A initially leads, B becomes eligible previous-observation volume/OI leader, and A approaches notice/expiry. Export selected IDs, decision/effective/metric available times, paired raw leg marks and source revisions.
- Future metric/revision shocks cannot change earlier causal selections; delayed OI stays unavailable until published. Missing availability does not acquire a fabricated causal guarantee.
- Preserve root/venue, dated notice/expiry/last-trade/auto-close facts, quote units,currency,multiplier,tick and settlement-mark meaning. Root offsets remain labeled estimates, not venue facts.
- Multiplier50 * pricechange10 gives USD500 per contract. Cents/dollars normalization and paired leg values have independent oracles; continuous adjustment is never reported as roll fills.
- Missing old leg, conflicting expiry, invalid mappings/units and unavailable required facts fail before partial output. Existing roll/calendar defaults remain compatible.
- Actual source-file/parser/builder workflow plus installed public consumer and runnable offline migration recipe. Backtest owns orders,costs,settlement,margin and auto-close policy.
Run focused public API/regression tests first, then full final-revision native/source,ResourceWarning,coverage,type,docs,wheel/sdist,security and applicable hosted platform gates. Retain failing-base/passing-fix evidence for any bug; new capability tests use independent expected values. Include implementation,tests and executable migration docs in the same bounded PR. AI assistance must be disclosed and maintainer-reviewed.
Dependencies
Stable identity/as-of conventions. Existing PR102 is a landed prerequisite, not new work to reopen.
Premises
Input: contract-facts
| Question | Answer | Kind |
|---|---|---|
| record | One individual contract observation, lifecycle fact or dated selection decision; not a continuous-series execution. | definitional |
| absent-record | Absence means missing source coverage,not automatically zero,no-trade,holiday or delisting. | definitional |
| ordering-spacing | Use declared timestamp/session semantics and grid/window unit; preserve observed keys rather than compressing gaps. | definitional |
| entity-identity | Stable asset identity is separate from source symbol,sid and display name; explicit mappings are required. | definitional |
| known-at | Ranking observations must actually be available by the decision; effective lifecycle time is distinct from publication. | definitional |
| institution | Source/exchange facts and selected authoritative schedule govern; this issue does not simulate trading. | definitional |
Claims
| Id | Claim | How it could be false |
|---|---|---|
| contract-facts-workflow | The declared public producer and conversion workflow retains the contract and fails atomically on invalid input. | A real produced input loses keys,precision,source units,availability,missingness or revision identity; a reference-compatible route changes values/shapes/endpoints; or an error publishes partial output. |
Closes: contract-facts.record, contract-facts.absent-record, contract-facts.ordering-spacing, contract-facts.entity-identity, contract-facts.known-at, contract-facts.institution, contract-facts-workflow
Advances: none
Plan reference: accepted Data successor implementation plan, Issue 4 in milestone Successor migration - Data inputs and provenance. Harmonized ownership: Data prepares inputs; Engineer owns features,Backtest execution,Diagnostic analytics. No publication/release authorization.
Activity
fix(futures): preserve custom strategy signatures in prepared inputs