Skip to main content

ml4t-data

PyPI Python 3.12-3.14 License: MIT

Market data acquisition, storage, and update workflows for machine learning for trading.

Use ml4t-data to fetch and validate market data, keep local datasets current, and provide repeatable inputs to research and trading workflows. It includes adapters for equities, futures, foreign exchange, crypto assets, macroeconomic series, factors, and prediction markets.

Installation

ml4t-data supports CPython 3.12, 3.13, and 3.14 on Linux, macOS, and Windows. Python 3.15 is temporarily excluded while upstream dependencies complete their compatibility work.

pip install ml4t-data

Provider-specific integrations are optional. Install ml4t-data[yahoo], ml4t-data[databento], ml4t-data[oanda], or ml4t-data[cot] when those adapters are needed. Some providers require network access, an account, credentials, or metered data. The provider guide records each boundary.

Quick start

The synthetic provider exercises the public OHLCV interface without network access or credentials.

from ml4t.data.providers import SyntheticProvider

provider = SyntheticProvider(seed=42)
data = provider.fetch_ohlcv("SYNTH", "2024-01-01", "2024-01-10", "daily")

assert not data.is_empty()
assert {"timestamp", "symbol", "open", "high", "low", "close", "volume"} <= set(data.columns)

Set ML4T_DATA_PATH to choose the root directory for local datasets. Without an explicit path, the library uses ./data in the current working directory.

Migration from QLDM names

Existing deployments may continue to use QLDM_DATA_ROOT and import QldmError. Both names emit DeprecationWarning and will not be removed before version 1.0.

  • Replace QLDM_DATA_ROOT with ML4T_DATA_PATH.
  • Replace QldmError with ML4TDataError from ml4t.data.core.exceptions.

Documentation and support

The library supplies data to ml4t-engineer feature workflows and ml4t-backtest simulations. Neither package is required to use ml4t-data.

Development

git clone https://github.com/ml4t/data.git
cd data
uv sync --all-extras --all-groups
uv run pre-commit install
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run ty check
uv run pytest tests/ -q -ra --cov=ml4t.data --cov-report=term-missing
uv run mkdocs build --strict
uv build

Pull requests must preserve offline deterministic tests. Provider contract tests that require credentials run in explicit integration lanes.

Metadata

Release files for ml4t-data 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ml4t-data 0.3.1
File Size Uploaded Provenance Actions
ml4t_data-0.3.1.tar.gz 1.4 MB With provenance Details for ml4t_data-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ml4t-data 0.3.1
File Interpreter ABI Platform Actions
ml4t_data-0.3.1-py3-none-any.whl Python 3 none any Details for ml4t_data-0.3.1-py3-none-any.whl

Total release size: 2.0 MB

Release files / ml4t_data-0.3.1.tar.gz

Download URL ml4t_data-0.3.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
28379c434d596401526df9eb4b23f93fe18f4d8db3b64f0ed2e3469e8925684d
BLAKE2b-256 checksum
How to use checksums
0eda470e38ebc4f8daf03b2345df19a37878241835342480a6dea444719b48e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / ml4t_data-0.3.1-py3-none-any.whl

Download URL ml4t_data-0.3.1-py3-none-any.whl
Size 577.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2ddc7b1dcc1400d359a8fd563a5efeba9ee04ce9f5bcd68358effb967eacc0b
BLAKE2b-256 checksum
How to use checksums
4c5f227c1ec0be4ef089b26563f41f056953fd082f4083ff70b984756f34165f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for ml4t-data 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ml4t_data-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page