Open Source

The ML4T Software Ecosystem

Six open-source Python libraries covering the ML4T workflow, from market data to finance-native modeling and live execution.

End-to-End Workflow

Start with the full workflow, then drill into the library that matches your current research or deployment task.

The ML4T catalog

Six libraries, one research-to-production workflow

Each library is focused and composable, engineered for production use. Pick the stage you are working on and dive straight into its documentation.

01
Data

ML4T Data

Unified market data acquisition from 19+ providers

Unified interface for quantitative market data: 20+ provider adapters across equities, crypto, futures, forex, macro, prediction markets, and factors. Stores data in Hive-partitioned Parquet with incremental updates, gap detection, and a CLI-driven backfill workflow.

  • 19 data providers
  • Unified API
  • Parquet storage
  • Multi-asset support
  • Point-in-time data
02
Signal

ML4T Engineer

Features, labels, alternative bars, and leakage-safe dataset preparation

120 technical indicators across 11 categories, triple-barrier labeling, and alternative bar sampling (volume, dollar, and tick-imbalance bars). Polars for vectorized work, with Numba-compiled kernels for the iterative algorithms (fractional differentiation, run bars, barrier labeling) where vectorization falls short.

  • 120 features
  • Triple-barrier labels
  • Alternative bars
  • Polars + Numba JIT
  • Feature registry
03
Models

ML4T Models

Finance-native latent factors, SDFs, direct prediction, and portfolio learning

Finance-native model library for latent-factor estimation, stochastic discount factor learning, direct asset prediction, and end-to-end portfolio allocation. Built around persistent panels, ragged cross-sections, and portfolio sequences rather than generic trainer abstractions.

  • Latent factors
  • SDF learning
  • Direct prediction
  • Portfolio learning
  • Backtest handoff
04
Evaluation

ML4T Diagnostic

Feature validation, strategy diagnostics, and Deflated Sharpe Ratio

A composite toolkit for validating signals and strategies across signal research, feature selection, cross-validation, backtest statistics, and portfolio reporting. The distinctive contribution is a set of overfitting guards rare in quant libraries — Deflated Sharpe Ratio, Rademacher Anti-Serum (RAS), Probability of Backtest Overfitting (PBO), and False Discovery Rate (FDR) — joined by Information Coefficient (IC) analysis with heteroskedasticity- and autocorrelation-consistent (HAC) standard errors, combinatorial purged cross-validation (CPCV), four feature-importance methods (Mean Decrease Impurity, Permutation, Mean Decrease Accuracy, and SHAP), and 65+ Plotly tearsheet visualizations.

  • Deflated Sharpe Ratio
  • IC analysis
  • Feature importance
  • Model validation
  • Strategy debugging
05
Strategy

ML4T Backtest

Event-driven backtesting with realistic execution

Event-driven backtesting with point-in-time correctness and exit-first order processing that mirrors real broker behavior. Designed for configurability over opinionated defaults: 47 behavioral parameters let you dial in execution semantics, position- and portfolio-level risk rules, and cash/margin/crypto account policies — enough surface to fit the trading style your strategy actually requires. The same Strategy class runs unchanged in ml4t-live for production.

  • Event-driven
  • Point-in-time correct
  • Risk management
  • Multi-asset
  • Execution simulation
06
Deployment

ML4T Live

Production trading with broker integrations

The same Strategy class you used in backtesting runs unchanged against live markets. Connects to Interactive Brokers and Alpaca for execution, and to five data feeds (Alpaca, IB, Databento, OKX, and CCXT for 100+ crypto exchanges). A 16-parameter risk configuration — position, order, and loss limits, price protection, and a crash-safe kill switch — supports a gradual path from shadow mode to paper trading to live.

  • Broker integrations
  • Shadow mode
  • Real-time feeds
  • Kill switch
  • Async architecture