Skip to main content

QuantToolBox

A Python port of Thierry Roncalli's MATLAB QuantToolBox and the Handbook of Sustainable Finance toolbox: econometrics, portfolio optimization, and risk analytics.

pip install quanttoolbox

Example

import numpy as np
from quanttoolbox.portfolio.risk_budgeting import erc_portfolio

cov_matrix = np.array([
    [0.09, 0.024, 0.018],
    [0.024, 0.04, 0.012],
    [0.018, 0.012, 0.0225],
])

result = erc_portfolio(cov_matrix)
print(result.weights)               # equal-risk-contribution weights
print(result.pct_risk_contribution)  # ~equal, by construction

Docs

  • Examples — worked examples with real numeric output, ordered from simplest to most involved.
  • API reference — generated from the docstrings.
  • Notes for translators — file-by-file mapping back to the original MATLAB source, and what's left to port.

License

MIT.

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.3.0.tar.gz (172.2 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.3.0-py3-none-any.whl (154.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for quanttoolbox-0.3.0.tar.gz
Algorithm Hash digest
SHA256 88468dd55ac8ecf9ee32f5638aa979effe7e1d67fae77379044fb449e2d62202
MD5 6880c6599ec7a1ec4140f933dcc76f28
BLAKE2b-256 5a4fa51ee26fe72f9d90a4275e4be9e9bf4408ca96cc3529e1effd6f43a685f6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: quanttoolbox-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 154.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7b16b62031ad3974c41558ce0d31a1e18f9ae60781f15dd3968fbd99aaa075
MD5 82980ffa59bbc0f87ae7ae2321631385
BLAKE2b-256 64b9c28240e0651125c844272924c7adb7609f7524701f0e332d52dde242b312

See more details on using hashes here.

Provenance

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

This release

0.3.0 This release

2 files

0.2.0

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