Quant analytics and market data for Polars DataFrames
Project description
Xpectral Quant
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) viapl.col(...).quant.returns(), plus aPortfoliobuilder.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06fa9db17149001b69e06fc21f1e120d9c625106f33e3f07e44f4b2f358b5137
|
|
| MD5 |
9b553f39fdbd4c45166b169a4480e96f
|
|
| BLAKE2b-256 |
5f8035378849efb42fc813160bea1bad1094a9fc2ae1d29a458eca0e8def29c8
|
Provenance
The following attestation bundles were made for xpectral_quant-1.0.1.tar.gz:
Publisher:
publish.yml on bayquant/xpectral-quant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpectral_quant-1.0.1.tar.gz -
Subject digest:
06fa9db17149001b69e06fc21f1e120d9c625106f33e3f07e44f4b2f358b5137 - Sigstore transparency entry: 2063492138
- Sigstore integration time:
-
Permalink:
bayquant/xpectral-quant@cbf5b146192c4de3d7c1dbf890dbbb2dd4745b0b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bayquant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cbf5b146192c4de3d7c1dbf890dbbb2dd4745b0b -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42df49ad0e184086c6869a57d7ad8d6b93d345466b7d2d12e6308c1432b993f9
|
|
| MD5 |
807f6108368c8924bd47f630c348e165
|
|
| BLAKE2b-256 |
8a21055b47b139ef5e875add46b17dc63ba6c348368c9d6e96aafa292eaf71e1
|
Provenance
The following attestation bundles were made for xpectral_quant-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on bayquant/xpectral-quant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xpectral_quant-1.0.1-py3-none-any.whl -
Subject digest:
42df49ad0e184086c6869a57d7ad8d6b93d345466b7d2d12e6308c1432b993f9 - Sigstore transparency entry: 2063492148
- Sigstore integration time:
-
Permalink:
bayquant/xpectral-quant@cbf5b146192c4de3d7c1dbf890dbbb2dd4745b0b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bayquant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cbf5b146192c4de3d7c1dbf890dbbb2dd4745b0b -
Trigger Event:
workflow_dispatch
-
Statement type: