Skip to main content

Linear algebra utilities for portfolio optimization

Project description

cvx-linalg

PyPI version Python Downloads License CodeFactor Rhiza Coverage

Linear algebra utilities for portfolio optimization, part of the jebel-quant ecosystem.

Installation

pip install cvx-linalg

Usage

from cvx.linalg import a_norm, cholesky, ewm_covariance, inv_a_norm, pca, rand_cov, solve, valid

Functions

  • a_norm(vector, matrix=None) — Euclidean norm or NaN-aware matrix norm
  • cholesky(cov) — Upper triangular Cholesky factor R such that R.T @ R = cov
  • ewm_covariance(data, assets, index_col, window, is_halflife, warmup) — Exponentially weighted covariance matrices from a Polars DataFrame
  • inv_a_norm(vector, matrix=None) — Euclidean norm or inverse NaN-aware matrix norm
  • pca(returns, n_components) — Principal Component Analysis via SVD
  • rand_cov(n, seed) — Random positive semi-definite covariance matrix
  • solve(matrix, rhs) — Solve a linear system after removing invalid rows/columns
  • valid(matrix) — Extract valid submatrix by removing rows/columns with non-finite diagonal entries

Project details


Download files

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

Source Distribution

cvx_linalg-0.5.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

cvx_linalg-0.5.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file cvx_linalg-0.5.0.tar.gz.

File metadata

  • Download URL: cvx_linalg-0.5.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cvx_linalg-0.5.0.tar.gz
Algorithm Hash digest
SHA256 63fb7f5fafc7e575ddcca0473b9fde07976df9bf15f5b862add3b7a3fb358e42
MD5 180986077d8d54e17928b297c930896f
BLAKE2b-256 9a15c32b4209cb0265e6d2b7c13c536fce2015f27c84c7cb02289c6d619167d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvx_linalg-0.5.0.tar.gz:

Publisher: rhiza_release.yml on Jebel-Quant/linalg

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

File details

Details for the file cvx_linalg-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: cvx_linalg-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cvx_linalg-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d89fe5d3ad1aa0f47c8320120a0a02dfdef2178ff01b9b01fb05c1fcf433c55
MD5 75362dc606e590a82cfa6ab77f96b4ff
BLAKE2b-256 b34e53ca80f1acb2cbcd12d9bfcca73d45042e615fac6320972a55a89fdc83c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvx_linalg-0.5.0-py3-none-any.whl:

Publisher: rhiza_release.yml on Jebel-Quant/linalg

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