Skip to main content

Quant Research Library

Project description

Xpectral

Spectral decomposition

A quantitative research library that extends Polars and Pandas DataFrames with charting and quant analytics.

Modules

  • xpectral.charts — Fluent Bokeh visualization via df.bokeh.line(...), df.bokeh.scatter(...), etc.
  • xpectral.quant — Financial metrics (returns, volatility, beta) via pl.col(...).quant.returns()
  • xpectral.data — Market data from the Polygon/Massive API with caching and rate limiting

xpectral.charts

import xpectral  # registers the accessors
from xpectral import PandasDataFrame
from xpectral import PolarsDataFrame

df: PolarsDataFrame = pl.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
fig = df.bokeh(title="Example", width=600, height=400)
fig.line(x="x", y="y")

pd_df: PandasDataFrame = pd.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
pd_fig = pd_df.bokeh(title="Example", width=600, height=400)
pd_fig.line(x="x", y="y")

Annotate sample DataFrames with PolarsDataFrame or PandasDataFrame when you want the editor (pyright) to resolve the df.bokeh(...) parameters and chained accessor methods. Annotation is neccessary for type. hinting as accessors are not discovered dinamically.

Install

pip install xpectral
uv add xpectral

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-1.0.2.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

xpectral-1.0.2-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file xpectral-1.0.2.tar.gz.

File metadata

  • Download URL: xpectral-1.0.2.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xpectral-1.0.2.tar.gz
Algorithm Hash digest
SHA256 01b8eacf1040bafa8a1cb0c58fece8f6a66c0b06c83d19fb83de717176a6ab45
MD5 4aee52aff79f1cb25058e1b44b61dfaf
BLAKE2b-256 60eb0c2c61d48afe725967ff9cd22a67e5eeb174df813871687d99c7c3fbe96c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral-1.0.2.tar.gz:

Publisher: publish.yml on bayquant/xpectral

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-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: xpectral-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xpectral-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e211dbcd196973bf9376142126a02af210ed06a3bb5550189ae1456d6e5be27c
MD5 8b6e126a35b17bf4e523d9ceacd41864
BLAKE2b-256 24b6f859066a0aeb95163b69010061c644d2b130a5d8622e08707f7c9802ad88

See more details on using hashes here.

Provenance

The following attestation bundles were made for xpectral-1.0.2-py3-none-any.whl:

Publisher: publish.yml on bayquant/xpectral

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