High-performance multi-factor quantitative framework built on Polars.
Project description
ELVERS is a high-performance, strictly typed multi-factor alpha research engine powered by Polars.
Design Philosophy
Quantitative research requires rapid iteration over large universe panels without compromising execution speed. Legacy pandas-based pipelines are interpretable but inherently scale poorly. elvers addresses this through a robust two-layer abstraction:
Panel— A continuous, balanced panel container enforcing strict(timestamp, symbol)alignment. It mitigates look-ahead bias and standardizes index integrity across all transformations.Factor— A fully evaluated, eagerly executed vector of signal exposures. Bound directly to the global panel, factors resolve native Polars expressions instantaneously utilizing highly-parallelized core routines underneath Rust and C.
The architecture guarantees that complex computational graphs—from primitive time-series aggregations to complex cross-sectional neutralizations—are resolved at theoretical hardware peaks with virtually zero Python interpreter overhead in the hot path.
Installation
pip install elvers
Quick Start
Compose factors exactly as intuitively as they are expressed mathematically:
from elvers import load, ts_rank, zscore
# Load your own data
# panel = load("your_ohlcv.csv")
# Load built-in sample dataset
panel = load()
close = panel["close"]
volume = panel["volume"]
# Define and execute expressions instantly
momentum = ts_rank(close, 20)
alpha = zscore(momentum)
# Extract native Polars DataFrame
result = alpha.df
print(result)
Both Panel and Factor expose a .df property that returns the underlying pl.DataFrame:
panel.df— Full panel frame with all OHLCV columns intact.factor.df— Flat(T_days * N_symbols, 3)frame aligned to the original spatial coordinates:
shape: (T_days * N_symbols, 3)
┌────────────┬────────┬───────────┐
│ timestamp ┆ symbol ┆ factor │
│ --- ┆ --- ┆ --- │
│ date ┆ str ┆ f64 │
╞════════════╪════════╪═══════════╡
│ 2024-01-01 ┆ BTC ┆ null │
│ ... ┆ ... ┆ ... │
│ 2024-12-31 ┆ ETH ┆ 1.243 │
└────────────┴────────┴───────────┘
Rows are ordered by timestamp (ascending), then symbol (ascending).
Note: Rolling window operators naturally yield
nullfor the initialwindow - 1periods per symbol. The full dense panel shape is preserved throughout all operations.
Operator Library
| Category | Supported Operators |
|---|---|
| Time-Series | ts_delay, ts_delta, ts_mean, ts_sum, ts_std_dev, ts_min, ts_max, ts_median, ts_rank, ts_skewness, ts_kurtosis, ts_zscore, ts_corr, ts_covariance, ts_product, ts_decay_linear, ts_av_diff, ts_scale, ts_quantile, ts_cv, ts_autocorr, ts_count_nans, ts_backfill |
| Cross-Sectional | rank, zscore, mean, median, scale, normalize, signal |
| Neutralization | vector_neut, regression_neut, group_neutralize, group_rank, group_zscore, group_scale, group_normalize |
| Math | log, ln, sqrt, sign, power, signed_power, inverse, s_log_1p, maximum, minimum, where, standard operators (+, -, *, /, **, abs) |
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 elvers-0.2.0.tar.gz.
File metadata
- Download URL: elvers-0.2.0.tar.gz
- Upload date:
- Size: 300.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
410840bfa765a324ac81933fd00b1856830e342c349380382ff3ccc6abb571b8
|
|
| MD5 |
2b07985b8e819614f5d83100c194b09b
|
|
| BLAKE2b-256 |
554b5b781ffe0e3ae5dee34aa0c2d81d1645aac6ff7deddb58773e69ec1e301f
|
Provenance
The following attestation bundles were made for elvers-0.2.0.tar.gz:
Publisher:
publish.yml on quantbai/elvers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elvers-0.2.0.tar.gz -
Subject digest:
410840bfa765a324ac81933fd00b1856830e342c349380382ff3ccc6abb571b8 - Sigstore transparency entry: 1156957968
- Sigstore integration time:
-
Permalink:
quantbai/elvers@3f9d3491c09a811e91e995ad8bb12a4531d8d019 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/quantbai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f9d3491c09a811e91e995ad8bb12a4531d8d019 -
Trigger Event:
push
-
Statement type:
File details
Details for the file elvers-0.2.0-py3-none-any.whl.
File metadata
- Download URL: elvers-0.2.0-py3-none-any.whl
- Upload date:
- Size: 292.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a1c4cf90b97424e876b63520c82d8eb1a38b2c121db9f3cfee9e8b14697c453
|
|
| MD5 |
06a01ab26815b3a40ec00f629904acb6
|
|
| BLAKE2b-256 |
5975cc53b2e7b9ff41476f876c376cf329ab8bf8ed98658e97fad2cabd593e80
|
Provenance
The following attestation bundles were made for elvers-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on quantbai/elvers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elvers-0.2.0-py3-none-any.whl -
Subject digest:
7a1c4cf90b97424e876b63520c82d8eb1a38b2c121db9f3cfee9e8b14697c453 - Sigstore transparency entry: 1156958018
- Sigstore integration time:
-
Permalink:
quantbai/elvers@3f9d3491c09a811e91e995ad8bb12a4531d8d019 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/quantbai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f9d3491c09a811e91e995ad8bb12a4531d8d019 -
Trigger Event:
push
-
Statement type: