Skip to content

Commit bf35e00

Browse files
committed
chore: lock polars version to 1.37.1 and update readme docs
1 parent e992249 commit bf35e00

17 files changed

Lines changed: 268 additions & 403 deletions

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2026 Phantom Management
3+
Copyright (c) 2026 quantbai
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
5-
[![Polars](https://img.shields.io/badge/Polars-1.35+-green.svg)](https://pola.rs/)
5+
[![Polars](https://img.shields.io/badge/Polars-1.37.1-green.svg)](https://pola.rs/)
66

77
High-performance multi-factor quantitative framework built on Polars.
88

9-
Named after **ELVES** (Emission of Light and Very Low Frequency perturbations due to Electromagnetic Pulse Sources), the atmospheric lightning phenomenon that occurs at extreme speed.
9+
Named after **ELVES**, the atmospheric lightning phenomenon that occurs at extreme speed.
1010

1111
## Features
1212

@@ -24,16 +24,27 @@ pip install elvers
2424
## Quick Start
2525

2626
```python
27-
from elvers import load, col, collect_all
28-
from elvers import ts_mean, ts_rank, rank, zscore
27+
from elvers import load
28+
from elvers import ts_rank, rank, zscore, group_neutralize
2929

30-
load("data.csv")
30+
# 1. Load data into a managed Panel
31+
panel = load("crypto_data.csv")
3132

32-
close = col("close")
33+
# 2. Access factors via panel indexing
34+
close = panel["close"]
35+
volume = panel["volume"]
36+
37+
# 3. Define factors using professional operators
3338
momentum = ts_rank(close, 20)
3439
alpha = zscore(rank(momentum))
3540

36-
result = collect_all(alpha)
41+
# 4. Advanced: Neutralization
42+
# Neutralize alpha against volume groups
43+
final_alpha = group_neutralize(alpha, panel["group"])
44+
45+
# 5. Compute results
46+
result = panel.collect(final_alpha)
47+
print(result)
3748
```
3849

3950
## License
@@ -42,6 +53,6 @@ MIT License - see [LICENSE](LICENSE) for details.
4253

4354
## Author
4455

45-
Phantom Management
56+
quantbai
4657

4758

elvers/__init__.py

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,58 @@
44
Ultra-minimal, maximum performance WQ-style factor expressions.
55
Built on Polars for lightning-fast factor research.
66
7-
Author: Phantom Management
7+
Author: quantbai
88
"""
99

10-
__version__ = "0.1.0"
11-
__author__ = "Phantom Management"
10+
__version__ = "0.1.1"
11+
__author__ = "quantbai"
1212

13-
from .core import (
14-
Factor,
15-
load,
16-
lf,
17-
col,
18-
collect,
19-
collect_all,
20-
to_csv,
21-
to_pandas,
22-
)
13+
from .core import Factor
14+
from .io import load, Panel, PanelInfo
2315

2416
from .ops import (
25-
add, sub, mul, div, reverse,
17+
add, subtract, multiply, divide, reverse,
2618

2719
ts_delay, ts_delta, ts_mean, ts_sum, ts_std_dev,
2820
ts_min, ts_max, ts_median, ts_rank, ts_skewness, ts_kurtosis,
2921
ts_zscore, ts_corr, ts_covariance, ts_product,
3022
ts_arg_max, ts_arg_min, ts_decay_linear, ts_av_diff, ts_scale,
31-
ts_var, ts_quantile_val, ts_cv, ts_autocorr,
32-
ts_return, ts_log_return, ts_pct_change,
33-
ts_count_nulls, ts_step,
34-
ts_ewm_mean, ts_ewm_std, ts_ewm_var,
23+
ts_quantile, ts_cv, ts_autocorr,
24+
ts_count_nans,
3525

36-
rank, zscore, mean, median, sum_, std,
26+
rank, zscore, mean, median,
3727
scale, normalize, quantile, spread, signal,
3828

39-
log, ln, sqrt, abs_, sign, power, signed_power,
29+
log, ln, sqrt, sign, power, signed_power,
4030
inverse, s_log_1p, maximum, minimum, where,
41-
clip, nan_to_value, fill_null,
4231

43-
vector_neut, regression_neut, demean, market_neut,
44-
group_demean, group_rank, group_zscore, group_scale,
45-
group_normalize, winsorize, mad_winsorize,
32+
vector_neut, regression_neut,
33+
group_neutralize, group_rank, group_zscore, group_scale,
34+
group_normalize,
4635
)
4736

4837
__all__ = [
4938
"__version__",
5039
"__author__",
5140
"Factor",
52-
"load", "lf", "col", "collect", "collect_all", "to_csv", "to_pandas",
41+
"load", "Panel", "PanelInfo",
5342

54-
"add", "sub", "mul", "div", "reverse",
43+
"add", "subtract", "multiply", "divide", "reverse",
5544

5645
"ts_delay", "ts_delta", "ts_mean", "ts_sum", "ts_std_dev",
5746
"ts_min", "ts_max", "ts_median", "ts_rank", "ts_skewness", "ts_kurtosis",
5847
"ts_zscore", "ts_corr", "ts_covariance", "ts_product",
5948
"ts_arg_max", "ts_arg_min", "ts_decay_linear", "ts_av_diff", "ts_scale",
60-
"ts_var", "ts_quantile_val", "ts_cv", "ts_autocorr",
61-
"ts_return", "ts_log_return", "ts_pct_change",
62-
"ts_count_nulls", "ts_step",
63-
"ts_ewm_mean", "ts_ewm_std", "ts_ewm_var",
49+
"ts_quantile", "ts_cv", "ts_autocorr",
50+
"ts_count_nans",
6451

65-
"rank", "zscore", "mean", "median", "sum_", "std",
52+
"rank", "zscore", "mean", "median",
6653
"scale", "normalize", "quantile", "spread", "signal",
6754

68-
"log", "ln", "sqrt", "abs_", "sign", "power", "signed_power",
55+
"log", "ln", "sqrt", "sign", "power", "signed_power",
6956
"inverse", "s_log_1p", "maximum", "minimum", "where",
70-
"clip", "nan_to_value", "fill_null",
7157

72-
"vector_neut", "regression_neut", "demean", "market_neut",
73-
"group_demean", "group_rank", "group_zscore", "group_scale",
74-
"group_normalize", "winsorize", "mad_winsorize",
58+
"vector_neut", "regression_neut",
59+
"group_neutralize", "group_rank", "group_zscore", "group_scale",
60+
"group_normalize",
7561
]

elvers/core/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
"""Core module exports."""
22

33
from .factor import Factor
4-
from .context import load, lf, col, collect, collect_all, to_csv, to_pandas
54

65
__all__ = [
76
"Factor",
8-
"load",
9-
"lf",
10-
"col",
11-
"collect",
12-
"collect_all",
13-
"to_csv",
14-
"to_pandas",
157
]

elvers/core/context.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)