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.2.0.tar.gz (113.7 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.2.0-py3-none-any.whl (108.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for quanttoolbox-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1e367b7ecbd062fb0a3090f7afbe3cd9eba1b0a10475fc1f6103d9734bf0d49d
MD5 10886153f63713533e691105929e0883
BLAKE2b-256 62c8125c837ccc85f34fc13d6a65a38e6707cf5d1f9eb3b10241da5a68c04af4

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttoolbox-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: quanttoolbox-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 108.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fe50254a0eefc85b36814f40cecc4de2987a3a93d63df5a79726d49fd3f634
MD5 008efd473346b63641644af0ac44af28
BLAKE2b-256 d38ba3a37920ec16b7be3cb94b3b83d1f025ee98bff45f463ded1e31fdf7f546

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttoolbox-0.2.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

This release

0.2.0 This release

2 files

0.1.0

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