Skip to main content

Quant analytics and market data for Polars DataFrames

Project description

Xpectral Quant

Spectral decomposition

Quant analytics and market data that extend Polars DataFrames via the accessor pattern.

Part of the Xpectral project, alongside xpectral-chart (fluent Bokeh charting). Both install into the shared xpectral namespace and can be used together.

Modules

  • xpectral.quant — Financial metrics (returns, volatility, beta) via pl.col(...).quant.returns(), plus a Portfolio builder.
  • xpectral.data — Market data from the Polygon/Massive API with caching and rate limiting, plus simulations (BrownianMotion).

Usage

import xpectral.quant  # registers the .quant accessor
import polars as pl

df = pl.DataFrame({"close": [100.0, 101.0, 99.5, 102.0]})
df.with_columns(pl.col("close").quant.returns())

Importing xpectral.quant / xpectral.data is what registers the accessors and loads market-data credentials.

Market data credentials

xpectral.data reads Polygon/Massive API credentials from an xpectral/.env file (loaded automatically on import xpectral.data). Create it with your keys; it is git-ignored and never committed.

See each subpackage's README for module-level docs:

Install

pip install xpectral-quant
uv add xpectral-quant

For development:

uv sync

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

xpectral_quant-1.0.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

xpectral_quant-1.0.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file xpectral_quant-1.0.0.tar.gz.

File metadata

  • Download URL: xpectral_quant-1.0.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xpectral_quant-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8f74ba78c65cca0daa63cde4ec7e055a6da3d122acb61d69c2352b5c19869188
MD5 111fc93500f6b8bca523db0d5e4734fb
BLAKE2b-256 d3531d9222fb2b909b8433cc9caf875ee90246d33f5843ef1e1941ef412e5cac

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral_quant-1.0.0.tar.gz:

Publisher: publish.yml on bayquant/xpectral-quant

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

File details

Details for the file xpectral_quant-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for xpectral_quant-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3db20cc78cabfb81449c998b2f678104806c7ff69a10bc0d262c1c5eb1eba510
MD5 e24728d0969b5cbe2292b90975cc6357
BLAKE2b-256 78bdf9db65cc939fbe16a9c678e8ff12cc6c86d7cac1b892377aea70fb265db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral_quant-1.0.0-py3-none-any.whl:

Publisher: publish.yml on bayquant/xpectral-quant

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