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.
Release files for mlquantx 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mlquantx-0.2.6.tar.gz | 85.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlquantx-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 164.2 kB
Release files / mlquantx-0.2.6.tar.gz
| Download URL | mlquantx-0.2.6.tar.gz |
|---|---|
| Size | 85.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed1d38caa662f1cc9298b0654cdebd9604365777c657df6c62accbf97fecaf2f
|
|
BLAKE2b-256 checksum How to use checksums |
549d5a6730307e22951e04eaceb7ef88b51c43be65f457abb148c5bc8d729431
|
| 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 Aug 9, 2026.
Transparency logRelease files / mlquantx-0.2.6-py3-none-any.whl
| Download URL | mlquantx-0.2.6-py3-none-any.whl |
|---|---|
| Size | 78.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35ff50677d54c49fe6303ce85ae52acff8e30c132d6f24eb6fc8fd0be2d7828a
|
|
BLAKE2b-256 checksum How to use checksums |
cc6ba27754275c9458236fb5b9c28054edbf0036715eb6b5e6d1fa301fc93bc1
|
| 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 Aug 9, 2026.
Transparency log