The Snapshot Vault for XRTM.
Project description
xrtm-data
The Snapshot Vault for XRTM.
xrtm-data provides the rigid schemas and temporal sandboxing infrastructure required for zero-leakage forecasting. It defines the "Ground Truth" data structures that the rest of the ecosystem (Forecast, Eval, Train) relies on.
Part of the XRTM Ecosystem
Layer 4: xrtm-train → (imports all)
Layer 3: xrtm-forecast → (imports eval, data)
Layer 2: xrtm-eval → (imports data)
Layer 1: xrtm-data → (zero dependencies) ← YOU ARE HERE
xrtm-data is the foundation layer with zero dependencies on other xrtm packages.
Installation
pip install xrtm-data
Core Primitives
1. The Forecast Object Standard
Adhering to strict Governance v1, the ForecastOutput schema mandates that every prediction be accompanied by a structured causal graph (logical_trace) and a calibrated confidence interval.
from xrtm.data import ForecastOutput, CausalNode
prediction = ForecastOutput(
question_id="q_123",
probability=0.75,
reasoning="Base rate analysis suggests...",
logical_trace=[
CausalNode(event="Inflation rises", probability=0.8),
CausalNode(event="Fed cuts rates", probability=0.4)
]
)
2. Zero Leakage
The MetadataBase enforces a strict snapshot_time. This timestamp represents the "End of History" for the model. Any data point generated after this time is considered "Future Leakage" and is programmatically inaccessible during backtesting.
Project Structure
src/xrtm/data/
├── core/ # Interfaces & Schemas (domain-agnostic)
│ ├── interfaces.py # DataSource protocol
│ └── schemas/ # ForecastQuestion, ForecastOutput, etc.
├── kit/ # Composable utilities (processors)
└── providers/ # External data source implementations
├── local/ # LocalDataSource (JSON files)
└── online/ # PolymarketSource (Gamma API)
Development
Prerequisites:
# Install dependencies
uv sync
# Run tests
uv run pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xrtm_data-0.2.6.tar.gz.
File metadata
- Download URL: xrtm_data-0.2.6.tar.gz
- Upload date:
- Size: 61.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c764a91b5d0f8254558a27f9044394f380b16c44a89778d6c06399f85e2f18f0
|
|
| MD5 |
712d536c9c87a140f246a7d42ab3632d
|
|
| BLAKE2b-256 |
322daf53415e6fb9b0258369ea1a6f83f6de494d5248e7f2382cc47cb752d307
|
Provenance
The following attestation bundles were made for xrtm_data-0.2.6.tar.gz:
Publisher:
publish.yml on xrtm-org/data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrtm_data-0.2.6.tar.gz -
Subject digest:
c764a91b5d0f8254558a27f9044394f380b16c44a89778d6c06399f85e2f18f0 - Sigstore transparency entry: 1453609446
- Sigstore integration time:
-
Permalink:
xrtm-org/data@efd2eeacd4b92c57b546fcf1f300af31dd7b11ce -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/xrtm-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@efd2eeacd4b92c57b546fcf1f300af31dd7b11ce -
Trigger Event:
release
-
Statement type:
File details
Details for the file xrtm_data-0.2.6-py3-none-any.whl.
File metadata
- Download URL: xrtm_data-0.2.6-py3-none-any.whl
- Upload date:
- Size: 65.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
095d5b45bd2cfca3452b30ce5b1dbc5c4e9dae2062fd99530eec5411a39a5532
|
|
| MD5 |
30c7bdb61ba99e9a165e7a42c323e768
|
|
| BLAKE2b-256 |
966f884351e8a89cced4b2cd2ca96d4aa7e63ed10eb5b53b63e8d38ca9c7c00c
|
Provenance
The following attestation bundles were made for xrtm_data-0.2.6-py3-none-any.whl:
Publisher:
publish.yml on xrtm-org/data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrtm_data-0.2.6-py3-none-any.whl -
Subject digest:
095d5b45bd2cfca3452b30ce5b1dbc5c4e9dae2062fd99530eec5411a39a5532 - Sigstore transparency entry: 1453609520
- Sigstore integration time:
-
Permalink:
xrtm-org/data@efd2eeacd4b92c57b546fcf1f300af31dd7b11ce -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/xrtm-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@efd2eeacd4b92c57b546fcf1f300af31dd7b11ce -
Trigger Event:
release
-
Statement type: