ml4t-engineer
Feature engineering, labeling, alternative bars, and leakage-safe datasets for financial ML.
ml4t-engineer provides 120 registry features across 11 categories, path-dependent
and fixed-horizon labeling, activity-based bar sampling, and train-only preprocessing.
The core interface uses Polars DataFrames.
Installation
ml4t-engineer supports Python 3.12, 3.13, and 3.14 on Linux, macOS, and Windows.
pip install ml4t-engineer
The quick start uses only core dependencies. Optional extras provide TA-Lib validation, DuckDB and PyArrow storage, market calendars, visualization, statistics, and ML tools:
pip install "ml4t-engineer[ta]"
pip install "ml4t-engineer[store]"
pip install "ml4t-engineer[calendars]"
pip install "ml4t-engineer[viz]"
pip install "ml4t-engineer[stats]"
pip install "ml4t-engineer[ml]"
TA-Lib requires its native library. The core package does not require an external service, credentials, or special hardware. Python 3.15 is not supported while the active Polars compatibility exception applies.
Quick Start
from datetime import date, timedelta
import polars as pl
from ml4t.engineer import compute_features
close = [100.0 + i * 0.1 + (i % 7) * 0.2 for i in range(100)]
ohlcv = pl.DataFrame(
{
"timestamp": [date(2024, 1, 1) + timedelta(days=i) for i in range(100)],
"open": close,
"high": [price + 1.0 for price in close],
"low": [price - 1.0 for price in close],
"close": close,
"volume": [100_000 + i * 100 for i in range(100)],
}
)
features = compute_features(ohlcv, ["rsi", "macd", "atr"])
assert {"rsi", "macd", "atr"} <= set(features.columns)
assert features.height == ohlcv.height
compute_features() returns the input columns with the requested feature columns
appended. Use the feature registry to inspect categories and parameters before building
larger pipelines.
Supported Workflows
- Technical, volatility, risk, microstructure, statistical, and ML-oriented features
- Triple-barrier, ATR-barrier, percentile, fixed-horizon, trend-scanning, and meta-labels
- Tick, volume, dollar, imbalance, and run bars
- Train/test splitting with train-only scaling
- Feature metadata search and discovery
See the documentation for tutorials, task-oriented guides, explanations, and the API reference. Report defects and request changes through GitHub Issues.
Related Libraries
ml4t-specsdefines the shared market-data and artifact contracts used by this package.ml4t-datasupplies validated market data for feature computation.ml4t-diagnosticevaluates features, labels, and model signals produced from engineered datasets.
Development
git clone https://github.com/ml4t/engineer.git
cd engineer
uv sync --dev --extra docs --extra ta --extra store --extra viz
uv run ruff check src/ tests/ examples/ scripts/
uv run ruff format --check src/ tests/ examples/ scripts/
uv run ty check
uv run pytest tests/ -q
uv build
uv run mkdocs build --strict
Pull requests must also pass the supported Python and operating-system matrix, dependency and vulnerability review, clean-wheel installation, documented workflow tests, and ecosystem qualification.
Project Information
Release files for ml4t-engineer 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ml4t_engineer-0.1.5.tar.gz | 613.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ml4t_engineer-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 998.8 kB
Release files / ml4t_engineer-0.1.5.tar.gz
| Download URL | ml4t_engineer-0.1.5.tar.gz |
|---|---|
| Size | 613.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d70fc77b95874cbac289792867d5415115e3d4b9ab90161ac3658ec6812cc024
|
|
BLAKE2b-256 checksum How to use checksums |
6bf33ab85685961697b7412f85cfe5075cfd4223896b1d4cf562628659664378
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / ml4t_engineer-0.1.5-py3-none-any.whl
| Download URL | ml4t_engineer-0.1.5-py3-none-any.whl |
|---|---|
| Size | 385.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4375d6a7c1ce791536be1d1b4a7aa259b9dd2bba5d0eff81e63d7ea1c530be57
|
|
BLAKE2b-256 checksum How to use checksums |
207a87679ceec491714a4eed6b3975b64b93b3457dd2ec3a1eec9ff0face6c2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency log