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.1.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.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xpectral_quant-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 06fa9db17149001b69e06fc21f1e120d9c625106f33e3f07e44f4b2f358b5137
MD5 9b553f39fdbd4c45166b169a4480e96f
BLAKE2b-256 5f8035378849efb42fc813160bea1bad1094a9fc2ae1d29a458eca0e8def29c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral_quant-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: xpectral_quant-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42df49ad0e184086c6869a57d7ad8d6b93d345466b7d2d12e6308c1432b993f9
MD5 807f6108368c8924bd47f630c348e165
BLAKE2b-256 8a21055b47b139ef5e875add46b17dc63ba6c348368c9d6e96aafa292eaf71e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral_quant-1.0.1-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