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.0

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.0
File Size Uploaded
mlquantx-0.4.0.tar.gz 101.4 kB Details

Built distribution (wheel)

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

Total release size: 187.1 kB

Release files / mlquantx-0.4.0.tar.gz

Download URL mlquantx-0.4.0.tar.gz
Size 101.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6df47532e0a45eb4ea24c8067e91b9a46aa4c7044d8dceaf59037eee737977a6
BLAKE2b-256 checksum
How to use checksums
018b9560e254e0362f5bb2f984f3e795b95f634a1204e57a35926062ef761855
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 14, 2026.

Transparency log

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

Download URL mlquantx-0.4.0-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d176bd737b5a318cb65d8ec18f7f7274af26af605828c339a47f83c0dff3c96b
BLAKE2b-256 checksum
How to use checksums
a935d1205ac0d8cd904b4aef95bc6bee0958b7ef077efd1f437ecb9eedb257c7
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

2 release files

This release

0.4.0 This release

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