Skip to main content

mlquant

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

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.

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

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

mlquantx-0.2.6.tar.gz (85.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlquantx-0.2.6-py3-none-any.whl (78.7 kB view details)

Uploaded Python 3

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

Hashes for mlquantx-0.2.6.tar.gz
Algorithm Hash digest
SHA256 ed1d38caa662f1cc9298b0654cdebd9604365777c657df6c62accbf97fecaf2f
MD5 1257d3f570e1f5245edf3566cfdaf2b4
BLAKE2b-256 549d5a6730307e22951e04eaceb7ef88b51c43be65f457abb148c5bc8d729431

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlquantx-0.2.6.tar.gz:

Publisher: publish-pypi.yml on initial-d/ml-quant-trading

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for mlquantx-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 35ff50677d54c49fe6303ce85ae52acff8e30c132d6f24eb6fc8fd0be2d7828a
MD5 4ed0c0c51b429089e1b080b6d469902d
BLAKE2b-256 cc6ba27754275c9458236fb5b9c28054edbf0036715eb6b5e6d1fa301fc93bc1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page