Skip to main content

Multi-factor alpha research platform for systematic trading.

Project description

Elvers

PyPI CI License Python 3.10+ Polars

Polars-native quantitative research platform. All computation executes as Rust-backed Polars expressions with no Python loops in the hot path.

Pre-1.0 development. API is stabilizing but may have breaking changes between minor versions. See CHANGELOG.md.

Pipeline

Elvers covers the full quantitative research workflow:

Step Module Status
1. Universe Selection universe/ Planned
2. Data Acquisition data/providers/ Planned
3. Data Storage data/store.py Planned
4. Factor Computation ops/ 72 operators
5. Factor Analysis analysis/ Planned
6. Multi-Factor Synthesis synthesis/ Planned
7. Portfolio Construction portfolio/ Planned
8. Backtesting backtest/ Planned
9. Risk Management risk/ Planned
10. Execution execution/ Planned
11. Post-Trade Analysis execution/post_trade.py Planned
12. Monitoring monitor/ Planned

Design

  • Column-based. Factor stores a column name + Panel reference. All data lives in a single Panel DataFrame. Zero intermediate copies, zero hash joins. Same-expression memoization.
  • Balanced alignment. Panel guarantees every symbol shares the same timestamp index. Missing values are explicit nulls. Look-ahead bias is prevented by construction.
  • Single null semantics. NaN and Inf are converted to null on column creation. One missing-value type eliminates NaN-infection.

Installation

pip install elvers

Usage

from elvers import load, ts_rank, zscore, signal

panel = load()
close = panel["close"]
alpha = signal(zscore(ts_rank(close, 30)))

Operators

72 operators. All accept and return Factor.

Time-Series -- per-symbol rolling window:

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_step ts_decay_linear ts_decay_exp_window days_from_last_change ts_av_diff ts_scale ts_percentile ts_quantile ts_cv ts_autocorr ts_count_nans ts_backfill kth_element last_diff_value inst_tvr ts_delta_limit ts_regression trade_when

Cross-Sectional -- across symbols at each timestamp:

rank zscore mean median scale normalize quantile signal winsorize truncate left_tail right_tail

Neutralization and Group -- sector/industry control:

vector_neut regression_neut group_neutralize group_rank group_zscore group_scale group_normalize group_mean group_median group_backfill

Math -- element-wise transforms:

log sqrt sign power signed_power inverse s_log_1p maximum minimum where

Arithmetic:

add subtract multiply divide reverse densify bucket and standard operators (+ - * / ** abs)

Full specifications: OPERATORS.md

Development

pip install -e ".[dev]"
pytest tests/ -v
ruff check elvers/
pyright elvers/

See CONTRIBUTING.md for the contributor guide.

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

elvers-0.4.0.tar.gz (301.4 kB view details)

Uploaded Source

Built Distribution

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

elvers-0.4.0-py3-none-any.whl (294.9 kB view details)

Uploaded Python 3

File details

Details for the file elvers-0.4.0.tar.gz.

File metadata

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

File hashes

Hashes for elvers-0.4.0.tar.gz
Algorithm Hash digest
SHA256 33fec535a140fdb8ed48cdda3b2819e9c1de6f5c44f2d2a654472b06f866e928
MD5 431a892f6cf686ab9ea47b13b97f0310
BLAKE2b-256 248719ef8a42736291495a24666c8e098b6d017806a768dd83234041f06756be

See more details on using hashes here.

Provenance

The following attestation bundles were made for elvers-0.4.0.tar.gz:

Publisher: publish.yml on quantbai/elvers

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

File details

Details for the file elvers-0.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for elvers-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d8f5aaba46dee85a9f121c57663240827bf4af31fe9d5ecfcbd29da5a17e93e
MD5 909e8b0b7997b4488640b49f9acc9380
BLAKE2b-256 0243fe2d74407eadd779e3bc4761887f304b1e0659da72996d0a627407de01e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for elvers-0.4.0-py3-none-any.whl:

Publisher: publish.yml on quantbai/elvers

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