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. globalvariables 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e367b7ecbd062fb0a3090f7afbe3cd9eba1b0a10475fc1f6103d9734bf0d49d
|
|
| MD5 |
10886153f63713533e691105929e0883
|
|
| BLAKE2b-256 |
62c8125c837ccc85f34fc13d6a65a38e6707cf5d1f9eb3b10241da5a68c04af4
|
Provenance
The following attestation bundles were made for quanttoolbox-0.2.0.tar.gz:
Publisher:
release.yml on lcrmorin/QuantToolBox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quanttoolbox-0.2.0.tar.gz -
Subject digest:
1e367b7ecbd062fb0a3090f7afbe3cd9eba1b0a10475fc1f6103d9734bf0d49d - Sigstore transparency entry: 2548595762
- Sigstore integration time:
-
Permalink:
lcrmorin/QuantToolBox@91b1a86f451177943117417f3ea07da4b813a7f8 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lcrmorin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1a86f451177943117417f3ea07da4b813a7f8 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7fe50254a0eefc85b36814f40cecc4de2987a3a93d63df5a79726d49fd3f634
|
|
| MD5 |
008efd473346b63641644af0ac44af28
|
|
| BLAKE2b-256 |
d38ba3a37920ec16b7be3cb94b3b83d1f025ee98bff45f463ded1e31fdf7f546
|
Provenance
The following attestation bundles were made for quanttoolbox-0.2.0-py3-none-any.whl:
Publisher:
release.yml on lcrmorin/QuantToolBox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quanttoolbox-0.2.0-py3-none-any.whl -
Subject digest:
c7fe50254a0eefc85b36814f40cecc4de2987a3a93d63df5a79726d49fd3f634 - Sigstore transparency entry: 2548596888
- Sigstore integration time:
-
Permalink:
lcrmorin/QuantToolBox@91b1a86f451177943117417f3ea07da4b813a7f8 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lcrmorin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@91b1a86f451177943117417f3ea07da4b813a7f8 -
Trigger Event:
push
-
Statement type: