Skip to main content

QuantToolbox (Python)

Python port of the MATLAB QuantToolbox library: econometrics, portfolio optimization / risk budgeting, distribution utilities, and backtesting tools.

This is a from-scratch redesign, not a line-by-line transliteration. The original MATLAB code relied on:

  • a hand-built "GAUSS-style" primitive layer (rows, cols, sumc, packr, selif, seqa, lag1, ...) — replaced here with native NumPy / pandas operations.
  • global variables for solver configuration (ADMM/CCD tolerances, iteration limits, MVO problem state) — replaced here with explicit config dataclasses passed into functions/classes.
  • many near-duplicate solver variants (e.g. ~40 files implementing risk budgeting under different constraint/algorithm combinations) — consolidated here into single classes parameterized by method= / constraints=.

See docs/migration_map.md for the file-by-file mapping from the original MATLAB source to this package, including specific translation notes.

Install (editable, dev)

pip install -e ".[dev,viz]"

Project layout

src/quanttoolbox/
├── config.py            # dataclasses replacing MATLAB `global` blocks
├── dates/                Excel<->date conversion, rebalancing calendars
├── backtest/              return/price series, drawdown, turnover, reporting
├── stats/                 distributions, moments, regression (OLS/ridge/lasso/robust/kernel)
├── econometrics/          OLS/GMM/ML/Whittle estimation, VAR/VARX, Kalman filter, ADF/Wald tests
├── optim/                 proximal operators, projections, QP wrapper, bisection
├── portfolio/             risk budgeting, mean-variance, tracking error, Black-Litterman
├── mixtures/               Gaussian-mixture & jump-diffusion risk measures
├── svm/                    SVM primal/dual (classification & regression)
├── spline/                cubic smoothing splines, banded solver
├── maths/                  numerical differentiation, GBM simulation
├── linalg/                 vec/vech/xpnd, commutation/duplication matrices
└── viz/                    figure export helpers

Status

Scaffold stage — module structure and public APIs are being ported incrementally from the MATLAB source. See docs/migration_map.md for per-module progress.

Testing

pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quanttoolbox-0.1.0.tar.gz (110.3 kB view details)

Uploaded Source

Built Distribution

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

quanttoolbox-0.1.0-py3-none-any.whl (105.7 kB view details)

Uploaded Python 3

File details

Details for the file quanttoolbox-0.1.0.tar.gz.

File metadata

  • Download URL: quanttoolbox-0.1.0.tar.gz
  • Upload date:
  • Size: 110.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quanttoolbox-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b93ed68af7c8bbbe6b4c3c64dabe3280a92d52fd351d1c89eada73ca65fa761d
MD5 cc1bc9d9ee0175f70853bfa4688ea26e
BLAKE2b-256 08a62e2efdd2c01031fa0d67166f7960deda04629280a704b313effc524f17fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttoolbox-0.1.0.tar.gz:

Publisher: release.yml on lcrmorin/QuantToolBox

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

File details

Details for the file quanttoolbox-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: quanttoolbox-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 105.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quanttoolbox-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 654831b4eec51d5b2fe9a4c84f2812bd306ab525079a26b784b8af3f447bc013
MD5 d566087246a882510714a11f5ca151e6
BLAKE2b-256 f17a48c1b6d6a524539d09a40c05fde00c7f1576534c15b3583b123657360251

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttoolbox-0.1.0-py3-none-any.whl:

Publisher: release.yml on lcrmorin/QuantToolBox

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

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 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