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.4.1.tar.gz (14.5 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.4.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cvx_linalg-0.4.1.tar.gz
  • Upload date:
  • Size: 14.5 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.4.1.tar.gz
Algorithm Hash digest
SHA256 c19da458b7c3787d235c160ec76faa1f72ef6e39a87e22fef02fb55c44114ab8
MD5 8c8c0069b645d56de6a74c13b0f05ada
BLAKE2b-256 af10fcf8aba620d66a02eed5821a7c77736ccf09b3aefbd61287194c2c116dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvx_linalg-0.4.1.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.4.1-py3-none-any.whl.

File metadata

  • Download URL: cvx_linalg-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 970faba2d10fd608c46ea3bc029f2653f2025f0187a19a9c9533ffac8d7215f8
MD5 e95e749618e7893b868dc266457fc1c2
BLAKE2b-256 53c5f062c7ea02335c8a46d5648932faa635c0507225ae0ed024058d8aa13389

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvx_linalg-0.4.1-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