Skip to main content

mlquant

A reproducible PyTorch research stack for machine-learning multi-factor trading: 213 factors, bias correction, portfolio optimization, vectorized backtesting, and System-One-style portfolio decisions.

CI arXiv Python 3.9+

Install and run

python -m pip install mlquantx
mlquant demo

The demo needs no market-data account or API key. It runs the deterministic synthetic pipeline from data generation through 213 factor dimensions, model training, portfolio construction, cost-aware backtesting, and Markdown/JSON report generation. The default config ships inside the wheel, so the command works outside a repository checkout.

The AkShare, Baostock, and yfinance public-data loaders are an optional extra:

python -m pip install 'mlquantx[data]'

Customize or contribute

The wheel is the fastest way to try the project. Clone the repository when you want to change factors, models, portfolio constraints, data sources, or backtest assumptions:

git clone https://github.com/initial-d/ml-quant-trading.git
cd ml-quant-trading
python -m pip install -e '.[dev]'

If the demo saves you setup time, consider starring the repository or sharing a reproducible run.

What is included

  • 204 hand-crafted factors plus 9 curated Alpha101-style factors
  • mask-aware PyTorch tensor primitives for cross-sectional panels
  • limit-up, limit-down, halt, and missing-data bias handling
  • MLP and Transformer research baselines
  • constrained Markowitz portfolio construction
  • vectorized backtesting with turnover and transaction costs
  • AkShare, Baostock, yfinance, and deterministic synthetic data paths
  • auditable public-data validation reports, including negative results
  • mlquant systemone decide for typed portfolio-intent decisions from structured research state

Start here

Research boundary

mlquant is research and educational software. It is not investment advice or a production trading system. Synthetic smoke tests verify engineering behavior, not profitability. Public-data backtests depend on data quality, survivorship, transaction costs, slippage, and modeling assumptions and do not represent live or guaranteed out-of-sample performance.

License

MIT. See the repository license.

Metadata

Release files for mlquantx 0.4.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 mlquantx 0.4.1
File Size Uploaded
mlquantx-0.4.1.tar.gz 104.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mlquantx 0.4.1
File Interpreter ABI Platform
mlquantx-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 190.3 kB

Release files / mlquantx-0.4.1.tar.gz

Download URL mlquantx-0.4.1.tar.gz
Size 104.0 kB
Tags Source
SHA-256 checksum
How to use checksums
33f13f79fc8ce4bf4dc106758e0c227518eb73be3dce3163dbc2b665c61093d2
BLAKE2b-256 checksum
How to use checksums
73608720b4c1859b81aaee163e5f03d359652951427aea0563acec4e5be6f7a5
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 Oct 15, 2026.

Transparency log

Release files / mlquantx-0.4.1-py3-none-any.whl

Download URL mlquantx-0.4.1-py3-none-any.whl
Size 86.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
939cc89ebf0a4db5eb91d33e38719951035f884b64de903507a195f702f41512
BLAKE2b-256 checksum
How to use checksums
f722f2e612ad968ac87551d3250f4774a70bf19efdb89010bf9c3170665e8a63
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 Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.6

2 release files

0.2.5

2 release files

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