mlquant
A reproducible PyTorch research stack for machine-learning multi-factor trading: 213 factors, bias correction, portfolio optimization, and vectorized backtesting.
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.
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
Start here
- Source and full documentation
- Google Colab quick start
- Public validation dashboard
- Research card and limitations
- 100,000-row synthetic dataset
- 213-input MLP checkpoint
- Paper: arXiv:2507.07107
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlquantx-0.2.6.tar.gz.
File metadata
- Download URL: mlquantx-0.2.6.tar.gz
- Upload date:
- Size: 85.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed1d38caa662f1cc9298b0654cdebd9604365777c657df6c62accbf97fecaf2f
|
|
| MD5 |
1257d3f570e1f5245edf3566cfdaf2b4
|
|
| BLAKE2b-256 |
549d5a6730307e22951e04eaceb7ef88b51c43be65f457abb148c5bc8d729431
|
Provenance
The following attestation bundles were made for mlquantx-0.2.6.tar.gz:
Publisher:
publish-pypi.yml on initial-d/ml-quant-trading
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlquantx-0.2.6.tar.gz -
Subject digest:
ed1d38caa662f1cc9298b0654cdebd9604365777c657df6c62accbf97fecaf2f - Sigstore transparency entry: 2387845229
- Sigstore integration time:
-
Permalink:
initial-d/ml-quant-trading@575a71c727e9298747e9d3947eb6855cdb2923fa -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/initial-d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@575a71c727e9298747e9d3947eb6855cdb2923fa -
Trigger Event:
release
-
Statement type:
File details
Details for the file mlquantx-0.2.6-py3-none-any.whl.
File metadata
- Download URL: mlquantx-0.2.6-py3-none-any.whl
- Upload date:
- Size: 78.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35ff50677d54c49fe6303ce85ae52acff8e30c132d6f24eb6fc8fd0be2d7828a
|
|
| MD5 |
4ed0c0c51b429089e1b080b6d469902d
|
|
| BLAKE2b-256 |
cc6ba27754275c9458236fb5b9c28054edbf0036715eb6b5e6d1fa301fc93bc1
|
Provenance
The following attestation bundles were made for mlquantx-0.2.6-py3-none-any.whl:
Publisher:
publish-pypi.yml on initial-d/ml-quant-trading
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlquantx-0.2.6-py3-none-any.whl -
Subject digest:
35ff50677d54c49fe6303ce85ae52acff8e30c132d6f24eb6fc8fd0be2d7828a - Sigstore transparency entry: 2387845238
- Sigstore integration time:
-
Permalink:
initial-d/ml-quant-trading@575a71c727e9298747e9d3947eb6855cdb2923fa -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/initial-d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@575a71c727e9298747e9d3947eb6855cdb2923fa -
Trigger Event:
release
-
Statement type: